On 14/06/10 14:52, Andrea Aime wrote:
>>> I also see code that has just been commented out like in
>>> FeatureSourceMapLayer, bad practice... well, unless you noted down
>>> all the code that you've commented out and will remove it later.
>> That will be one of the last things I do; remember up to now is a
>> straight refactor. I will try and make the code clean and consistent
>> today.
> As long as you remember to remove the commented out code I have
> no issues with that either.
I like to remove all commented code I find. Nothing is lost, because if
it ever worked it in the VCS. Naturally, this rule only applies to my
modules. ;-)
The only exception, in my view, is commented code identifying the Jira
issue whose resolution will allow it to be uncommented in a FIXME: at
the start. Even this is dodgy, as comments are not subject to
refactoring and are quickly out-of-date. An if(false) { } block plus
FIXME: comment is better, or X-out/comment-o...@test for test methods.
The only other exception is when my team write so much code I can't keep
up with them. You know who you are. :-P
As an aside, a Test-Driven Development purist would be happy to delete
any code not covered by a unit test. This would include comments. :-)
--
Ben Caradoc-Davies <[email protected]>
Software Engineering Team Leader
CSIRO Earth Science and Resource Engineering
Australian Resources Research Centre
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel