Spacing

Spacing? That’s right. Believe it or not, how you space and indent your code makes a big difference in its readability. Just like reading paragraphs in a book, understanding code gets hard if things aren’t spaced and indented properly.

And it’s not just for readability that spacing matters. Some authors of languages like Python and early versions of Fortran thought spacing was so important that your program wouldn’t even run if you didn’t space things correctly!

images/programming/spacing.png

The other thing that helps with making your programs easier to understand is grouping related things together.

When you group related things together and add a little something ...

Get The Way of the Web Tester now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.