Thinking of Codebases as Cities

There is something about cities that feels alive. Not alive in the biological sense, but alive in the way a conversation is alive, or a culture, or a memory.

I wonder if codebases are the same.

The Seed of the Idea

Devon Zuegel introduced me to urban design thinking. Christopher Alexander’s “A Pattern Language” has been on my reading list for a while, but the ideas keep pulling at me even before I open the book.

What happens when you stand at the intersection of urban planning and software? Both are acts of world-building. Both attempt to create spaces where humans can live, work, and find meaning. Both fail in interesting ways.

Walking Through Code

I’ve been thinking about building a simulation where you could actually walk through your codebase. Not scroll or search, but navigate it spatially like a city.

In this city of code, time becomes visible. Ancient commits manifest as old buildings. Files without test coverage stand as structures built without permits, their foundations uncertain. Every codebase has history. What if we could see it?

The Soul in the Details

There is joy in finding personality hidden in code. ASCII art guarding a complex algorithm. A quote from a tired engineer at 3am. The warning “Here be dragons” before a function that has survived three rewrites.

These are signatures. Evidence that humans were here, that they struggled, that they left something of themselves behind. A city without character is just infrastructure. A codebase without character is just text. Perhaps what we build should be unapologetically itself.

The Wisdom of Proximity

Urban planners speak of the 15-minute city: a place where everything you need exists within a short walk. It is a philosophy of closeness, of reducing friction between intention and fulfillment.

I have been exploring vibe coding lately (more on resources in a future post). One observation struck me: AI coding agents succeed when related code lives close together. Same file, same directory, same package. The further apart concepts drift, the more the implementation fractures.

This is the 15-minute city, translated into syntax. Maybe good code, like good cities, keeps what belongs together close.

An Open Question

I do not know where this metaphor ends. Perhaps technical debt is deferred maintenance. Perhaps refactoring is urban renewal. Perhaps sometimes what looks like progress is just gentrification in a different costume.

The analogy feels fertile. I will keep exploring it.