Re:Refactoring wars and how to avoid them: what is "simplici...
by elblanco on Tuesday March 30, 2010 @10:15PM
(#1230736)
All I can say is fascinating.
I don't think it can be drilled into developer's heads enough, that someday, somebody else will have to deal with this code. And that person might even be them 4 years from now.
Recently at my day job, I came across a string trim() function, which started with this comment:
The code itself also removed single trailing periods. That really hurts your trust in the code base - you need to read everything a function calls to understand it, you can't trust the method names. This makes it take longer to understand any particular piece of code - even if in the end the methods called actually do what they claim to.