Article
Keep the Kitchen Clean
Engineering discipline feels expensive when everything is calm. Its value appears when the pressure starts.
A few years ago at SWIFT, I joined a greenfield project called Anomaly Scoring.
The component was an event-driven backend built around Kafka Streams. It consumed payment events, maintained aggregates, and used those aggregates when processing scoring requests. It also had to communicate with two other applications through Kafka.
Technically interesting, yes.
But that is not really the story. The interesting part is what we decided to do before the project became complicated.
A clean kitchen does not stay clean by itself
Greenfield projects are a privilege. No legacy code. No ten-year-old deployment procedure nobody dares to touch. No mysterious test suite that fails every second Tuesday. No technical debt inherited from people who left five years ago.
We had a clean kitchen.
The problem is that a clean kitchen becomes a dirty one very quickly, and usually for good reasons. There are features to deliver. There is a roadmap. Adding tests, automating a deployment or building a dashboard never looks as urgent as the next story in the backlog. So it gets postponed. And a few months later you no longer have a greenfield project. You have a young legacy one.
That is when it becomes really expensive.
Adding tests to software that was not designed to be tested is a different job than writing them from the start. Fixing accumulated defects is not one afternoon of work. And there is a much harder problem: who is going to approve two weeks of work to clean up something that already runs in production? Nobody wants to pay for that. So the mess stays, and everyone learns to live with it.
Doing it properly from day one has a cost too. I will come back to that cost, because it is real. But it is always the cheaper one.
Why the bar was high in the first place
It helps to know where we were.
SWIFT is critical financial market infrastructure. Thousands of institutions depend on it, it is heavily regulated, and security controls are everywhere. You do not push something to production because it works on your machine and the demo went well. You need evidence: test reports, quality and security results, release documentation, approvals, a change window.
That context is not an obstacle to work around. It is the job. But it also means that everything you do manually, you will do again, and again, under conditions that get less comfortable every time.
We made the pipeline enforce our principles
We wanted clean code, but saying “we care about clean code” is easy. So we made it measurable. Sonar was part of the pipeline and the quality gate was blocking. If the code did not meet the expected level, the pipeline stopped. Not a warning. Not something to fix before the next release. It stopped.
Every feature branch went through the same flow: build, tests, static code analysis, security checks. Then the application was deployed on OpenShift in an isolated review environment, and our end-to-end tests ran against that real deployed application.
That last part was not a luxury in our case. A stateful Kafka Streams application maintaining aggregates and talking to two other systems cannot be validated seriously with mocks alone. You need real topics, real partitions, a real deployment. Performance mattered as well, and it was an explicit requirement. Change the way you do repartitioning and you can degrade throughput without noticing it in any unit test.
The idea behind all of this was simple.
Engineering principles should not depend on someone remembering them. The platform should enforce them.
We applied the same thinking to deployments, with one decision taken very early: no shortcuts on staging. If something had to be automated for production, it also had to be automated in staging. No manual deployment because “it’s only staging.” No temporary procedure that would supposedly be automated later. Either we could deploy it automatically, or we were not done.
We also invested in observability from the beginning, instead of waiting for the first production incident to discover how our application behaved. We separated business events from technical logs. One helped us understand what the system was doing, the other how it was doing it. On top of that we built technical and business dashboards: volumes processed, execution times, evolution over time.
None of this was strictly required to implement the first feature. The application could have worked without it.
That is exactly the trap.
What it actually cost
I want to be honest about this, because articles like this one often skip it.
It is hard to give a total number, because the cost is spread everywhere. Everything takes a bit more time. Every story carries a little extra work. That is exactly why it is so easy to cut.
Some parts are easier to estimate. The pipeline with the review application on OpenShift took roughly a week of work for one engineer. Automating the release documentation, the acceptance test reports and the evidence took about a sprint for one person, plus small fixes here and there afterwards.
Now compare that to the other side. We were four developers pushing regularly for a year, which means hundreds of feature branches going through that pipeline. Every one of them got a real deployed application, a full end-to-end run, and a review environment that anyone could open, without a single person having to deploy anything on OpenShift by hand.
For the evidence, producing it manually was around half a day. Every time. And sometimes twice, because you notice at the very end that an artefact is missing something ^^”.
One week, once, against hundreds of times. It is not a close call.
There is one condition I should mention, though. We did not waste that effort because we already knew the environment. Years at SWIFT told us which controls, which evidence and which constraints would actually apply to us, so we built the things we knew we would need. If you do not know your context yet, the risk is different: you can spend that same week automating something nobody will ever ask you for.
Everybody has to be on board
The other reason this worked is less technical, and probably more important.
The team was aligned on it. And so was our Product Owner.
That matters more than any tool. If the people deciding priorities see this work as engineers polishing their toys instead of delivering value, it will lose every arbitration against a feature. Not because anyone is acting in bad faith, but because features are visible and pipelines are not.
So it has to be explained, and it has to be framed in terms the whole team cares about: fewer surprises before a deadline, faster fixes, less pressure at the worst possible moment. In our case that conversation happened early, nobody had to fight for it later, and it made everything else possible.
The boring work is rarely painful the first time
Doing something manually once is usually fine. You create the release note, you write the acceptance test report, you execute the deployment procedure, you collect the evidence. It takes time, but everybody is motivated. It is the first release.
Then you do it again. And again.
Deadlines get closer. Pressure increases. Someone discovers a bug two days before production. And suddenly the same task you happily accepted six months ago becomes the annoying part of the process.
That is when the shortcuts start appearing.
“We already tested that.” “Just reuse the previous release note.” “The deployment procedure did not change.” “We will fix the pipeline later.”
The problem was never that people are unable to follow a process. The problem is that we knew that, under pressure, people eventually get tired of repeating it.
So we automated the boring parts: release notes, acceptance test reports, test evidence, and the different documents needed to reach production. Not because doing them manually was impossible, but because we knew exactly when they would become painful.
Then our first production deployment failed
And this is where the investment paid off.
The problem was a configuration issue on one of our Kafka topics. The production setup was not identical to our staging environment, and we only discovered it there.
The code fix took around five minutes. Then we pushed it, and the pipeline took over. The application was rebuilt. The tests ran again. The quality and security checks ran again. It went through the environments again. The evidence was regenerated, the release documentation updated.
Around two hours later everything had been revalidated, and we were ready for the next production deployment.
In a more manual process, getting that same fix fully revalidated and approved easily becomes a week. Not because of the code, but because of everything around it: re-running the full regression, deploying to staging and running the tests again there, rebuilding all the evidence, getting the approvals again.
We also fixed the real cause, not only the symptom. The staging environment was aligned with production, in infrastructure as code, so that this specific difference could not come back.
And the important part is this:
We did not go faster by skipping quality. We went faster because quality was automated.
Nobody had to update the release note manually for the fifth time. Nobody had to manually rerun the same tests. Nobody had to carefully replay a deployment procedure under pressure. Nobody had to decide which quality step could safely be skipped to meet the deadline.
The fastest path was also the clean path.
Keep your kitchen clean
There is a reason professional kitchens work with mise en place and clean as they go.
Cleaning feels like overhead when nothing is happening. You could leave the knife there. You could clean the board later. You could organise everything when you have more time. And for the first meal, it works.
But when the rush starts, you do not want to start cleaning the kitchen. You want to cook.
Software engineering is not that different. The time to build your deployment automation is not when production is broken. The time to create useful observability is not during your first major incident. The time to automate release evidence is not when the deadline is tomorrow and someone has already regenerated the same document four times.
And if your kitchen is already dirty, you will not get two weeks to clean it. You will get one afternoon, once, for the thing that hurts the most. So pick the task you have already done manually three times, automate that one, and use the time it gives you back to take the next one.
Keep your kitchen clean, so that when you actually need to move fast, you can.
Because real engineering speed is not about taking shortcuts. It is about building a system where you do not need them.