Re:Why can't you guys comment your fucking code?
by sclangdon on Tuesday July 04, 2017 @03:21AM
(#14694157)
That isn't a compramise, it's the goal. Your comments should be about the "why", and not the "how". We already know how, that's what code is - instructions about how something works.
What we don't know is why it was done in the first place, or why it was done a particular way, or why I shouldn't change that line that looks wrong but is really correct.
Re:Why can't you guys comment your fucking code?
by oldandtired on Tuesday July 04, 2017 @02:55AM
(#14694044)
Making code readable is only part of the reason for comments. The other part is why the code is there and the history of why certain decisions were made. Without this information, changes to the code can have ongoing subtle and not so subtle ramifications.
The best compromise is to make your code readable and only comment about the "why", not the "how".