Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

Eric Castillo
Eric Castillo
6,427 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?

1 Answer

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.)