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

General Discussion

When writing your codes should you have spaces between lines so that you can find things easier and faster?

Or is that a no no and the entire page should just be a gigantic block of code?

1 Answer

I prefer to keep things very neat and tidy. Most of my code has new lines between different sections, not necessary every single line, but I like to keep it each section of code (header, image gallery, footer) each in its own block. It makes things easy to read. I also use comments pretty frequently to mark the start and beginning of a section/div etc.

Ultimately it comes down to personal preference, and if you like spaces between every line go ahead and do it. It looks neat and tidy.

I dont recommend it being one gigantic blob of code, but as I said its personal preference and if you like it and can read it easily thats fine, however if you work with others that have to go through your code they might not like that as much haha.