7 ms·
Patterns are from software archaeology, they were naming things that were commonly seen and what they were for -- they were helping build a vocabulary to talk a
by dantheman 10y ago
Patterns are from software archaeology, they were naming things that were commonly seen and what they were for -- they were helping build a vocabulary to talk about larger constructs.
They are useful if you have a problem and one fits it perfectly, it can help you start thinking about it -- but it might not be a good fit.
In general we should be keeping software as simple as possible, with the understanding that it can be changed and adapted as needed. Often large "pattern" based projects devolve into a morass of unneeded complexity to support a level of flexibility that was never required.
- mbrock 10y agoThey are rather from the interest of certain software developers in the work of the architect and philosopher Christopher Alexander, who saw patterns as the basic elements of a humane and sustainable style of building and communicating knowledge about building. The concept, like so many other concepts, drifted from its origin and became a more rigid and doctrinaire "system", especially after the misunderstood book by the "Gang of Four". In reality, patterns are everywhere in software, whether we call them that or not. Game loops, event servers, compilers, map/filter, microkernels, stdin transformers, for loops over arrays, etc etc etc. Richard P. Gabriel's book Patterns of Software is freely available and goes into the history and meaning of patterns. Alexander himself wrote a preface that's worth reading on its own.
- eru 10y agoAnd lots of these patterns can even become first class entities in the right languages. Eg almost all languages these days provide functions as a first class abstraction. You don't have to manage a call stack yourself.
- mbrock 10y agoMany, but not all, and the idea that nonreified patterns indicate a flawed language is pernicious. Gabriel's book talks about this.
- eru 10y agoYes. We can go further: ability to reify patterns can be seen as a synonym as ability to abstract. Funny enough, Java at least originally deliberate tried to limit people's ability to abstract common patterns in the name of `readability by average programmers'. At least that's the folklore.
- huuu 10y agoSomehow I think the foreword of Christopher Alexander is very emotional. I cannot express why. To me the key is joy. The joy of writing, maintaining and using software.
- mbrock 10y agoHe is skeptical about the value of the "software patterns" movement and in a deeper sense critical of software in general. He asks what standards we should have for software. In architecture, there is the Chartres and myriad other truly beautiful structures—what if we judge software by such standards? I agree that it's a beautiful and powerful foreword. To me, another key idea is software as a way of building. It implies that a computer system can be an inhabitable, ownable, sustainable thing made for supporting human life... like a shed, a tractor, a garden, a town...
- theoh 10y agoThis is an aside, but it's significant that Alexander's own architecture is fairly unsuccessful. His emphasis on loose formal structure and codification of practices (e.g. built-in window seats, vestibules of whatever it is) is prescriptive and doesn't help with the real problems of architectural design, which is something profoundly intuitive, circumstantial and very subtle. Architectural education is a fascination of mine, partly because it seems to succeed so rarely. On a tangent, anyone in London is recommended to visit the end of year shows of student work at the architecture schools, coming up at the end of June. A lot of very intriguing and complex activity. (UCL Bartlett, Architectural Association, London Metropolitan (CASS) etc.) I can't speak for other cities.
- 1123581321 10y agoThis seems opposite to me. Most architecture is prescriptive and there is little tolerance for Alexander's circumstantial and use-based design. If the story he recounts in The Battle for the Life and Beauty of the Earth is true, his preference to use simple materials and let the budget constrain the design makes him an enemy of building firms which use standards to justify cost overruns. What did you think about that book?
- theoh 10y agoI agree that much building is standardized and conventional. Architecture, for me, connotes a more ambitious attempt to build creatively and appropriately. When I say "prescriptive" I suppose I'm referring to the propositional nature of patterns, like an engineer's rules of thumb. The contrast is not so much with individual genius and variation as with the maintenance and passing on of tacit knowledge, which is a mysterious process involving multiple senses and observational learning. http://www.lse.ac.uk/economicHistory/Research/facts/tacit.pdf http://www.lse.ac.uk/economicHistory/Research/facts/tacit.pd... That attitude might sound very conservative, but it's based on my own experience and not any preference for a particular technology or style. Alexander is too reductive and abstract; he's not properly in touch with actual sensory knowledge or craft skills. Or with economical industrial tech, e.g. the work of Lacaton & Vassal which uses cheap industrial building systems to create generous spaces. I haven't read the book you mention. Informing myself about it now.
- _pmf_ 10y ago> They are useful if you have a problem and one fits it perfectly Patterns must not be a perfect fit. You don't build your living room elliptical because you have a round rug. There are pragmatic considerations that are much more important that "perfect fit".