The Generation Ship Model of Software Development

William Morgan
5 min readJul 9, 2014

When you’re born on a generation ship, you don’t even know you’re on a ship at all.

You live with your family in Area Delta-44 of floor 212. Floors 140 through 266 are your world. Your life is walls and corridors, air ducts and stairwells, and—if you’re lucky—elevators.

You don’t go below floor 266. That’s where the mutants are. They’ll eat you.

You don’t go above floor 140. That’s where the priests are. You’re not a priest.

You live with your family and you follow the rules. The rules say: the year is divided into four quarters. Once a quarter you must make the pilgrimage to perform Maintenance.

Maintenance is a sacred rite. It’s exciting! You finally get to see the Upper Floors. It’s different there—there are buttons and levers. Buttons are for pushing and levers are for pulling.

Everyone is assigned buttons to push and levers to pull. The priests tell you which ones. The sequence must be followed precisely. The priests say: if you push the buttons and pull the levers correctly, you will keep the Gods happy. If you screw up, the Gods will be unhappy.

It’s a big responsibility, but you’re ready for it. You push the buttons and pull the levers correctly. Nothing happens. The Gods must be happy.

You do this for many years.

Eventually, you start to wonder about Maintenance. You start to wonder about the priests. Not openly, of course! That would get you sent to the Airlock. You wonder to yourself.

One night, you sneak into the Upper Floors and break into the priests’ quarters. You steal a copy of their sacred book—the Comments. You hide it well. You study it, night after night. It’s full of strange symbols and marks. An odd language that reminds you of the way your grandparents talked. You don’t understand it.

Later on, you sneak into the Lower Floors. Maybe the mutants aren’t as bad as they say. Maybe they can help you understand the Comments.

You never find any mutants. Maybe there used to be mutants, and they all died out. Maybe they never existed at all.

You do find interesting stuff, though. Down here, the ship is laid out differently. Rooms and corridors come together in different ways. Strange machinery lurks in the shadows. Things are dirty and broken. The light switches don’t work.

You find scary stuff. Corpses (previous explorers?) impaled or crushed by machinery. You are careful to keep far away from those machines. In the really deep levels, you hear humming. The deeper you go, the louder it gets. The humming scares you. You don’t go that deep again.

You find other things too. Remnants of other people’s lives. People who lived and died a long time ago. You find scraps and clues. You read diaries and journals.

Night after night, you sneak, hunt and read. And slowly, slowly, like air pushing through a ventilation shaft, you understand.

These people knew things. Things you don’t know. Things the priests don’t know. They knew they were on something—on, like being on an elevator. On a ship.

You are on a ship.

The ship had a purpose. It was meant to go somewhere. A destination. The ship had cargo. It was meant to deliver something. You—the people. The ship was meant to travel for a very long time. Longer than your life, longer than anyone’s lives. The people who reached the destination would be the great, great, great-great-great-great-great-grandchildren of the people who started.

But then something went wrong.

The ship missed its destination. After centuries of travel, the people who were alive on the ship when it was time to land—a strange word, “land”—didn’t remember. They forgot they were on something. The ship floated past its destination. They were oblivious.

So now, here you are. The ship floats on. How long since it missed its destination? You don’t know. How long can the ship keep going? You don’t know.

Hundreds of floors above you, families live. They eat, dream, play, and sleep. There is drama and crime, romance and fear, babies and old people. There is life. What would happen if they knew?

You start the long climb back up the stairs.

Anyone who’s written code professionally is familiar with this story. You join a company. It’s your first day! You’re handed a codebase. “Hey, this thing stopped working. And we need you to add this feature!”

You dig into the code. It’s an exercise in archaeology. Generations of programmers have come and gone, leaving strata of functionality. The occasional striation of a half-hearted refactor. Some of your ancestors took the time to understand the purpose and structure of the code that came before them. They were able to improve it. Most didn’t bother. Faced with deadlines and feature creep, the calculus of risk vs. reward does not favor the refactor.

If you’re lucky, the person responsible for this code prior to you is still at the company. If you’re really lucky, they’ve been given time to introduce you to the system. But most of the time, they’re gone.

Digging deeper, you uncover strata of purpose as well as of function. Originally, this was a fairly simple CRUD layer over the user database. Then we dropped the SQL database for something else, and added a web admin interface. Then using the web interface to manage customer accounts became the primary use case. Then someone had the bright idea to expose this interface itself to customers. But first we needed some kind of ACL management system. The ACLs ended up being useful for other things, so now we mostly use it for that. And so on.

Sometimes you’ll stumble across some comments. (A lucky find?) They refer to projects and initiatives that don’t exist any more. They justify features with appeals to authority—“Sandy says we need to do it this way”. Sandy is long gone.

Some portions of the code are so weird, so poorly wired together, that you recoil in fear. You don’t touch those parts. That’s where the mutants live.

Some portions are cut-and-pasted, or cargo cult-ed, from other parts of the code. You don’t know why they work, but they works. If you try and tweak them, they don’t work. This is where the priests live.

So you hunker down and do what you can to keep things running. You have your orders! You nudge this machine into new territory, bolt on the new features, pack on another stratum of code.

You do this for many years.

Finally, it’s your turn to leave the ship. You hand the code off to your successor. You wish them well. You understand how this thing works now. You understand how to work with it, at least. You promise to answer their questions. You make this promise with the best of intentions. But your future will be full of deadlines and feature creep. You’re off to live on another ship.

--

--