Forum Moderators: open
In html I never really made notes about the code I was writing. I guess that is because it's east to see the results. I see more notes when I see coding in scripting language.
How important is it?
How important is it?
It's very helpful.
You don't need to go overboard so that you're commenting every line. In most cases it's fine to just to label blocks of code with short statements like "building SELECT query", "formatting email message", "initializing variables", that kind of thing...
it's also nice to explain what the script does at the very top so later if you're looking for the script that formats the search results page, for example, it'll be easy to find.
Whenever you do something that's a workaround, a kludge or otherwise non-standard thing then DO explain it in detail so that whomever reads it in the future understands why and what you were trying to do.