Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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?

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