Re:10 commandments for creating good code
by knieveltech on Saturday June 06, 2009 @12:30AM
(#644487)
Nice little article until the wheels fell off: "Comments are evil". Couldn't disagree more. Few things suck worse than having to dive into someone else's code that isn't commented.
[ Parent
| on HN ]
Please read this other post for details in what I mean when I say that "comments are evil" http://makinggoodsoftware.com/2009/06/06/comments-are-evil/
In a lot of the cases the code should be the comment. Have a comment at the top of the function specifying what inputs are valid, what it returns, does it alter the data passed in, what the function actually does, etc....