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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s