Skip to content
All posts
Engineering7 min read

Reading Code Faster: Five Habits That Compound

Most of the job is reading, not writing. Getting faster at it did more for my output than any other skill I have deliberately practised.

Ari Bennett

Software engineer and writer

Lines of code shown close up on a dark screen
Lines of code shown close up on a dark screen

Most of my job is reading, not writing. Every feature starts with an hour of working out how something already works, and for years I treated that hour as overhead. Getting faster at it did more for my output than any other skill I have deliberately practised.

Five habits, in the order they helped.

Read the tests first

The tests tell you what the code is expected to do, in the vocabulary the team actually uses. They contain the edge cases somebody was bitten by, which is a better map of the risk than any comment.

When there are no tests, I read the change that introduced the feature instead. Both are documentation written by somebody who had the full picture at the time.

Trace one path, not the whole system

The mistake I made for years was trying to understand a module. Modules are too abstract to hold. Now I pick one concrete journey, the narrowest useful one, and follow it end to end: this button, this request, this row, this response.

One traced path teaches you more than a day of browsing, because it gives you a spine. Everything you learn afterwards attaches to it.

Name the shape out loud

After tracing, I write two or three sentences describing the shape in plain language. "Requests come in through one handler, which validates and hands off to a service per resource. The services talk to the database directly. Nothing is cached."

If I cannot write those sentences, I have not understood it, I have only visited it. This takes two minutes and it is the difference between reading and learning.

Follow the data, not the calls

Call stacks tell you what happens. Data tells you what matters. When something confuses me I stop reading functions and start asking where a piece of state is created, where it changes, and where it is finally used.

Most bugs live in the gap between where a value is set and where somebody assumed it was set. Reading for data finds those gaps. Reading for control flow tends to walk straight past them.

Keep a map, not notes

For anything I will return to, I keep a short file: entry points, the three files that matter, the surprising decision, and the thing that will bite me. Half a page, corrected whenever I am wrong.

Notes are a transcript. A map is a tool. The test is whether it helps when you come back in four months having forgotten everything except that you once knew this.

Speed at reading code is not about reading faster. It is about deciding sooner what you can safely skip.

What made the biggest difference

Accepting that I will not understand all of it, and choosing on purpose what to leave dark. There is always more code than time, and pretending otherwise is what turns an hour of reading into a day.

Written by

Ari Bennett

Software engineer and writer

I build web software for a living and write about the parts that are hard to search for: the trade-offs, the dead ends, and the small habits that make a codebase pleasant to come back to a year later. A decade in, I still keep a paper notebook next to the keyboard.

More about the writer

Related posts

Browse the archive
Tooling

The Case for Boring Tools

The tools I have kept are not the ones that impressed me. They are the ones that never asked for my attention again.

Ari Bennett · 6 min read

Before you go

Get the next one by email.

If this was useful, the newsletter is the same thing in short form every second Wednesday. One useful item per issue, nothing else.

One short issue every second Wednesday. No tracking, no forwarding, unsubscribe in one click.