en years have passed since Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (aka the Gang of Four or GoF) wrote and published Design Patterns: Elements of Reusable Object-Oriented Software (1st Edition: January 15, 1995). And while most programming books that old are as pass? as the technologies they covered or required second and third editions along the way, the GoF’s seminal work still flies off bookshelves, despite being the same text that debuted in the fall of 1994?an eon ago in Internet time.
Design Patterns, which was first to formalize the idea of creating reusable object-oriented code solutions, still ranks among Amazon’s top-selling computer science books, holding its own against much newer books that hit the shelves in the new millennium. Imagine seeing Dan Brown’s The Da Vinci Code still among Amazon’s top-selling books in 2013. While we suppose it’s not outside the realm of possibility considering the book’s longstanding popularity, it would still deserve a celebratory nod toward the author.
Noting that many DevX authors refer to the book with great reverence in their articles, we were inspired to commemorate the 10th anniversary of Design Patterns. DevX circulated a brief, seven-question questionnaire to capture developers’ thoughts on the book, its groundbreaking concepts, and the contribution of the Gang of Four. The following sections present each question and highlights from our authors’ responses.
1. When and how did you first discover the book?
For most respondents, design patterns became a software development zeitgeist that they just couldn’t ignore. Some were familiar with it from its earliest days, while others discovered it only in the past few years. Professional curiosity about a prevailing trend, recommendations from colleagues, and just keeping up with the Joneses sum up the reasons why they eventually had to get the book in their hands.
“Fear that other people knew stuff I didn’t,” said Brian Goetz, a principal consultant at Quiotix, about his motivation. “As usual, said fear was unfounded.”
A different kind of peer pressure motivated Eric McMullen, a .NET and Microsoft SQL Server independent consultant. He observed that the experienced, successful programmers around him “focused on patterns, and nearly everyone with senior in his title has a white hardback book with blue letters and a blue ribbon sticking out of it: Design Patterns.”
“I went into an interview, and they said ‘do you know any GoF patterns?’ I knew Singleton and had used some of the other patterns, [I] just never knew the name. I didn’t get that job,” answered Stephen Lum, a senior developer for Barclays Capital in London.
2. How much design pattern exposure and/or experience did you have prior to reading the book?
The responses to this question reveal one of the core benefits that Design Patterns brought about: a standard vocabulary for common patterns, which many respondents had used even before learning that the GoF had given them formal names. Once named, the patterns became great tools for collaboration.
“At the time, I thought, ‘what’s a design pattern?’ We might have been doing and talking about what the book covered, but we never called it such,” said John Zukowski, a strategic Java consultant and prolific author.
Lara D’Abreo, an independent J2EE consultant, said she had “some” design pattern exposure. “But I didn’t have the language and patterns to express what I was actually doing.”
3. How did it change your approach to programming, if at all?
Responses ranged from the reverential:”Is there another approach apart from GOF?”?Lara D’Abreo
To the dismissive:”Not much”?Vlad Patryshev, R&D engineer, and Danny Kalev, independent software engineer.
“The Design Patterns book gives us a more effective language to talk about design. So we get faster at the whiteboard and when programming some design,” said Dirk Riehle, a former software researcher and developer who is working to establish a new software company.
“It made me a lot better at collaborating. [It] gave me a much better handle on the language of software engineering?just reading it made me more than a placeholder at design sessions,” said McMullen.
“I never worried too much about design, because I always used real-world analogous metaphors. But in day-to-day programming, patterns are invaluable in solving problems. I take my GoF book everywhere I go and try to memorize a new pattern every couple of weeks,” wrote Paul Kimmel, author of several books on object-oriented programming and .NET.
The GoF work “motivated me to use standardized names and terms when using them, so as to make the code/design docs more understandable,” wrote Goetz.
“The book changed the level of my programming: I was programming, I can now conceive. Instead of finding new pretty code tricks that take a lot of time to work on, I can now concentrate on higher-level problems.
“I often got the remark ‘I did it already’ when explaining a pattern. [My] answer is ‘yes, you did, but you were not able to communicate with the other engineers in the team, for you were not able to name your objects, your patterns, and then your problems.'”?Laurent Ploix, project manager and technical architect
4. Where does Design Patterns rank among your programming favorites?
For the respondents who stuck to a strict ranking, Design Patterns was at or near the top of their lists. If not No. 1, it was no lower than No. 5 in the vast majority of respondent rankings.
“[It’s] like a family member for programming,” wrote enterprise Java architect and programmer Rahul Kumar Gupta.
But some found age to be a dogged inhibition:
“In the late 1990s, it was ranked safely among the top five. Today, it has become somewhat outdated and common knowledge. The paradigm shift from plain OO to generic programming is now vehemently propagating into other languages and frameworks. Therefore, I believe that good books about generic programming are located at a higher position.”?Danny Kalev.
5. Which design patterns that you learned from the book do you rely on most heavily today?
The diversity of responses to this question illustrates the wide range of design patterns that professionals use. In all, respondents cited 19 different patterns among their favorites. The most frequently mentioned were Singleton, Factory, Observer, and Command, respectively.
To caution against an overdependence on any particular pattern?the only respondent to do so?McMullen admitted he would’ve liked to answer “none” to this question. He reasons that “there might be a particular pattern or two used frequently that constitutes someone’s own personal design style (for me, it’s the singleton; man, I love that thing), but a consistent *over-reliance* on just a couple of patterns really means you’ve got a weak design vocabulary. Someone who uses nothing but the Singleton pattern is a little like someone who’s conversational vocabulary consists exclusively of ‘dude’ and ‘awesome’? there’s a limited number of concepts he can articulate with any precision.”
6. If you could assign the GoF’s next book, which topic would you have them tackle?
Most responses point to a need for the GoF to get a hold of the many variants that their original pattern set spawned:
Riehle suggests “The Return of GoF” to present the next set of GoF patterns, stating that the original “missed a set of equally important patterns.”
GoF Member Says Time May Be Right for Design Patterns Second Edition.
“Patterns Revisited” or a best practices volume, said Patryshev. “There are too many pseudo-patterns around. I’d like these people to tell the world that there is no such thing as an ‘EJB Pattern.'”
Kalev is holding out for a tutorial on how some of the classic patterns can be generated automatically from simple, generic templates, as well as a set of completely new patterns that rely on meta-programming principles.
Ploix doesn’t think new patterns warrant another book, but writes that a how-to about including a pattern in an existing application would be great.
Cataloging and naming other abstractions, such as idioms or AOP?McMullen
Nothing. “It’s always downhill after the first big hit.”?Goetz
7. Give us a more fitting name than Gang of Four.
Depending on your point of view, “Gang of Four” sounds like either a political cabal or the title of a Clint Eastwood spaghetti western. Yet most just dismissed the question, stating that now that the GoF is known as such, they can’t imagine them with another name. However, a few passed on some clever alternatives. Click here for the Top 10 List.
Contrary to Popular Opinion
Not all the responses applauded the GoF’s work:
“What’s all this Design Patterns stuff? Everybody keeps talking about ‘design patterns.’ Make the pain go away!”?Joel Spolsky.
“I think the whole design patterns phenomenon is just another thing for academic geeks to make themselves feel smarter,” said David Talbot, vice president of development for Data Systems International. When we asked David to tell us more, he obliged with “To Software Architects: Serve End Users, Not Your Egos.“
“I find OOP almost completely useless. I don’t program with a group, so OOP’s primary utility (which is fundamentally clerical) has no real value. [It] just introduces an entire new set of bugs and complexities to procedure-oriented design,” wrote Richard Mansfield, author of more than 30 computer books during the past two decades, including bestsellers about machine language, who declined to complete the questionnaire. You can read Mansfield’s unusual opinions of OOP in this week’s guest commentary, “OOP Is Much Better in Theory Than in Practice.“
You can debate how important design patterns have been to modern software development, but you can’t argue with numbers. A perennial bestseller with more than 400,000 copies in print has an impact. The work the GoF produced more than a decade ago still influences and impacts how architects and developers work today. So why not break out the balloons and streamers? The Gang’s earned it.