Article
Contracts & Money in Software Engineering
A reflection on code contracts, the economics of explicitness, and how AI may loosen one of software engineering's oldest tradeoffs.
Before you think this is an article about writing contracts for software engineering gigs, it is not.
At least not legal contracts.
I am talking about contracts in code.
Types. Interfaces. Abstract classes. Structs. Schemas. Tests. Boundaries. The little enforcement mechanisms we use to make software say, as clearly as possible, what it expects from the rest of the system.
Different languages give us different tools.
PHP has abstract classes and interfaces.
TypeScript has types.
Rust has structs and traits.
Databases have constraints.
APIs have schemas.
They all exist for different reasons, but they share one important purpose:
They enforce something.
Software engineers often say we should prefer explicit over implicit when possible.
That principle sounds obvious until money enters the room.
Because explicitness has a cost.
It takes time to define the contract. Time to model the edge cases. Time to decide what should be allowed, what should be rejected, and what should never be representable in the first place.
Ask almost any engineer whether it is faster to build with proper enforcement or without it, and they will usually give the same answer.
It is faster without it.
At least at first.
And time, as businesses are constantly reminded, is money.
That is where the pressure begins.
Software teams are often told, directly or indirectly, that they can choose only two things:
Speed.
Security.
Stability.
Under pressure, speed almost always wins. Security usually has enough visible risk to stay in the conversation. Stability, though, is easier to postpone.
Until it is not.
So the contracts get skipped.
The types get loosened.
The abstractions stay informal.
The tests come later.
The schemas are implied instead of enforced.
Everyone understands why it happens. Most software engineers have participated in that tradeoff at some point. I certainly have.
But I think something important is changing.
AI is beginning to alter the economics of explicitness.
It does not remove the need for judgment. It does not magically make bad architecture good. It does not understand your business better than your team does.
But it does reduce the cost of careful work.
It can help generate the boring scaffolding. It can make type definitions less tedious. It can help write tests around known behavior. It can reveal mismatches between what a system says it does and what the code actually permits.
In other words, AI may make it cheaper to build with contracts.
That matters.
Because when the cost of doing the careful thing goes down, the old excuse gets weaker.
Maybe the future of software engineering is not simply faster output.
Maybe it is faster explicitness.
Faster enforcement.
Faster clarity.
Faster stability.
For years, teams have treated speed, security, and stability like a triangle where one point always had to be sacrificed.
I am not sure that will remain true.
And honestly, I am relieved.
Because software does not become trustworthy by accident.
It becomes trustworthy when the right things are made explicit, enforced, and maintained.
If AI helps us do more of that without slowing the business to a crawl, then one of the oldest tradeoffs in software may finally start to loosen its grip.