Slashdot Mirror


Design Patterns

BShive writes "Design Patterns is considered a classic for anyone in software development. The beginning third of the book is a solid introduction to patterns, while the last two thirds of the book is devoted to the patterns themselves. Many of the professionals out there probably already own a well-used copy of this book, but there are others who are wondering what all the fuss is about. The frequency of hearing about this text in discussions piqued my interest enough to buy it for myself. If you are interested in design patterns and are looking to use them, then this should be one of the books on your shelf." Read on for more. Design Patterns author Erich Gamma, et al pages 395 publisher Addison-Wesley rating 8 reviewer Ben Shive ISBN 0201633612 summary Design Patterns is considered a classic for anyone in software development. Many of the professionals out there probably already own a well-used copy of this book, but there are others who are wondering what all the fuss is about.

Introduction

I found the entire introductory section excellent, and a good read. It covers what design patterns are and explains how they are documented and categorized. Advice on where and how to employ design patterns to achieve reusable and flexible software is also covered to give you an expectation of what you can get out of the rest of the book. The What, Why, and How are covered nicely. Even with little previous exposure to patterns, I was able to understand the presented material easily and begin to see the applications.
Object Modeling Technique (OMT) notation is also introduced to explain the diagrams associated with the patterns and examples. If you have used UML, the diagrams and notations will be familiar to you since UML is influenced by OMT. Jim Rumbaugh, the creator of OMT, collaborated with Grady Booch to create the first version of UML.

As the author notes, having a solid knowledge of OOP is critical to being able to understand and use the information presented. If you don't fully understand OOP, pick up an introductory text first. An Introduction to Object-Oriented Programming by Timothy A. Budd or any similar book will get you up to speed. However, you will get the most out of Design Patterns with hands-on OOP experience.

Case Study

This chapter presents a case study in designing a WYSIWYG document editor to demonstrate how design patterns can be applied. Most of the examples in the book involve the user interface and I would have liked to see less emphasis on UI models. However, it still gives the reader insight into real applications of patterns. Not only do the authors point out how the pattern applies to each case, but they also present the problems associated with the application. The case study is not intended to set up a perfect example of pattern usage, but to explore it. The reader could go further with the design presented and think about how to solve the flaws pointed out along with the ones that have not been discussed. I liked the fact that they do not attempt to state that there is only one way to solve the problems presented, or that their solutions are even the best way. Too many authors fall into this trap.

Presenting: The Patterns

The three chapters on patterns make up the bulk of the book. The patterns are separated out into the three chapters by type: Creational, Structural, and Behavioral. Each chapter begins with an overview of what the patterns of the type can be used for, and how the chapter deals with the patterns as a group. At the end of each chapter there is a discussion section that summarizes the patterns, along with guidance on how to select the right one from the chapter.

Each pattern description contains a number of sections: Intent, Also Known As, Motivation, Applicability, Structure (in OMT), Participants, Collaborations, Consequences, Implementation, Sample Code, Known Uses, and Related Patterns. The breakdown makes it easy to determine if, why, and how you should use the pattern. The authors are justifiably concerned about using the wrong pattern for a given situation. The code snippets are also easy to work through as long as you know an OOP language. C++ is commonly used, with the occasional bit of Smalltalk code.

The three chapters that detail each pattern would be difficult to read right through. However, the opening and closing section of each chapter has valuable information and is worth reading and subsequently referring to some of the patterns discussed. I got the most out of these chapters by picking patterns that might apply to current projects I was working with and then exploring one in depth, branching over into other patterns in a non-linear fashion.

Conclusion

The closing chapter is relatively short, but makes some important points. The authors discuss what to expect from design patterns, some history and other references/influences. Re-factoring is discussed and how patterns will help mitigate this unavoidable process as the software evolves. Other benefits are also brought up briefly. The book closes with an invitation to give the authors feedback and to find patterns that you use. The best designs will use many design patterns that dovetail and intertwine to produce a greater whole.

Book Extras

The whole book has a quality feel to it that is missing from many current texts that cost nearly twice as much. Inside the front cover there is a quick reference to all of the patterns contained in the book with a brief description and page number. The back cover also contains a quick reference for diagram notation and the relationships between the design patters. This is all topped off by two bookmark ribbons attached to the spine.

The Age Issue

Design Patterns was originally published in 1995, and the book mentions that the patterns it contains are little changed from 1992! In the computer field this would be considered an ancient text with how fast software is updated and languages change. Despite this, since the material is not entirely dependent on a particular language or program it holds up quite well. The examples referred to for each pattern are older software that many will not recognize. An updated version would be nice, but being old does not condemn this book to being useless.

Summary

This is an excellent book even if it is beginning to show its age. The fact that it's still very useful is testimony to the quality of the material. A few readers might find the reading to be a bit dry, but the straightforward style was refreshing compared to some other texts. The authors stay focused on the topic and condense it appropriately without going off onto long tangents. Once I've followed through with applying some patterns to projects it might garner an even higher rating. Just from reading about some of the patterns, I could see how they could have applied to previous projects I've worked on, both large and small. The book was certainly a worthwhile investment. If a second version of this book ever comes out, I'd be sure to pick it up as well.

Chapters:
1. Introduction
2. A Case Study: Designing a Document Editor
3. Creational Patterns
4. Structural Patterns
5. Behavioral Patterns
6. Conclusion

Appendix:
A. Glossary
B. Guide to Notation
C. Foundation Classes

You can purchase Design Patterns from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

40 of 309 comments (clear)

  1. Designing Patents ?? by StefMeister · · Score: 3, Funny

    For a second there I thought it said designing patents. I guess that's what happens when you spend more time reading /. than doing your actual programming work. :)

    --
    "Son, in a sporting event, it's not whether you win or lose, it's how drunk you get" - Homer J. Simpson
  2. Learn from the masters by Anonymous Coward · · Score: 5, Informative

    This book IS the definitive word on the use of patterns, I have used it and will vouch for it.

    However, for all the knowledge it contains it has a price tag to match. If you can get it used and cheap, do so.

    AC

  3. Designing and Patterns by CatWrangler · · Score: 4, Funny

    I have never seen a code monkey in a well designed patterned outfit. I wonder if this book will help at all.

    --

    ---
    When you come to a fork in the road, take it! --Yogi Berra--

  4. history lessons.. by TechnoVooDooDaddy · · Score: 5, Insightful

    hehe design patterns remind me of the quote "Those who do not learn from history are doomed to repeat it." or something like that...

    if a problem has been solved, and well thought through, the pattern published and peer-reviewed, it probably will hold up for a good long while.

    1. Re:history lessons.. by vrmlguy · · Score: 3, Insightful
      In other words...

      while (!history.learn()) { snafu(); }
      --
      Nothing for 6-digit uids?
  5. Re:Since the author didnt mention it... by Anonymous Coward · · Score: 5, Informative

    Get it if you can afford it. If not, try to find a second hand copy. Failing that there is plenty of resources on patterns on the net:

    Bruce Eckel has one in development available here:
    http://www.mindview.net/Books/TIPatterns/

    There are other places too:
    http://www.csc.calpoly.edu/~dbutler/tutorial s/wint er96/patterns/

    See what Google brings up for you.

  6. Next Up in the Obvious Category... by GeekLife.com · · Score: 5, Funny

    Can we get a review of this site, slashdot.org I've heard so much about?

    Sorry, I'd just thought everyone had heard about Design Patterns long ago. Seems a bit like publishing a book review on the KJV Bible or something.

    1. Re:Next Up in the Obvious Category... by Dark+Paladin · · Score: 3, Insightful

      Considering that the book uses pieces that are over 7 years old in a world where technology changes every few months, this review was useful to me - it told me that the information was still useful, valid, and actually might help my programming skills.

      So no, I don't believe it was obvious at all - considering that I hadn't even heard of the book until today. (Yes, let the flames commence - I must be a bad, awful programmer because I haven't read some book.)

  7. Re:Since the author didnt mention it... by Vengeance · · Score: 5, Insightful

    Damn straight it's worth it.

    As a developer, this book helps you to codify some concepts you've already got in your head, so you can latch onto them and understand them better. Patterns are applicable at every level, from little 20 and 50 line modules up to arbitrarily large systems. Get this book, or one based upon it that uses the language of your preference.

    --
    It was a joke! When you give me that look it was a joke.
  8. Re:Since the author didnt mention it... by johnbr · · Score: 5, Informative
    Design Patterns is an extremely valuable reference book. It uses C++ examples, but in almost all cases these can be translated into Java (which is the only other language I use regularly right now).


    It suffers from an overdependence on GUI-based descriptions, which were difficult for me to absorb, given my back-end system focus. However, every few weeks or months something will fall into place and I'll suddenly get the usage of one of the patterns that I didn't understand before.


    Patterns are a great "show off" tool - useful to intimidate those who haven't learned about them yet. Since you'll be on the intimidatee side until you read it, it is good to have a copy for that reason as well.


    Some of the patterns are easy to understand and easy to use - Singleton and Observer. Others take more time before you "get it", and many you may never learn, nor need to.


    But all in all, I think you'll feel smarter for having read it (even if you only "get" pieces of it), and it will probably help your architectural sophistication, and might even present a handy solution to a frustrating design problem.

  9. a great, but dangerous, idea by ashultz · · Score: 5, Insightful

    This book is pretty great. It's also pretty dangerous, I've heard of idiots who rate the quality of any potential design by how many patterns it has in it.

    Design patterns is important for every OO programmer to read, understand, and hopefully transcend.

    1. Re:a great, but dangerous, idea by Luke+Skyewalker · · Score: 3, Informative
      I've heard of idiots who rate the quality of any potential design by how many patterns it has in it.

      Actually, a lot of the patterns overlap:

      The Singleton is a subset of Factory, and an Abstract Factory is a subset of Factory.

      Facades are Composites of interfaces.

      An Adapter is a type of Facade.

      (ad nauseaum...)

  10. Beware of overusing patterns. by taeric · · Score: 5, Interesting

    Maybe overusing isn't the correct term, but definitely blindly using. I have seen far too many times (in far too short a time) where people will just start tossing in as many "patterns" as they can.

    Sometimes, as if to really horrify me, the reasons for including a pattern are to appease a manager!! This really frightens me, as the patterns are not discussed at the planning stage, but as an afterthought to implementation.

    Which brings me to a question. I have always viewed design patterns to be something that are used during the planning phase of a project. All too often, I am seeing where people start trying to shoehorn a design pattern into a project because they just heard about how great of a job it does at something. Does this happen elsewhere, or just with the projects I see?

  11. Great book, goes well with .... by goodviking · · Score: 3, Insightful

    This is a fantastic book. It is probably the best book out there for coverage of all of the fundamental design patterns. The examples are in Smalltalk and C++, and are readable and easily translatable to other OO langs (Java, C#, ...).

    I would recommend that along with this book, you take a look at Pattern-Oriented System Architecture. It applies the design pattern concept to problems in large scale system architectures.

    A combination of the techniques in both of these books can really help unwind alot of the spaghetti problems at both a system and component level. Additionally, alot of the fundamental concepts in modern system architectures become alot clearer once you've read both.

  12. No pattern experience required by cheezfreek · · Score: 5, Interesting
    Even with little previous exposure to patterns, I was able to understand the presented material easily and begin to see the applications.

    Even with no exposure to patterns, I was easily able to understand this book. This book was my first exposure to patterns, and I don't think I could have had a better introduction to the subject. I highly recommend this book to anyone who knows anything about object-oriented design.

  13. Re:Since the author didnt mention it... by rmolehusband · · Score: 3, Informative

    Is this book worthy of my money or is it antiquated piece of shit? The author of this review didn't include any sort of this question.

    That's kind of subjective, one man's 'must have' is another man's 'antiquated piece of shit', so it's always a tricky proposition to make such a sweeping generalisation in a review.

    On the other hand, you should be able to get a flavour of the book from the review and decide if it's something you *might* be interestd in. Then you spend and hour or two in your local bookstore (remember them?) reading and deciding for yourself - which, having never come across the book before and having had my interest roused, is what I'll probably end up doing.

    --
    Reginald Molehusband. Edinburgh, Scotland
  14. Important point that the review might have missed. by eddy · · Score: 5, Informative

    What the review missed to point out (okay, I only gave it a once over..) is one very important aspect about patterns and this book in particular; it gives developer a new common language to use when communicating about software design.

    For instance, you might have 're-discovered' the visitor pattern yourself and used it several times, but without the nomenclature of this book it was very hard to actually talk about that design with other developers.

    Great book, one of few that - after reading it - got me all exited about development again.

    --
    Belief is the currency of delusion.
  15. antipatterns by Aniquel · · Score: 5, Informative

    If you read Design Patterns, the next book to read should be AnitPatterns: Refactoring Software, Architectures, and Projects in Crisis (ISBN: 0471197130). Design patterns shows you what to do, Anitpatterns shows you what *not* to do (and how to fix it if its already fscked up).

  16. Hell no by PissingInTheWind · · Score: 4, Insightful

    [...] little changed from 1992! In the computer field this would be considered an ancient text with how fast software is updated and languages change.

    Holy shit no. 1992 isn't 'ancient' in any way, only for people with very short memory and attention span. Or for people who thinks XML is a neat new idea. Or for people who thinks Java OO-model is a neat new idea. Or for people who thinks Patterns is the new silver bullet. Or for people who thinks Lisp is dead.

    Hope you get the idea.

    --

    A message from the system administrator: 'I've upped my priority. Now up yours.'
  17. Re:Who Actually USES These Patterns? by Vengeance · · Score: 5, Informative

    I use patterns on a regular basis, at many levels of code. The best description I've seen for why we want to use design patterns actually came across my desk this morning. If two woodworkers wish to describe joining two pieces of wood together for the front and the side of a drawer, they COULD, I suppose, discuss cutting a certain length, turning at a certain angle, cutting another length, turning the other way again, etc. etc. ad nauseum. OR, they can simply indicate that they want to use 3/8"-wide through dovetails.... Concise, and providing just as much information to the informed. What happens is that there is meta-information underneath the words being used, conveying more than the casual observer might catch. When discussing whether to use one pattern or another, it's akin to deciding whether you wish to use dovetail or mitre jointing for that corner. When you write code, you're already using patterns behind the scenes anyway. It's nice to know what you're doing, and it's REALLY nice to have a shared vocabulary for this stuff.

    --
    It was a joke! When you give me that look it was a joke.
  18. Re:Who Actually USES These Patterns? by oops · · Score: 5, Informative

    Any good OO programmer/architect I know will speak in terms of patterns. eg. conversations I had yesterday went like:

    Can't you use a singleton here ?


    or

    Perhaps we need a strategy mechanism

    and so on / so forth. As soon as people talk in terms of patterns, they're talking at a level of abstraction above basic objects, and at a level where you're talking about object construction and interactions. Whenever I see someone's CV claim to have knowledge of OO, pattern knowledge is the next thing I look for. It means that we can talk in common terminology and have a common 'toolbox' of solutions to use.

  19. Re:Since the author didnt mention it... by Anonymous Coward · · Score: 3, Interesting
    This is the most inspirational book I have ever read for OO programming. There is no competition. When you read this, you will understand how to programm OO well. In addition, much of Java's libraries are based on patterns, so I say this is a must-read for anyone who wants to learn how to write quality Java code and also understand the Java libraries. The same probably goes for C# since that is Java in sheep's clothing. ;)

    If you like this book, I also recommend trying to find the (free!) whitepapers from Taligent about object-oriented frameworks. They may be hard to find since Taligent is long gone, but I am sure there is a copy on the net somewhere. They did go off on tangents at times, but they are still worth reading. (I believe some of the people who wrote this book were also on Taligent's research team.)

    I used both works quite a bit in my undergrad thesis. Though without this book's inspiration, the thesis would have likely not come to be.

  20. Real World Design Patterns by Waffle+Iron · · Score: 5, Funny
    Book learnin' is fine and all, but here are some design patterns from the real world:

    The Demo design pattern:
    Boss: We need to have a working demo by the trade show next month.
    Developer: OK, but it's just going to be a barely working hack. There's no time to do any proper design by the show. It's going to push back the ship date because we're going to have to rip out the kludges and redo them properly.
    Boss: Fine. Just get me that demo.

    The Ship date design pattern:
    Boss: We need to ship the product by the middle of next quarter.
    Developer: We don't have time to fix the demo hacks by then. We need more time to do a proper design. I told you that the ship date would be pushed back by the demo.
    Boss: Everybody saw it working at the show, and they wonder why they can't have it now. We have to go with whatever you've got.

    The Beeper Design pattern:
    Boss: Support has been getting a lot of calls from customers in the field. A lot of random crashes. We need to have a developer available 24x7 to help debug these problems. Here, take this beeper.
    Developer: I told you so.
    Boss: We need to get a demo of version 2.0 by the field sales seminar next month.
    Developer: Aaarrghhh!

  21. For those who don't know... by eric2hill · · Score: 3, Informative

    Have a look at Best Book Buys. They've got pricing for most books both new and used. Searching for Design Patterns currently shows a book for $35 used and $45 new.

    --
    LOAD "SIG",8,1
    LOADING...
    READY.
    RUN
  22. Me, too by Gruneun · · Score: 4, Interesting

    I'll vouch for the book. It was one of the textbooks from a Programming Languages and Paradigms class that I took. The first 2/3 of the class was advanced Java topics, but it became significantly more interesting when we dove into design patterns.

    Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides, a.k.a. The Gang of Four, did an excellent job. If you don't buy it, at least pick up a copy at Borders and skim it. You will be a better programmer for it.

    Here's another good breakdown of the book

  23. Re:Who Actually USES These Patterns? by tequesta · · Score: 3, Insightful
    Banking and Scientific Computing are hardly leading innovators when it comes to software design (COBOL, anyone? FORTRAN, anyone?) But apart from that, it is my firm belief that any programmer worth her/his wages uses patterns. They may not be the actual patterns portrayed in the Gamma book, but they're patterns nonetheless.

    The main good thing about this book is not that it lists a lot of patterns, but rather that it teaches you what a pattern is. This is truly a mind-altering experience. Once you grok the concept, you see patterns pop up all over your own code! Then you can extract and refine their specialties, encapsulate them and re-use them again and again.

    This, besides saving you a shitload of future work, teaches you entirely new ways of thinking about object-oriented programming. I've talked to a lot of people who found that reading this book is truly a mind-blowing experience in that respect. Certainly changed my coding.

    And the specific patterns in the book are kind of cool, too.

  24. Re:Only shit coders read books like this by Anonymous Coward · · Score: 3, Insightful

    uh, no. Authors of C++ device drivers are not the only "real" coders. I've risen far up the ranks in my career writing database apps with quality, intuitive front ends. My apps are well-designed, have few bugs, and solve numerous tasks that could not have been solved before I wrote them. The end users love me, and I'm well-compensated for what I do. I currently could not (nor wish to) write a low-level C++ device driver. Bleah.

    Anyway, if you've got to write a low-level device driver, why are you using C++ at all? Get down to assembly level and do it right!

    There are different types of problems out there that need solving. This book addresses ways of solving many of them.

  25. Re:read the first chapter at the book store. by fitten · · Score: 3, Insightful

    I wish you would have signed this so I would know to never hire you.

    Something that you are most likely too young and inexperienced to understand yet is that you do not write code for yourself to maintain. A coder typically writes code and others will maintain it (because you left for another job, got promoted, the project was handed off to a maintenance crew, you got fired for your crappy work, or whatever). THEY have to make sense of your code to fix/maintain it.

    If your code is cryptic and/or undocumented, it will cost your company/team lots of time (and time is money) and frustration to debug and/or modify it. Even if you are still in the group, someone else may need to go into the code that you wrote (notice that I did not say "your code" as it is not your code if you are working for a company or contributing to an open software project) to do something. If you routinely contribute such crap to open source projects, you will quickly be denied access to any further projects.

  26. Re:this book is out of date by Ripplet · · Score: 3, Informative

    >Most of the stuff in the design patterns book was interesting to look at 5 years ago when the book first came out.
    And is still perfectly relevant. Writing SW hasn't changed that much in the last 5 years.

    >You would be better off now to read through the JAVA class documents.
    This may help if you want to know how to write a nice class, but patterns are about getting good interactions between classes, they look at things at a much higher level of abstraction. This is one reason why they can add to a programmer's vocabulary.

    >Design Patterns that are published in a book like that lag the real practices of the software industry by many years.
    And they have been superceded by what exactly?

    >Folks who work in software lead the industry, they don't live in the publishing houses or in the ivy covered hallways of money mongering corporate universitys.
    Oh, and they never talk to each other? If I think I'm leading the industry, how do I go about spreading my fabulous ideas? Hey, maybe publishing a book would be a good way?

    >Now it is OUT OF DATE.
    No it is NOT. All the ideas are still valid, all the problems are still around, and the basic concept of patterns has spread enormously, so that now you get anti-patterns, analysis patterns, project management patterns etc. etc.

    --

    Skiing? Check out The Independant Skiers Portal

  27. Re:Only shit coders read books like this by russellh · · Score: 3, Funny

    Yeah. Mere coders shouldn't be reading books like this, lest they risk being distracted by a glimpse the big picture.

    --
    must... stay... awake...
  28. Design Patterns help "losers lose less" by Brad+Lucier · · Score: 5, Informative
    Peter Norvig explains why many of the classical design patterns used in C++ or Java are trivial or not needed in dynamic languages like Common Lisp, Scheme, and Dylan, and presents new, more powerful, design patterns for dynamic languages.

    Richard Gabriel thinks design patterns are important, but he also believes that the patterns found in the Gang of Four book for C++ and Java programmers mainly help losers lose less.

  29. Re:Since the author didnt mention it... by jgoral · · Score: 3, Funny

    The single sentence in the middle of page 18 alone is worth you mony.

  30. Maybe Slashdot needs a Book Review Moderation by puppetluva · · Score: 5, Interesting
    Design Patterns - arguably one of the most important books of all time in software design got an "8". I figured it would get a "10" because of its relative importance. . . so

    I went to look at other recent slashdot reviews to see what other books design patterns compares to. The results are hilarious:
    • 7.5 - The Legends Of Dune - Volume 1: The Butlerian Jihad (Design patterns barely beats it, evidently I should be torn between these two books at the bookstore)
    • 9 - Linux Prgramming by Example (A "by example book" blew away an architectual classic.)
    • 10 - Dynamic HTML The Definitive Reference (2nd edition) [Evidently this groundbreaking tome on DHTML is in another class from "Design Patterns"]
    • 8.7 - Extending and Embedding Perl (The message here is - if "Design Patterns" is on your shelf, may only be a bookend to "Extending and Embedding Perl".


    I think that we should have a way to vote reviews "fair, underrated, or overrated" (and have that change the ranking) because it is clear that books with limited applicability (some only a blip on the technology horizon) often get rated better than truly groundbreaking pieces.

  31. Re:ya, I couldn't talk till I saw that book by borgboy · · Score: 3, Informative

    Sure it's trivial. Much like the "trivial" civil engineering concept that a bridge built with too little concrete will fall down.

    Certainly, anyone who does "real" (as opposed to integer?) development will have discovered many, if not all of these patterns. Why wait years, when you can read about them? Patterns are studied in architecture - and humans have been building structures far far longer than they have been crafting software.

    Sure it's a catalog. It's also a lexicon. Does that invalidate it's utility? This is the kind of work that will help push software development into a estimable science instead of the craft it largely is today.

    Java(tm) and C++ and are excellent ways to document implementations of systems. However, a design pattern is intended to be an abstraction that can be applied to ANY language. That way, a Smalltalk developer can say "Strategy" to a Java(tm) coder and they both share the appropriate context.

    You seem rather hostile about this book, resorting even to ad hominim attacks upon the GoF, who have separately and collectively done a great deal to advance OOP. Perhaps you regret not having written down these obscenely trivial ideas yourself and peddling your own brand of software snake oil.

    --
    meh.
  32. Re:ya, I couldn't talk till I saw that book by Get+Behind+the+Mule · · Score: 3, Informative
    Holy mackerel, you have completely misunderstood.

    Anyone who does real development was using these patterns years before the book came out.

    Books like these are catelogs of other people's ideas and put into a standard format.


    Exactly right. That's what the whole idea of documenting patterns is about. A pattern is always something that has been done before, never an experiment. People who document patterns are not inventing them (because an invention cannot be a pattern); they are identifying and naming successful structures and ideas that were not well recognized until then.

    The advantage is simply that we often don't see these things until they are named and described. We use them unconsciously, but may not recognize when there is an opportunity to re-use them, may not have thought carefully about when it is and is not advantageous to use them, and don't have the vocabulary to communicate them to other programmers.

    It is like saying that noone could breath oxygen before the perodic table of the elements came out.


    No, it's like saying we always had oxygen all around us, but it didn't have a name and no one really understood its properties until Lavoisier discovered it.

    But when it comes right down to it JAVA or C++ classes do a much better job of documenting good design patterns for programming.


    Uh, are you aware that some of the Java library classes were specifically built to implement Gang of Four patterns? Look, for example, at the Observer class and Observable interface from java.util.*; does that remind you of anything?
  33. Obligatory Anti-Pattern Viewpoint by Tablizer · · Score: 4, Interesting

    GOF (Gamma, et. al.) Patterns show a primary flaw in much of OO philosophy IMO. The equivalent "patterns" in a procedural/relational (p/r) approach will typically involve roughly 80 percent relational query(s). IOW, "formulas" instead of "patterns". Formulas are not only more compact, but don't clutter up the larger-scale structure of the code. (LISP fans say similar things about GOF patterns, I would note).

    The "noun model" is mostly via the database in p/r, and is "virtual" rather than a physical code structure. GOF patterns thus look primitive, or "pre-virtual". Database designers in looking for common threads to managing noun models, discovered "pattern formulas" in the form of query languages, especially relational query languages.

    OO structures like those found in this book tend to reinvent incremental parts of database techniques from scratch each time. The programmer has to hand weave most of the interrelations and "indexing" between classes. The result is similar to the "network databases" that fell out of favor in the 1960's. The GOF Patterns movement is mostly a rehash of technology and philosophy that died in the early 70's, as variations of Codd's relational model proved superior.

    Thus, you are not only reinventing a (halfass) database with GOF, but reinventing an out-of-style one on top of that. A double-whammy no-no in my book.

    Dare I say "Disco Patterns"?

    If one understands how to use relational databases and technology properly, their need for GOF Patterns greatly diminishes IMO. I know I will take lots of heat for this, but it is what I believe. (Some niches may vary due to special requirements or equipment limitations. But I would note that 1980-era lite-duty DB's ran in like 64K.)

    (Is it just me, or is slashdot having network difficulties today? This is the 3rd repost try.)

  34. Decide for yourself... by johnlcallaway · · Score: 4, Insightful

    Is it worth it?? Can't say, never read it. But,as an antiquated piece of shit myself that has seen every TNBT (the next big thing) come down the road, it probably was outdated 2 minutes after it hit the news stands, replaced by TNBT.

    But, as an antiquated piece of shit who has bought dozens of other TNBT books, it might be worth it. We used to use things called algorithms, and had books written by the thousands with them. I still have a C book on my shelf at work that I reference from time to time because of code segments it has. A good book outlasts TNBT, since they basically all say the same crap. My test is to try and decide if it will make a good reference book, something that will be used every day and can make me an even better haxor than I are now (yes, I meant the poor grammer).

    My advice is to get off your lazy geek butt and get thee to a real bookstore, not one of those Internet things. That you can do for free (well, I think you still can, there might be copyright issues). Pick it up and actually read portons of it. Buy it online if you can save a few bucks, or buy it right there if it is so good you can't live without it.

    But, for geeks sake man (woman??), make up your own friggen' mind. Make a decision. Stand up for yourself. Don't follow the rest of TNBT sheep. Or go buy the damn thing because they said so, and continue to be an Windows NT programmer. (whoopss..did I say that??)

    --
    I rarely read replies, it's my opinion and if you thought about your opinion a little more, I'm OK with that.
  35. Design Patterns Aren't by prizog · · Score: 3, Interesting

    Dominus gave a hilarious and insightful talk at YAPC 2002 about Design Patterns, titled, Design Patterns Aren't.

  36. good to know about--but it's accepting defeat by g4dget · · Score: 4, Insightful
    You should know about design patterns. They simply are a clear statement of object-oriented techniques that programmers have known about for decades. Think of it as a grammar and hanbook of style for programming languages.

    But design patterns also show fundamental flaws in the object-oriented languages: design patterns are abstractions for which object oriented languages have no support. While object oriented languages have support for data structures and encapsulation in the form of type checking and access specifiers, when it comes to design patterns, you have to put them in by hand, document them by hand, and make sure they are working correctly by hand. Design patters are to object oriented languages like nested loops and data structures are to assembly language: you can implement them, but the language isn't going to help. The problem is that object-oriented languages really build abstractions out of individual classes and that individual classes are the units of abstraction and encapsulation, while design patterns require abstraction and type checking at the level of groups of classes. Attempts at supporting design patterns explicitly in object oriented languages so far also have been unsatisfactory as far as I'm concerned.

  37. Trolling earns +5 informative ? by Martin+S. · · Score: 3, Insightful

    the patterns found in the Gang of Four book for C++ and Java programmers mainly help losers lose less

    Pandering to 'wannabie elite hackers' is now enough to earn +5 informative? Jesus!

    If our Industry cannot develop the tools to move on from a hacking culture to a Proffessional Software Engineering culture, we may as well all give up and go and go back to living in mud huts.

    The most simple fact is that Patterns (and the GOF) are to software engineering what Whitworth was to the Industrial Revoulution, the ubiquitous standard that make it possible for a spanner manufactured in Sheffield to tighten a bolt from Africa in a Bridge in Deli.

    Try the following for a better insight into the importance of standards in creating a revolution.

    http://www.ama-cycle.org/features/whitworth.asp
    http://www.wired.com/wired/archive/10.01/standard s .html

    ---
    It's not the ignorance in postings that disappoint it's the ignorant moderation.