I expected hexagonal architecture to help my coding agent. It didn't.
I am a principal engineer, and I started this experiment trying to defend something I have believed for years: invest in a good structure now, and later changes should get easier. Two or three years ago, I would have pushed back on the claim that hexagonal architecture was mostly overhead. I wanted to show that the investment would also help a coding agent. Across nine features, the hexagonal…
A principal engineer conducted an experiment to determine if investing in a good software architecture structure would help a coding agent perform better. The experiment involved two implementations of a Java service for an EV charging network: one following hexagonal architecture principles and the other without any architectural constraints.
Over nine features, the hexagonal version took 38% longer to reach acceptance compared to the flat version. The hexagonal version logged more model steps and tool calls, but this difference is attributed to the specific setup rather than a verdict on the architecture itself. Despite the initial expectation that the architectural investment would become more useful as the feature surface area grew, the flat version reached acceptance faster.
The experiment highlighted the importance of questioning architectural habits and considering the concrete benefits of clean code, clear business rule organization, and efficient testing.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.