When organic chaos grows without a plan—and why you can't just repave your way out of it.
Legacy systems rarely start broken. They start small—a simple tool for a simple job. Then the business grows. Features get added. Quick fixes become permanent. Workarounds become load-bearing walls.
This isn't bad engineering. It's organic growth without a master plan.
There's a place that captures this feeling perfectly: Bali.
The roads in Bali weren't designed. They evolved. What started as footpaths between rice paddies became motorbike trails, then car roads, then highways carrying tourist buses—but underneath, they're still footpaths.
The infrastructure was never rebuilt for what it became. It was patched, extended, and duct-taped into its current form.
That's your codebase.
Walk down a typical road in Bali and you'll see:
When it rains, the drainage fails and the road floods. When the internet goes out, it's because someone dug up a cable while fixing a water pipe. When traffic jams, there's no alternate route.
The locals know the shortcuts. Newcomers get lost.
| Bali Infrastructure | Your Codebase |
|---|---|
| Footpath that became a highway | Simple app now handling enterprise-scale load |
| Power, water, internet in same trench | Business logic, UI, and database calls in same files |
| Buildings right at road edge | No room to refactor without breaking adjacent features |
| Locals know the shortcuts | Tribal knowledge, undocumented workarounds |
| Patch potholes with whatever's nearby | Quick fixes that became permanent architecture |
| When it floods, everything floods | Under load, the whole system struggles together |
| Nobody knows what's buried | Fear of touching anything—side effects unknown |
A government official might look at the road and say:
"Just repave it! Add streetlights! Paint lane markers!"
But the contractor knows the truth:
The foundation is a rice paddy — The road was never engineered for heavy traffic
The utilities are in the wrong place — Power cables cross where streetlights need to go
The drainage flows the wrong direction — New asphalt will just flood faster
There's no consistent addressing — GPS says you've arrived, but you're in a ditch
Buildings block expansion — Nowhere to widen without demolition
Repaving would be putting fresh asphalt over quicksand.
The surface would look great for a month. Then the cracks would appear. Then the flooding. Then you're back where you started—except now you've spent the paving budget.
To actually fix the road, you need to work from the ground up:
Nobody has a complete map. The power company knows where some cables are. The water department has partial records. Telecom just buried things wherever.
Send surveyors. Document every pipe, cable, and conduit. Map what's actually there—not what the original plans said.
For the first time, you have a map of reality. Now you can plan.
Power cables share trenches with water pipes. Internet runs through drainage ditches. When one fails, it takes the others with it.
Dig proper conduits. Power in one channel. Water in another. Fiber in its own protected run. Each utility independent.
Fix the plumbing without cutting the power. Upgrade the electrical without flooding the internet.
Water flows wherever gravity takes it—across the road, into buildings, pooling at random low points. During monsoon, the road becomes a river.
Engineer proper drainage. Grade the road correctly. Direct water where it should go, when it should go there.
The road handles heavy rain. The system handles heavy load. Water (and data) goes where it's supposed to.
Buildings were constructed at the road's edge. No sidewalk, no shoulder, no room to expand. Every building is a special case.
Establish setback standards. Create consistent access patterns. New construction follows the rules.
New construction follows predictable rules. The road can be maintained without negotiating with every building owner.
Addresses are chaos. "The blue building past the temple, before the warung, behind the big tree." Delivery drivers rely on phone calls.
Proper addressing. Every building gets a number. Every street gets a name. Anyone can navigate the system.
New developers can navigate the system immediately. No more tribal knowledge required.
The road surface is ugly—patches on patches, faded paint, inconsistent materials.
NOW you can repave. The foundation is solid. The utilities are separated. The drainage works. Fresh asphalt will actually last.
A beautiful road that stays beautiful—because the infrastructure underneath can support it.
| Phase | Why It Must Come First |
|---|---|
| 1. Survey and map | Can't fix what you can't see |
| 2. Separate utilities | Can't work on one system without breaking others |
| 3. Fix drainage | Foundation must be solid before surface work |
| 4. Building setbacks | Need consistent structure before standardizing |
| 5. Standardize addressing | Need structure before you can label it |
| 6. Repave | Surface work only lasts if infrastructure supports it |
You could skip the infrastructure work and just repave.
It would look great for the quarterly review.
Then the monsoon comes.
"You can't build a highway on a footpath foundation. You have to dig it up first—even though digging is slower than paving."