Ad Hoc Architecture vs Architecture Pattern
Improvising your system design on the fly versus building on a named, battle-tested architecture pattern. One feels fast today and bankrupts you by month six. Here's the call.
The short answer
Architecture Pattern over Ad Hoc Architecture for most cases. Patterns encode decisions other people already paid for in production outages.
- Pick Ad Hoc Architecture if throwing away the code in two weeks — a prototype, a spike, a one-off script nobody will maintain
- Pick Architecture Pattern if more than one person will touch this, or it will outlive the current sprint. Which is almost always
- Also consider: A pattern applied without understanding is just ad hoc with extra ceremony. Pick the pattern that fits the problem, not the one on the conference slide.
— Nice Pick, opinionated tool recommendations
What they actually are
Ad hoc architecture is the absence of a plan dressed up as agility. You make each structural decision in the moment — where state lives, how modules talk, what owns the database — based on whatever unblocks you fastest. An architecture pattern is a named, reusable solution to a recurring structural problem: layered, hexagonal, event-driven, CQRS, microservices, MVC. It comes with a known shape, known tradeoffs, and a community that has already hit the walls you are about to hit. The distinction is not 'planned vs unplanned.' It is 'decisions you own alone vs decisions backed by collective production scar tissue.' Ad hoc can be brilliant in the hands of someone who understands the patterns and chooses to deviate deliberately. In every other hand — which is most hands — it is just coupling accumulating in the dark until the system calcifies and nobody can change anything without breaking three other things.
Where ad hoc actually wins
I don't hand out exceptions, but ad hoc earns one in a narrow lane: throwaway work and genuine novelty. A weekend spike, a migration script, a proof-of-concept you will delete on Monday — imposing hexagonal architecture there is cosplay, not engineering. Patterns carry overhead: indirection, ceremony, layers you must justify. Pay that overhead only when the code will live long enough to amortize it. The second lane is the truly new problem where no pattern fits, and forcing one means contorting your domain to satisfy a diagram. Early-stage products often live here — you don't yet know your boundaries, so committing to microservices before you understand the seams is its own catastrophe. Ad hoc buys you the freedom to discover the real shape first. The trap is staying ad hoc after the shape is obvious. That is not freedom anymore; that is negligence with a deadline excuse.
Why patterns win the long game
Software cost is dominated by change, and change cost is dominated by coupling. Patterns exist precisely to constrain coupling along predictable seams. When a new engineer joins and you say 'it's hexagonal,' they instantly know where business logic lives, where I/O lives, and how to add a feature without detonating the core. That shared vocabulary is the entire point — it turns architecture from a person into a document. Ad hoc systems have no such map; the architecture is whatever the last commit left behind, and the only documentation is the original author, who left. Patterns also front-load the bad news: hexagonal's verbosity, microservices' operational tax, CQRS's eventual-consistency headaches are all documented before you commit, so you choose with eyes open. Ad hoc hides its tradeoffs until they detonate in production. You will pay either way. Patterns let you pay on your schedule instead of at 2 a.m.
The verdict, no hedging
Pick the architecture pattern. Not because patterns are sacred — half of them are over-applied by people who read one blog post — but because the default of 'no pattern' is almost never a choice; it is the absence of one, and absences compound. Use ad hoc deliberately, in a box, for code that won't outlive the week. The moment a second engineer touches it or it survives a sprint, reach for the named pattern that fits the problem and own its tradeoffs out loud. The real failure mode isn't choosing wrong between these two — it is cargo-culting a pattern you don't understand, which gives you all the ceremony of structure with none of the comprehension. So: learn the patterns well enough that your deviations are decisions, not accidents. Then default to the pattern. Ad hoc is a tool for the disciplined, and most teams overestimate their discipline.
Quick Comparison
| Factor | Ad Hoc Architecture | Architecture Pattern |
|---|---|---|
| Onboarding new engineers | Every decision is tribal knowledge in one person's head | Named pattern = searchable docs, shared vocabulary, faster ramp |
| Speed to first commit | Instant — no upfront structure, just write code | Slower start; you set up layers and boundaries first |
| Cost of change at month six | Every change ripples unpredictably through coupled code | Boundaries localize change; the pattern tells you where things go |
| Failure modes are known | You discover your architecture's weaknesses in production | Pattern's tradeoffs are documented before you write a line |
| Fit to a genuinely novel problem | Free to shape the solution to the actual constraints | Risk of forcing a square problem into a round pattern |
The Verdict
Use Ad Hoc Architecture if: You are throwing away the code in two weeks — a prototype, a spike, a one-off script nobody will maintain.
Use Architecture Pattern if: More than one person will touch this, or it will outlive the current sprint. Which is almost always.
Consider: A pattern applied without understanding is just ad hoc with extra ceremony. Pick the pattern that fits the problem, not the one on the conference slide.
Patterns encode decisions other people already paid for in production outages. Ad hoc means you pay that tuition yourself, in prod, on a Friday.
Related Comparisons
Disagree? nice@nicepick.dev