July 12, 2010
Codemanship's Code Smell Of The Week - CommentsMany people have been brought up to see comments as a good thing, but experience has taught us that in reality not only are they an indicator of code that is difficult to understand, but they create a burden on us because they so quickly get out of step with the code and become misleading and unhelpful - like all documentation.
In this example, Jason Gorman (that's me!) demonstrates refactoring comments out of a method to make the code self-explanatory.
Download the source code from http://bit.ly/drCatY
For training and coaching in refactoring, TDD and OO design, visit http://www.codemanship.com
Posted 8 years, 3 months ago on July 12, 2010