Geeks With Blogs

News
David Madden Mastering the craft one mountain at a time.
It is a good practice to leave comments in your code.  Knowing what the hell you were thinking or later intending can be salvation for yourself or the poor soul coming behind you.  Comments can leave clues to why you chose one approach over the other.  Perhaps staged re-engineering dictated that coding practices vary.

One thing that should not be left in code as comments is old code.  There are many free tools that left you version your code.  Subversion is a great tool when used with TortoiseSVN.  Leaving commented code scattered all over will cause you to second guess yourself, all distraction to the real code, and is just bad practice.

If you have a versioning solution, take time to go back through your code and clean things up.  You may find that you can remove lines and leave real comments that are far more knowledgeable than having to remember why you commented out the old code in the first place.
Posted on Wednesday, November 28, 2012 10:13 AM | Back to top


Comments on this post: Comments in code

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © DavidMadden | Powered by: GeeksWithBlogs.net | Join free