Results 1 to 25 of 130
Thread: Code comments and execution time
Mar 9, 2011, 09:47 #14
- Join Date
- Nov 1999
- Mechanicsburg, PA
- 78 Post(s)
- 1 Thread(s)
I think DS's point is simple - if the comment makes sense, then by all means, keep it. But if the comment is something that can be figured out with half a brain, then why keep a comment that doesn't add value.
The start and stop of blocks he posted were a prime example - though to be honest, Ive used this if there was complex looping or if logic occurring until I had time to refactor it later...
Another would be commented out code - in the era of source control, why would you ever place code in production that's commented out unless it was only going to be gone for a day or two? I've seen code that's been commented out that is still in production code 4-5 years later - needless to say, when I'm done, that code is no longer there....