From: Christopher Smith <[EMAIL PROTECTED]>

Yeah, Smalltalk folks in general tend to frown on comments. They see it as a sign that a method is complex. Complexity is sometimes warranted (in which case comments are insisted upon, rather than frowned upon), but most often not. The preferred approach is to have short methods with descriptive names (this is helped tremendously by the way Smalltalk method names work when you have multiple parameters).

Meaningful names are good, but nowhere near sufficient. They don't tell us what assumtions have been made, valid input ranges (if not the entire range of the type), or why you're doing what you're doing (general rule of comments- why, not how, unless the how is really complex). The two aren't exclusive, they complement each other.

Don't forget documentation. People think that XP says not to do documentation, but it doesn't. It says to push off writing any documentation until it's going to be used or the end of the project, whichever comes first. The idea behind this is that the projects, the code, etc. change over time and you end up with all this "documentation" which is inaccurate the first time it is actually used (raise your hand if you've not experienced this phenomenon before ;-) or worse still you spend all this time refactoring documentation to keep it up to date.

There's a multitude of problems with this

1)No manager in the world is going to let you sit around documeenting for a month instead of doing "real work".
2)People leave-  they won't be around to document at the end
3)People get added-  there's no documentation to bring them up to speed
4)XP projects are about rapid iterations- they never really end, so you'd never get around to documenting 5)People forget- half the reason for docs is to remind the programmers of the design and implementation they're writing. No docs, nothing to go back to when you're forgetting details

Not to mention the pure inanity of it- you're supposed to rapidly refactor code, but for documentation its suddenly bad? Yeah, you need to go back and tweak it every so often. No big deal. At least you have it to go back to. THe idea of no design (or "the tests are the design", which is the same thing), no documentation, no comments are all signs of a lack of professionalism, a lack understanding of software engineering and quality, and a lack of respect for your coworkers and those who will maintain the software. If I had someone on my team who took any of those stances, I'd do my damndest to get him fired, he's a liability to the team.

Gabe

_________________________________________________________________
Stay up-to-date with your friends through the Windows Live Spaces friends list. http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mk

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to