Code Readability

The Big Idea

Code is read far more often than it is written. Writing readable code is not a nice-to-have — it is a professional skill that makes you easier to work with and your code easier to maintain.

Your Roadmap

SectionTimeRequired?
What is code readability?10 min⚑ Required
Research45 min⚑ Required
Reflect20 min⚑ Required
Extra Resources◎ Optional

What is code readability?

Code readability is about writing code that another developer can pick up and understand without having to ask you questions.

You will rarely work alone. Even if you do, future-you reading your own code in six months is effectively a different person. Clear code saves time for everyone.

Readable code habits include:

  • Indentation and formatting — consistent, standard style throughout
  • Naming — functions and variables named for what they actually do or hold
  • Small functions — each function does one thing
  • DRY (Don't Repeat Yourself) — no duplicated logic
  • Comments where logic isn't obvious — not comments explaining obvious things
  • Refactoring — returning to working code to make it cleaner

Research

Start with this article:

Formatting and Indenting Your HTML — Scott Granneman

This is the standard indenting style to use in all your code from this point on.

Then spend 30–40 minutes searching for articles and resources on code readability. You are looking to build your own understanding — what habits are most commonly recommended, and why?


The Big Idea (revisited)

Code is read far more often than it is written. The habits you build now — consistent formatting, good naming, small functions — make you easier to work with and your code easier to maintain.


Extra Resources

These are optional. Use them if you want to go deeper.