John Sonmez

John Sonmez jsonmez John Sonmez

Niner since 2010


  • TWC9: Silverlight 4, SQL Server R2 & Ent Library 5.0 all RTM, Why code comments aren't bad

    Hi Dan,


    So I have to disagree with you about my post on about eliminating comments.  I think you have missed the point of the post.


    I fully understand that many people "don't believe in comments" and write bad horrible to understand code, because their belief stems from laziness as opposed to the desire to write good code.  There is a MAJOR difference between this viewpoint or reason for not writing comments vs the reason I am advocating.


    I went through some examples in my post which showed how writing self-documenting code eliminates comments and make the code more clearly understandable.


    There are instances where comments are going to be needed.  Which I also state in my post, (regex explanations for example).


    In general though, I am pretty confident the guidance I am giving out is 100% correct, and I am pretty convinced that I can prove this to be true to you.


    So, I challenge you.  Give me some piece of code that is heavily commented to explain what is going on.  I will refactor it to make it at least as readable, and most likely better by eliminating comments and replacing them with self-documenting code.


    Let your viewers decide if it is clearer or not.  If they say it is not clearer, I will admit defeat.


    By the way you might like this post:">">">">">