Herfried,
If you read "Refactoring - Improving the design of Existing Code" by Martin
Fowler from Addison Wesley
http://www.refactoring.com/
Martin would suggests that too many comments is a "bad smell" in your code.
A "bad smell" is a section of cod that needs to be improved. Specifically
Martin states in reference to a long methods:
"A heuristic we follow is that whenever we feel
the need to comment something, we write a method
instead. Such a method contains the code that was
commented but is named after the intention of the
code rather then how it does it".
Basically if you have a long method where you have a comment every 10 or 15
lines, that each of those 10 or 15 lines should be its own method, where the
name of the method is the comment.
Martin is not suggesting you do not put comments before methods that explain
what the method does, what it expects & what it returns. He is referring to
comments within the method bodies themselves.
Hope this helps
Jay
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2o************@uni-berlin.de...
* "Cor Ligthert" <no**********@planet.nl> scripsit: I always get praised for my code being easily understood so there is
no worries there. Plus I comment a lot.
When your code is easily to understood there is no need for commenting.
Aren't comments /part of/ the code?
:-)
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>