Re:Why can't you guys comment your fucking code?
by herbst on Tuesday July 04, 2017 @11:35AM
(#14696456)
Assuming that is the case and let's also assume there are no related test cases. I will just see where the method is called and try to build test cases around that. Then I can start to deconstruct the method and rebuild it without even understanding it fully. Backed on tests.
If you've been a developer for any length of time, I'm sure you will have encountered a situation where you've read some code, thought to yourself "wow, that's terrible, I'm going to change that". Then, several hours later, realised why it was done the way it was and actually, you can't really improve it after all. That is why we comment; to save the next person who enters the cave (and, if you're the kind of dev who spends several hours trying to understand something and doesn't retrospectively comment what you've found, then I'm afraid we can never be friends).
And please, don't assume the next person has the same knowledge of the system that you do.