Chapter 2. A Tale of Two Systems: A Modern-Day Software Fable
Architecture is the art of how to waste space.
—Philip JohnsonA software system is like a city—an intricate network of highways and hostelries, of back roads and buildings.There's a lot going on in a busy city; flows of control are continually being born, weaving their life through it,and dying. A wealth of data is amassed, stored, and destroyed. There are a range of buildings: some tall andbeautiful, some squat and functional, others dilapidated and falling into disrepair. As data flows around themthere are traffic jams and tailbacks, rush hours and road works. The quality of your software city is directlyrelated to how much town planning went into it.Some software systems are lucky, created through thoughtful design from experienced architects. They arestructured with a sense of elegance and balance. They are well-mapped and easy to navigate. Others are not solucky, and are essentially software settlements that grew up around the accidental gathering of some code. Thetransport infrastructure is inadequate, and the buildings are drab and uninspiring. Placed in the middle of it,you'd get completely lost trying to find a route out.Where would your code rather live? What kind of software city would you rather construct?In this chapter, I tell the story of two such software cities. It's a true story and, like all good stories, this one hasa moral at the end. They say
experience is a great teacher
, but other people's experience is even better—if youcan learn from these projects' mistakes and successes, you might save yourself (and your software) a lot of pain.The two systems in this chapter are particularly interesting because they turned out very differently, despitebeing superficially very similar:
They were of similar size (around 500,000 lines of code).
They were both "embedded" consumer audio appliances.
Each software ecosystem was mature and had gone through many product releases.
Both solutions were Linux-based.
The code was written in C++.
They were both developed by "experienced" programmers (who, in some cases,
should
have knownbetter).
The programmers themselves were the architects.In this story, names have been changed to protect the innocent (and the guilty).
2.1. The Messy Metropolis
Build up, build up, prepare the road! Remove the obstacles out of the way of my people.
—Isaiah 57:14The first software system we'll look at is known as the Messy Metropolis. It's one I look back on fondly—notbecause it was good or because it was enjoyable to work with, but because it taught me a valuable lesson aboutsoftware development when I first came across it.
Page 1 of 15Chapter 2. A Tale of Two Systems: A Modern-Day Software Fable06/03/2009file://C:\Users\imon\AppData\Local\Temp\~hh1FAD.htm
Leave a Comment