John Costanzo

Commenting Your Code

One of the things that a lot of people over look when coding is adding comments to it. Everyone should comment their code and there is no reason why you do not need comments. Even if you are writing something for your own use you still should comment on that code. Here are a few reasons why you should comment:

  • Makes reading code easier.
  • Helps someone understand your code when they are new or have not read it recently.
  • It shows that you understand the standards of coding

Commenting is one thing that I myself find that I lack but I work on it to make sure its there. I am not stating that you have to comment every line but you should try to keep it to every 4 to 5 lines. Be brief in your comments and get to the point. So look at your code and see if there are comments there. If not you should start to add some. I hope this helps.