I’m reading Death and Life in the hope of finding connections between city planning and software architecture. In the book, Jane Jacobs presents a number of fundamental factors that are key to the success of city neighborhoods – such as diversity of uses, a mix of old and new buildings, et cetera. Extreme programmers and other fans of refactoring and emergent design claim that being savvy about code smells, and refactoring frequently whenever there is smelly code, is “all” that’s required for achieving and maintaining good design.

I think that this might be true, but I’m not yet at the point where I know that this is true for a team of programmers, who locally make design choices, navigating by code smells, and refactoring continuously.

As I’m writing this I think about the importance of, when making design decisions, re-using patterns that are familiar either within the team, or among programmers in general. Design can’t be purely local, or the system will consist of too many different types of solutions. If we use the image that a system’s architecture is like a grammar for a language – that the architecture describes the system, rather than make a blueprint for a system that is to be built. Then, the simpler the grammar the better (up to a point, of course). Programmers must, as they make local design decisions, pay attention to what those decisions mean at the larger scale – how they affect the system’s grammar: its architecture.

This is something that Jane Jacobs doesn’t have to deal with in her book. There is, in some way, a pattern language, a grammar, an architecture, that all cities implicitly follow. They use elements such as streets, buildings, squares, parks, bridges, et cetera. At a particular level of abstraction, all cities grow in the same way: by adding more of these types of elements (sometimes by replacing). Software, on the other hand, can grow in ways that completely distort the topology. So software development needs principles that programmers follow to keep the system from getting incomprehensible as a whole.

The above was posted to my personal weblog on April 10, 2003. My name is Peter Lindberg and I am a thirtysomething software developer and dad living in Stockholm, Sweden. Here, you’ll find posts in English and Swedish about whatever happens to interest me for the moment.


Related posts:

Posted around the same time:

The seven most recent posts:

  1. Tesugen Replaced (October 7)
  2. My Year of MacBook Troubles (May 16)
  3. Tesugen Turns Five (March 21)
  4. Gustaf Nordenskiöld om keramik kontra kläddesign (December 10, 2006)
  5. Se till att ha två buffertar för oförutsedda utgifter (October 30, 2006)
  6. Bra tips för den som vill börja fondspara (October 7, 2006)
  7. Light-Hearted Parenting Tips (September 16, 2006)