Clean Code Is Not About Being Clever. It Is About Being Kind to Your Future Self.

by Eric Hanson, Backend Developer at Clean Systems Consulting

The Code Review Nobody Warned You About

There is a particular kind of humbling that happens when you return to your own code six months after writing it. You open the file, read the first method, and think: who wrote this? Then you check the git blame and realize it was you, in what was apparently a very different mental state, optimizing for something you can no longer reconstruct.

That experience is not a sign of bad code in the conventional sense. The logic may be correct. The tests may pass. But you wrote it for the version of yourself who had full context — the one who knew why the cache key was structured that way, why the timeout was 7 seconds specifically, what edge case that nested ternary was protecting against. That context is gone. And now the code is illegible.

Clean code is not a style preference. It is a form of time travel — writing for the person who will read this under pressure, without your context, possibly at 2am during an incident.

What Cognitive Load Actually Costs

Every time a developer reads code, they are loading a mental model: what does this function do, what are its inputs, what are its side effects, where does control flow? Working memory is limited. When code is dense, inconsistently named, or clever in ways that require re-reading, that model costs more to build — and more importantly, it costs more to rebuild every time the file is opened.

On a codebase touched by dozens of engineers over years, that cost accumulates. A study of professional developers (conducted by Feuerriegel et al. at LMU Munich, using eye-tracking and EEG on 45 developers reading production code) found that code comprehension takes significantly more cognitive effort than code writing. This is not surprising if you've ever spent ninety minutes understanding a thirty-line function.

The practical implication: the time you save writing clever, compact code is paid for — with interest — by every person who reads it afterward. This is not theoretical. It shows up in code review time, in bug introduction rates during modifications, and in the confidence level of engineers making changes to unfamiliar modules.

The Specific Habits That Help

Name things as if the reader has no context

// This is cute for exactly the thirty seconds it takes to write it
int d = (int) ((t2 - t1) / 1000);

// This is legible six months from now
int sessionDurationSeconds = (int) ((sessionEndTime - sessionStartTime) / 1000);

Variable names are free. Use them.

Don't make the reader hold state in their head

// Requires the reader to track what flag means across the whole method
boolean flag = false;
if (user.isActive()) {
    flag = processPayment(order);
}
if (flag) {
    sendConfirmation(user, order);
}

// The condition tells the story
boolean paymentSucceeded = user.isActive() && processPayment(order);
if (paymentSucceeded) {
    sendConfirmation(user, order);
}

Comments explain why, not what

// BAD: restates the code
// Set timeout to 7000
client.setTimeout(7000);

// GOOD: explains the constraint that isn't visible from the code
// Downstream billing service SLA is 5s; 7s gives buffer for retries
// before our own request timeout kicks in at 10s
client.setTimeout(7000);

The code tells you what is happening. The comment tells you why someone chose to do it that way — the information that is genuinely lost if not written down.

The "Clever" Trap

There is a category of code that is impressive and harmful in equal measure: the kind that demonstrates the author's deep knowledge of the language or runtime at the expense of the reader's ability to understand it quickly.

One-liner stream pipelines that chain six operations. Bit manipulation tricks that avoid a conditional. Recursive solutions to problems where an iterative approach would be immediately obvious. These are satisfying to write and expensive to maintain.

The question to ask before merging something clever: if a competent engineer who doesn't know this codebase had to modify this under pressure, how long would it take them to understand it well enough to do so safely? If the answer is more than a few minutes, the cleverness is a liability.

What This Is Not Saying

This is not an argument for verbose, over-commented code. Padding a function with unnecessary variable assignments in the name of clarity is its own kind of noise. The goal is not more code — it is code whose intent is legible at a glance.

It is also not an argument against performance optimizations that require non-obvious implementation. When you optimize for performance at the cost of readability, you earn the obligation to document what the code is doing and why the obvious approach was insufficient.

The Practical Takeaway

Before merging your next PR, read through it as if you have never seen this codebase and it is six months from now. Where do you have to stop and re-read? Where do you find yourself wondering why a decision was made? Those are the places to add a rename, a comment, or a small refactor.

It takes ten minutes. It saves hours — yours and everyone else's.

Scale Your Backend - Need an Experienced Backend Developer?

We provide backend engineers who join your team as contractors to help build, improve, and scale your backend systems.

We focus on clean backend design, clear documentation, and systems that remain reliable as products grow. Our goal is to strengthen your team and deliver backend systems that are easy to operate and maintain.

We work from our own development environments and support teams across US, EU, and APAC timezones. Our workflow emphasizes documentation and asynchronous collaboration to keep development efficient and focused.

  • Production Backend Experience. Experience building and maintaining backend systems, APIs, and databases used in production.
  • Scalable Architecture. Design backend systems that stay reliable as your product and traffic grow.
  • Contractor Friendly. Flexible engagement for short projects, long-term support, or extra help during releases.
  • Focus on Backend Reliability. Improve API performance, database stability, and overall backend reliability.
  • Documentation-Driven Development. Development guided by clear documentation so teams stay aligned and work efficiently.
  • Domain-Driven Design. Design backend systems around real business processes and product needs.

Tell us about your project

Our offices

  • Copenhagen
    1 Carlsberg Gate
    1260, København, Denmark
  • Magelang
    12 Jalan Bligo
    56485, Magelang, Indonesia

More articles

The Struggle of Trying to Look Busy for Clients

You’ve just sent an update to a client and now find yourself staring at your screen, wondering what to do next. Looking busy can feel like a full-time job on its own.

Read more

Amsterdam Backend Salaries Hit €100K. Here Is How Startups Avoid That Overhead

Your next backend hire in Amsterdam will probably cost you six figures before you even factor in the 30% ruling changes and mandatory benefits. That number used to be reserved for staff engineers. Now it's table stakes for anyone decent.

Read more

Samsung, Kakao and Naver Hire Seoul's Best Backend Developers — Here Is What Startups Do

Seoul produces exceptional backend engineering talent. The companies with the longest recruiting pipelines and the largest comp budgets get there first.

Read more

Configuring Spring Boot for Docker and Kubernetes — Health Probes, Graceful Shutdown, and Resource Limits

Spring Boot applications deployed to Kubernetes need specific configuration to behave correctly under orchestration — proper health probes, graceful shutdown, container-aware resource limits, and externalized configuration. Here is the complete setup.

Read more