> A note of dissent with my friend:
> I read a lot tonight. I am convinced, that rewriting code is *not* helpful
> in most cases, if we have code that actually does something. Inserting
> comments into working code is a much better idea. Only not working,
> undocumentated code should be rewritten. IMHO.
I disagree, in so much as one of the central concepts in XP is refactoring,
which is rewriting functional code. Code which you don't understand, you
refactor. Additionally, it's *much* easier for a developer to write tests
for her own code (ideally before writing the code itself), rather than
someone else come along later and attempt to understand all the extreme
conditions that need to be tested. Many types of comments (though not all),
are actually code smells.
Of course, I am assuming that we intend to actually practice XP, rather than
just claim/plan to do so. Let me know if I'm mistaken; it wouldn't be the
first time I'd seen the latter.
Just my 1.4822 cents, of course. (Lousy Aussie dollar! :)
Matthew
|