The Power of Comment Tag in Programming


2 min read

The Power of Comment Tag in Programming

The comment tag is used to insert comments in the source code and is not displayed in the browsers.

Most programmers never use comments on their code. some of the programmers that use comments mostly use it to comment out code that they perceive to be causing errors while debugging. I was guilty of that, but not till I realized its importance in my journey as a developer.

I was going through a code I wrote months ago with a tutorial guide and It took me hours trying to read it. That was my first project and I wasn't conversant with the concept, so I followed the tutor's step-by-step guide in writing the code.

The time I had spent trying to decipher the code would have been minimized if I had used comments in describing each line of code or every step taken in making the code work. That taught me a big lesson. Recently, I don't hesitate to use comments to describe every step of my code.

As programmers, we are not just learning how to code, we are equally learning how to become better programmers. Adopting the practice of always using comments on our codes will not just make it easier for us to edit or complete a project at a later date but also help people to easily read our code without feeling lost.

In summary, comments are very useful in explaining your code, which can help you save a lot of time when you want to edit the source code at a later date. This is especially useful if you have a lot of code. Make it a habit and don't forget to always make your comments descriptive enough.

Thank you for reading till the end ๐Ÿค—.