Working Is Only One Requirement

There is code I would be deeply suspicious of if I found it inside a large system, and perfectly happy with if it lived in a small script.

Not because scripts somehow follow different rules of programming. I just expect different things from them.

A script might rename a few thousand files, migrate some data, or generate a report once a month. If it does that reliably, it has done its job.

For software that a team will be changing for the next five years, that is no longer enough.

Scripts Get to Be Simple

A good script does not need much ceremony. If it reliably renames the files, moves the data, or produces the report, there is a perfectly reasonable point where you stop improving it and go home.

You could still give it clean layers, elegant abstractions and a carefully modeled domain. You could also remember that it is a 150-line migration script which may run six times and then disappear forever.

Nobody expects three developers to be adding features to it in parallel two years from now. In that context, the most important property is fairly obvious:

it works.

A prototype is similar. Its job is usually to answer a question: Does the idea work? Is the algorithm fast enough? Does this workflow make any sense?

That kind of code can get away with things that would make me nervous in a system I expected to maintain.

Maybe it gets cleaned up later. Maybe it gets rewritten completely. Maybe two days later we learn that the idea was bad and the repository quietly returns to wherever prototypes go when they die.

At that point, structure is not the main concern.

Illustration of a rabbit and another figure at a workbench: on the left, a chaotic pile of stones and an improvised vehicle; on the right, sorted building blocks and a clearly structured model house.

Then It Doesn’t Go Away

Things get more interesting when that code turns into software.

There is usually no dramatic moment where this happens. Nobody rings a bell and declares the prototype production-ready.

Instead, another requirement arrives. Then another one. Someone adds a second variant. A new colleague touches the code for the first time. Three months later, something has to change that nobody had in mind when the first version was written.

The code may still work exactly as well as it did on day one. Functionally, nothing is wrong.

What changed is what we need from it.

Now I want to know where a new rule belongs. Which part of the system owns a responsibility. Whether an assumption applies only here or to the whole system.

And if I change one method, it would be useful to know which three unrelated things I am about to break by accident.

The fact that the feature works does not answer any of those questions.

Structure Has a Job

I think this is where discussions about software structure sometimes get slightly confused.

Structure is not decoration for developers who like their code tidy. And it certainly does not make a program correct.

A beautifully structured system that sends the wrong invoice is still a bad system.

Structure solves a different problem: it makes software easier for people to understand and change.

If responsibilities are clear, it is easier to see where a change belongs. If the concepts in the code match the concepts in the domain, there is less translation to do in your head. If boundaries are deliberate, you can work inside one part of the system without understanding every other part first.

The compiler cares surprisingly little about any of this. A 4,000-line service is completely acceptable to it as long as the syntax is valid.

Humans tend to be more difficult.

What the Code Remembers

One thing I underestimated for a long time is that structure can act as stored understanding.

Somebody once worked out that these two things belong together and those two do not. That this rule belongs in the domain rather than in a controller. That two workflows which look almost identical are actually different concepts.

Good structure leaves those decisions behind in the code.

That does not mean every abstraction is valuable. An abstraction nobody understands anymore is not preserving much knowledge.

Mostly it is preserving an interface and a mystery.

But when structure works well, the next developer does not have to rediscover everything from scratch.

Some of what previous developers learned about the system is already reflected in the way the system is shaped.

“But It Works”

This is probably why two developers can look at the same code and come away with completely different opinions.

One sees the current feature and says:

It works.

The other is already imagining the next change.

Both can be right.

If the code needs to run once, spending two days restructuring it is probably a waste of time. If people are going to change it every month for the next five years, the calculation looks different.

The question is not whether functionality or structure matters more. The question is what this piece of software will need from us over the rest of its life.

A script can simply work. A prototype can answer its question and then disappear.

For a system that a team will live with for years, I expect more.

Not because long-lived software has to be beautiful.

Because someone has to open it again tomorrow.

Two Different Questions

Functionality answers one obvious question:

Can the software do this?

Structure answers another:

Can we keep changing it?

For small or short-lived programs, the first question may be all that matters. The longer software lives, and the more often people have to change it, the more important the second one becomes.

The software itself does not need to do anything new for that to happen.

It just needs to survive long enough for somebody to come back and change it again.