The fkra blog
· 2 min

Read the history before you read the code

A short post about four git commands went to the top of Hacker News. It describes how an expert enters a room they do not know.

Somebody wrote up the git commands they run before reading any unfamiliar code. It went to the top of Hacker News with 2,338 points.

For a post about four commands, that is a strange amount of agreement, and the commands themselves do not explain it.

The commands are ordinary: who touched this most, what changed recently, which files move together, what the log says about this function. Any of us could list them.

People recognised the order, history first and source second.

Where a beginner starts, and where an expert starts

Put two engineers in front of a codebase neither has seen.

Question

Beginner opens

Experienced opens

Where do I start?

The entry point, then reads down

The log, to see what is alive

Is this important?

Reads it to find out

Counts how often it changes

Is this safe to touch?

Cannot tell

Checks who last touched it and why

What is the real shape?

The folder tree

Which files change in the same commit

The beginner reads the code as a text. The expert reads it as a record of decisions, and a record tells you what mattered enough to change.

Why this is hard to teach

Nobody taught the expert this either.

They learned it by being burned. They rewrote a file that turned out to be load-bearing. They spent a day understanding a module that nothing has called since 2021. After enough of those, you stop opening the folder tree first.

So this kind of knowledge never makes it into onboarding. The README leaves it out, because whoever wrote the README already had it and did not notice they were using it. It is compressed experience, and compressed experience is invisible to the person carrying it.

So it gets rediscovered, one burned engineer at a time, and then somebody writes it up and 2,338 people say "yes, that".

The version you can act on

If you run a team, this is a cheap win and almost nobody takes it.

Next time someone joins, sit with them and open the log before you hand over the architecture doc. Say out loud why you are looking at what you are looking at: "This file changes every sprint, so it is the live one", "Nothing has touched this since 2023, ignore it for now".

Twenty minutes of narrated orientation transfers more than a week of reading, and it costs you only those twenty minutes.

The original post is short. Read it, then go and narrate your own first ten minutes to whoever joined last.

0
12 views
engineeringonboardinglearning
MA
mosab alrasheed
Get the next entry

One email when we publish. Research, product decisions, and what teams report back.