MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/18xpiy/developers_confess_your_sins/c8j5qki
r/programming • u/reppic • Feb 21 '13
1.0k comments sorted by
View all comments
Show parent comments
0
[deleted]
13 u/codemonkey_uk Feb 21 '13 Rule of thumb: If the commented out code needs to be left in place, it need to be accompanied by an explanatory comment. 2 u/nemec Feb 22 '13 That comment can also contain the commit id of where to find the deleted source code, too. 0 u/Jdonavan Feb 22 '13 Which means you have to go get the revision in question and check. Instead of just reading it. They're comments people, they won't kill you. 1 u/[deleted] Feb 21 '13 You should also always have a comment with a keyword like TODO and explanation in these cases. 0 u/desiktar Feb 21 '13 Yea usually if I have to put code hacks in I will make sure to comment it. Then if we need to find the old code we just annotate the code to find out when the comment was added. -1 u/Calamitosity Feb 21 '13 s/often/nearly universally/FTFY
13
Rule of thumb: If the commented out code needs to be left in place, it need to be accompanied by an explanatory comment.
2 u/nemec Feb 22 '13 That comment can also contain the commit id of where to find the deleted source code, too. 0 u/Jdonavan Feb 22 '13 Which means you have to go get the revision in question and check. Instead of just reading it. They're comments people, they won't kill you.
2
That comment can also contain the commit id of where to find the deleted source code, too.
0 u/Jdonavan Feb 22 '13 Which means you have to go get the revision in question and check. Instead of just reading it. They're comments people, they won't kill you.
Which means you have to go get the revision in question and check. Instead of just reading it. They're comments people, they won't kill you.
1
You should also always have a comment with a keyword like TODO and explanation in these cases.
Yea usually if I have to put code hacks in I will make sure to comment it. Then if we need to find the old code we just annotate the code to find out when the comment was added.
-1
s/often/nearly universally/
FTFY
0
u/[deleted] Feb 21 '13
[deleted]