I've recently begun reading Patterns of Software: Tales from the Software Community by Richard Gabriel, which has a wonderful and thought provoking foreword by Christopher Alexander:
We have begun to make buildings which really do have the quality I sought for all those years. It may seem immodest, to presuppose such success, but I have been accurate, painfully accurate in my criticism of my own work, for thirty years, so I must also be accurate about our success.
If the heart of human existence, what matters most deeply to man, woman, child, really can find its way into computer programming, and into the programs, and into the meanings of those programs, and into the actual code and substance of those programs, and into their effects then the future world will be changed immeasurably.
The first quote states our goal, the second our challenge. To answer this challenge I recommend reading Domain Driven Design by Eric Evans, a magnificent book about communication. Domain driven design is all about capturing what matters most deeply in our code, or as Martin Fowler says in the foreword:
The greatest value of a domain model is that it provides a ubiquitous language that ties domain experts and technologists together.
The connection to the point Alexander is making in his foreword is that patterns that make the code better don't necessarily make the program better. This is very clear to Alexander, as he cannot judge a program as a programmer, only as a user. Alexander's own patterns usually have a direct effect on the users of his houses. They don't necessarily solve technical problems. That is, most design patterns in programming works on a different level than Alexander's architectural patterns. Alexander makes this point even clearer in his speech at OOPSLA 1996:
I don't really see discussion about What, collectively, are computer scientists supposed to be doing with all these programs. How are they supposed to help the Earth? And, yet, the capacity to do that is sitting right here in this room. That is an amazing situation. You have so much power.? but that means that you also have an enormous responsibility.
This is an extraordinary vision of the future, in which computers play a fundamental role in making the world -- and above all the built structure of the world -- alive, humane, ecologically profound, and with a deep living structure. I realize that you may be surprised by my conclusion.
Alexander discusses the immense influence programmers have over almost all human activity these days. And how he doesn't really see us reflect on this fact. Instead, we find ourselves in a situation where the challenge to properly capture the domain model leads to, as Evans states, that a lot of good programmers are drawn to infrastructure frameworks, writing code in a domain they understand, that of programming.
We must resist this, without sacrificing the beauty of the code, our working environment. Because programming is to capture a domain and turn it into objects, and the source code is the house we build for our objects to live in.
...and this spring I've been to Barcelona, seen the buildings of Antoni Gaudi, and cried at the Sagrada Familia. Not a single repeated detail. Once and Only Once in stone. We, who shape the world with text, have no excuses.
This summer I will write wonderful code.