SR
0%5 min left
All posts
5 min read2

The best code I write makes itself disappear

Nobody should have to learn how the machine works just to flip a switch. This is why I build the boring helpers nobody notices, and why it's the work that matters most.

The best code I write, nobody thanks me for

We spend enormous effort on how a product feels to use. We spend almost none on how the code feels to work in. That second thing has a name, developer experience, and it is invisible to everyone except the people living in the codebase. This is about why it still matters, and why the work that fixes it almost never gets noticed.

My best work this year has no screenshot.

No demo. No line in a release note. No little round of emoji in a channel. If I tried to show it to you, you would squint and say "okay, and?"

That is the strange thing about it. The code I am proudest of is the code nobody can see I wrote.

We obsess over UX. We ignore DX.#

UX is how the product feels to the person using it. We pour energy into that. We argue about spacing, loading states, the wording on a button.

DX is how the code feels to the person working in it. The next developer who opens the file. Often that next developer is you, three months from now, having forgotten everything.

Both are real experiences. We treat only one of them as real.

Good DX is mostly about saving the next person's time. Nobody should have to learn how the machine works just to flip a switch. If a developer has to stop and dig through the codebase to figure out how the app even toggles a feature, that time is gone, and it gets spent again by the next person, and the next.

And bad DX has a very clear smell. To change one thing, you have to change it in ten places.

The afternoon it actually mattered#

Here is what that smell costs you.

We hide unfinished features behind switches. To check a switch, you read its name and test its value, and getting that exactly right takes a small bit of care.

One day I had to touch one of those switches. I went looking, and found the same check copy pasted by hand across a dozen files. Change one, miss the others, and the feature is half on and half off. In fact a bug exactly like that had already shipped, a feature showing up for people when it was meant to be hidden, because one of those copies was subtly wrong.

That is the worst kind of bug. Nothing throws. Everything runs. It just quietly does the wrong thing until a real person sees it.

So I did the unglamorous fix. I wrote the check once, the correct way, and gave it a name:

function useFeatureFlag(name) {
  // the one correct way to read a switch, written once
  return isFlagOn(name);
}


Now there is one place to get it right, and everywhere else just asks. Ten chances to get it wrong became one place that is correct. More than that, nobody who comes after me has to learn how flags work under the hood. They call one thing and get back to the job they actually opened the file to do.

Then the even more boring half. The switch names were typed by hand too, where a single typo silently turns a feature off. So I put the names in one list you pick from instead of retype. Misspell it now and your editor underlines it before you save. The bug that used to reach production became a red squiggle on your screen.

None of this changed a single pixel. That is the point.

Why DX is the work nobody rewards#

Let me be honest about the catch, because nobody tells you this part early.

DX work does not feed you.

Ship a feature and you get a hit. Someone reacts, you feel seen, it shows up when people list what got done. Spend a day making a flag changeable in one place instead of ten, and you get nothing back you can point to. The person you saved six months from now will never know. They will just not hit the bug, and move on.

So you keep choosing between the work that gets noticed and the work that makes the codebase liveable, and only one of them claps for you.

Early on I chased the loud stuff, because loud is what gets seen, and when you are new you badly want to be seen. It took me a long time to trust that good DX is worth building even when nobody can tell you built it.

What it pays back instead#

It does pay back. Just not in applause.

You stop fighting the same fire twice. The code stops surprising you. People start copying your patterns instead of correcting your code. One day you notice your little helper is everywhere and nobody remembers it was ever missing.

And quietly, you become the person teammates trust with the messy parts. That trust outlasts any single demo. It just arrives slowly, and without a notification.

If you are early and want to stand out#

Here is the move that took me too long to learn. Treat the next developer like a user, and the code they touch like a product.

  • Find the fiddly thing everyone re-types and hide it behind one good name.

  • Make "change it in ten places" into "change it in one."

  • Make the mistake turn red in the editor instead of quiet in production.

None of it will get you a demo. All of it is DX, and DX is what makes a codebase, and an engineer, worth keeping.

Do the work nobody thanks you for. It is usually the work that mattered most.

Keep reading

Related posts

Jun 1, 20267 min

I worked with two coding gods. It was never about speed.

One had the entire frontend memorised and ended a months-long migration with one hook. The other was the one every hard decision ran through. Neither was the fastest engineer in the room.

CareerSoftware Engineering
Read
Jun 17, 20268 min

How scaled products actually deploy frontend and backend

Deploying looks simple until real users and real money are on the line. Here is how big products really deploy their frontend and backend, and why one small git tag sits at the centre of it all.

DevOpsSoftware Engineering
Read
Jun 14, 20263 min

How product companies actually manage their git branches

I've worked at a few product companies, and they manage branches one of two ways: copy every change by hand, or only ever move it forward. One of them quietly breaks.

Software EngineeringDevOps
Read
Jun 13, 20265 min

Every weekend is a learning opportunity

My weekends, not my job, are where I actually get better at this work. Here is what I do with the only two days nobody else gets to spend for me, and why it matters more than the forty hours.

CareerPersonal
Read
May 24, 20266 min

I built FreeClothes.in to learn what a day job won't

I built FreeClothes.in to learn what a day job won't teach you. The honest why, the deploy pipeline I'm proudest of, and the morning I broke my own production database.

DevOpsPersonal
Read
May 16, 202610 min

Breaking Into a Product Company in Less Than 2 Years

Most people say the service-to-product jump takes five years, a tier-1 college, and luck. I made it to LambdaTest in under two years with none of those. Here is the real playbook.

Software EngineeringInterview Prep
Read