This is so far the best and the most concise comment in favor of code 
comments I've read so far.

Thanks man.

teisipäev, 30. aprill 2013 21:16.39 UTC+3 kirjutas Vince O'Sullivan:
>
> On Monday, 15 April 2013 07:38:03 UTC+1, brucechapman wrote:
>
>>  If what we write first is "the simplist thing that might work", then 
>> I'd suggest comments should explain code that is not apparently the "the 
>> simplist thing that might work". or "comments should explain why the 
>> simplistic thing that might have worked, didn't"
>>
>
> Unfortunately, code that the developer has stripped bare, in order to make 
> it more "simple", is rarely code in a form that is most useful to someone 
> who has to maintain it in the future (including when that someone is the 
> same person and "the future" might only be days later).
>
> Comments are (or, at least, ought to be) good precisely because they are 
> redundant.  Error checking is only possible when redundancy is present.  If 
> the comments and the code match, our confidence in it increases; if not, it 
> decreases.  Unit tests work in the same way.  They are redundant code - 
> often bigger and more complex than the code under test - in that they are 
> written but not shipped (just as comments are written but not executed). 
>  Nevertheless, no one would suggest that removing tests would be a good 
> thing because it would make the overall code base simpler.
>

-- 
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/javaposse?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to