JavaScript DOM Scripting By Example Improving the Application Code Refactor 1: Create List Items

Eric Castillo
Eric Castillo
6,333 Points

Refactoring with Joel - Comments

There is tons of code by this point of the creation of this webpage. The code before and even after refactoring looks insane. Joel is not using comments but seems to navigate his way through without issue. I have to put comments in my own code to help me navigate the page easier.

Do experienced developers normally use comments in the initial creation stage? Through practice, do you learn to navigate and read through code without needing comments? Do they put them in after the program is finished to share with other developers?

Greg Schudel
Greg Schudel
4,090 Points

Comments need to be minimal and to the point. This particular class avoids comments since Joel is focusing on some very specific procedures.

Use comments on the code your doing but don't make them until you have made the snippet of code work. (You don't want to comment on something only to find out you misunderstood it.)