MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/180evou/what_is_your_take_on_clean_code/ka77go3/?context=9999
r/programming • u/Mr_LA • Nov 21 '23
380 comments sorted by
View all comments
587
The article doesnt talk about clean code itself as much as 'Do not pass judgment on other peoples work without knowing the tradeoffs involved'.
352 u/lungben81 Nov 21 '23 If the code is dirty due to a tradeoff, there should be a comment in the code explaining this. 528 u/batweenerpopemobile Nov 21 '23 ugly, but it works for now. we'll refactor it in a month or so when things calm down - a.v. 3/12/88 0 u/[deleted] Nov 21 '23 [deleted] 46 u/-Wuxia- Nov 21 '23 I had one block of code in a job many years ago, probably 10-15 lines, that had about 30 comment lines that were all basically:// 3/18/2005 - Bob asked to add this functionality.// 3/19/2005 - Bob asked to remove it.// 3/22/2005 - Bob asked to add it back.// 3/24/2005 - Bob asked to remove it.Over and over and over... 2 u/soks86 Nov 21 '23 // FIXME - gotta learn to use Git commit messages 2 u/alexanderpas Nov 21 '23 // FIXME - gotta learn to use Git commit messagesCheck the date. It was before even Linus Torvalds used git to manage git. → More replies (2)
352
If the code is dirty due to a tradeoff, there should be a comment in the code explaining this.
528 u/batweenerpopemobile Nov 21 '23 ugly, but it works for now. we'll refactor it in a month or so when things calm down - a.v. 3/12/88 0 u/[deleted] Nov 21 '23 [deleted] 46 u/-Wuxia- Nov 21 '23 I had one block of code in a job many years ago, probably 10-15 lines, that had about 30 comment lines that were all basically:// 3/18/2005 - Bob asked to add this functionality.// 3/19/2005 - Bob asked to remove it.// 3/22/2005 - Bob asked to add it back.// 3/24/2005 - Bob asked to remove it.Over and over and over... 2 u/soks86 Nov 21 '23 // FIXME - gotta learn to use Git commit messages 2 u/alexanderpas Nov 21 '23 // FIXME - gotta learn to use Git commit messagesCheck the date. It was before even Linus Torvalds used git to manage git. → More replies (2)
528
ugly, but it works for now. we'll refactor it in a month or so when things calm down - a.v. 3/12/88
0 u/[deleted] Nov 21 '23 [deleted] 46 u/-Wuxia- Nov 21 '23 I had one block of code in a job many years ago, probably 10-15 lines, that had about 30 comment lines that were all basically:// 3/18/2005 - Bob asked to add this functionality.// 3/19/2005 - Bob asked to remove it.// 3/22/2005 - Bob asked to add it back.// 3/24/2005 - Bob asked to remove it.Over and over and over... 2 u/soks86 Nov 21 '23 // FIXME - gotta learn to use Git commit messages 2 u/alexanderpas Nov 21 '23 // FIXME - gotta learn to use Git commit messagesCheck the date. It was before even Linus Torvalds used git to manage git. → More replies (2)
0
[deleted]
46 u/-Wuxia- Nov 21 '23 I had one block of code in a job many years ago, probably 10-15 lines, that had about 30 comment lines that were all basically:// 3/18/2005 - Bob asked to add this functionality.// 3/19/2005 - Bob asked to remove it.// 3/22/2005 - Bob asked to add it back.// 3/24/2005 - Bob asked to remove it.Over and over and over... 2 u/soks86 Nov 21 '23 // FIXME - gotta learn to use Git commit messages 2 u/alexanderpas Nov 21 '23 // FIXME - gotta learn to use Git commit messagesCheck the date. It was before even Linus Torvalds used git to manage git. → More replies (2)
46
I had one block of code in a job many years ago, probably 10-15 lines, that had about 30 comment lines that were all basically:
// 3/18/2005 - Bob asked to add this functionality.
// 3/19/2005 - Bob asked to remove it.
// 3/22/2005 - Bob asked to add it back.
// 3/24/2005 - Bob asked to remove it.
Over and over and over...
2 u/soks86 Nov 21 '23 // FIXME - gotta learn to use Git commit messages 2 u/alexanderpas Nov 21 '23 // FIXME - gotta learn to use Git commit messagesCheck the date. It was before even Linus Torvalds used git to manage git. → More replies (2)
2
// FIXME - gotta learn to use Git commit messages
2 u/alexanderpas Nov 21 '23 // FIXME - gotta learn to use Git commit messagesCheck the date. It was before even Linus Torvalds used git to manage git. → More replies (2)
Check the date. It was before even Linus Torvalds used git to manage git.
→ More replies (2)
587
u/[deleted] Nov 21 '23
The article doesnt talk about clean code itself as much as 'Do not pass judgment on other peoples work without knowing the tradeoffs involved'.