Blog

From the minds of Division Overlay. Learn new techniques with our well formated tutorials, and get project updates all right here.

In this post I’ll take a look at the importance of putting comments in your code and scripts. It is especially important when offering free templates and free scripts, to give the user an idea of what each line means and how to use it.

When styling in CSS, I find it very useful to comment and format the way you code the sheet. If you have multiple IDs or classes with the similar names, or you have a style you normally don’t use, it’s a good idea to leave a little comment or two to remind yourself if, or when you go back to edit that sheet.

With formatting on the other hand, it can be an even greater process to utilize saving time in the long run. Deziner Folio has a great article about a new way to format CSS here. I have started formatting my style sheets this way, and it really does work.

JavaScript and other public programming scripts should ALWAYS contain comments. When working on a public program where many people may download your work to try out and use for them selves, it is necessary to add comments to nearly every line of code. This is so the people who download your work know what each piece of code means and how to implement the code into there own use.

I believe commenting is an important part of the creation of any website. The practical use of commenting and formatting of your CSS sheets and scripts is a echnique many do not employ. If utilized it will greatly affect the way you edit your scripts and styles, when you come back to the pages someday down the line to edit them.

Thank you for reading this entry. If you agree, disagree or just want to tell me what you think about commenting on code, please don’t hesitate to leave a reply. Have a good day.

Written by Tyler

Web designer, developer, Funny guy, Thinker, Music lover. Follow me on Twitter @tjefford

You can leave a response, or trackback from your own site.

Leave a Reply