"I have no time for brainstorming, for iterative learning… we need framework experts to go faster." It is a sentence that sounds like a sensible wish for speed. It is the start of a slow and expensive failure.

What is the painful fact about our profession?

In 2021, due to the exploding number of tools and frameworks, programming looks more like an integration and configuration activity than an engineering and creation activity. Developers are more concerned with learning up-to-date frameworks than with working on their engineering and design skills.

The result is a title problem. We have more and more integration architects and configuration designers hidden under the mask of a software architect. They know the tools very well. The question is whether they know the problem.

Knowledge focused on buzzwords and the newest technologies gives software products that are twisted and over-engineered to fit inside a requested model, illogically, and heavily based on marketing. The consequence is trivial: the product becomes a messy and inconsistent puzzle. The old name for it is the Big Ball of Mud, described by Brian Foote and Joseph Yoder in 1997. The frameworks changed. The mud did not.

Have you already seen this scene?

A déjà vu, as I wrote it back then:

Programmer: Okay, we did the design… Hum… for this version of the software, we will use Kafka, React, RabbitMQ, Spring Boot, Spring Batch, Spring Cloud, AWS and Exonum.

Business: Congratulations! Very happy to work with software experts.

Few months later…

Programmer: We can't add that business logic. It doesn't fit the architecture…

Business: But it is urgent, our clients need that feature… It is just an extension!

Programmer: Sorry, but we need to rewrite the software using newer technologies… it doesn't fit the frameworks used in the legacy.

Look at what was never said in the first act. Not one word about the problem, the users, the rules of the business, or what is likely to change. The first sentence of the design was a shopping list. The architecture was chosen before the questions were asked.

Why does choosing the stack first make software rigid?

Frederick Brooks separated two kinds of difficulty in software. The essential complexity comes from the problem itself: the rules, the cases, the exceptions of the business. The accidental complexity comes from our tools and our way of working. Frameworks help with the accidental part. They cannot touch the essential part, and nobody can design it in a shopping list.

The mechanism of the failure is simple:

  1. A framework brings its own model of the world: its lifecycle, its annotations, its data flow.
  2. The business logic is written inside that model, in the framework's words.
  3. The business changes, and the new rule does not fit the model.
  4. The rule is not wrong. The model was never made for it. The only way out is to rewrite.

David Parnas wrote in 1972 that a good decomposition hides the design decisions that are likely to change. A framework is exactly such a decision. When it is spread across the whole code, it is hidden nowhere. Robert C. Martin says the same thing from the other side in Screaming Architecture: the structure of a system should tell what the system is for, and frameworks are details to be deferred.

Know your product: what is a software?

SOFT-WARE: changeable product. It is the inverse of HARD-WARE.

If you rewrite the software to adapt it to a change, then it is more like hardware than software. We do not pay for the code. We pay for the ability to change it. A product that cannot absorb "just an extension" has lost the property that gave it its name.

That is the question I put to every stack proposal: does it keep the software soft?

How can we use frameworks without being used by them?

I am not against frameworks. They are excellent at their job. The point is the order of decisions, and where the framework lives in the code. What I recommend:

  1. Start from the problem, not from the tools. Engineering is about solving problems first. Implementing the solution comes next.
  2. Speak the language of the business in the code, and keep that language free of framework types.
  3. Keep the frameworks at the edges: the web layer, the database, the messaging. The rules of the business stay in plain code that you can test in a second.
  4. Defer, prove and challenge each technical decision. Build a thin walking skeleton, learn from it, and only then commit.
  5. Choose boring when you can. Rich Hickey reminds us that simple and easy are not the same word. A tool that is easy to start with can be the most complex one to live with.
  6. Measure change, not speed of the first sprint. How long does it take to add the next feature? That number decides.

Brainstorming and iterative learning are not luxuries to be dropped to go faster. They are the work. Niklaus Wirth warned in 1995 that software gets slower more quickly than hardware gets faster, because we keep adding what we do not need. The only way to go fast is to go well.

💡 A framework expert knows the tools. An engineer knows the problem. You need the engineer first.

A word to the wise: it is never too late to change habits!

Resources and bibliography

First published on LinkedIn: the original article