What design pattern not in go4 that I should know of??

This is a discussion on What design pattern not in go4 that I should know of?? within the Tech Board forums, part of the Community Boards category; What design pattern not in go4 that I should know of?? Just wondering what your input are?...

  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    71

    What design pattern not in go4 that I should know of??

    What design pattern not in go4 that I should know of??

    Just wondering what your input are?

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    Quote Originally Posted by kypronite View Post
    What design pattern not in go4 that I should know of??
    A googolplex of them... one for each new problem you face to which you can't directly apply a pattern described on that catalogue. The authors do make it clear somewhere, I think, that the idea is not to apply the patterns directly, but to build your own patterns based on the described ones.

    ...

    If you want to reduce Gang of Four, use GoF, not Go4.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    71
    Quote Originally Posted by Mario F. View Post
    A googolplex of them... one for each new problem you face to which you can't directly apply a pattern described on that catalogue. The authors do make it clear somewhere, I think, that the idea is not to apply the patterns directly, but to build your own patterns based on the described ones.

    ...

    If you want to reduce Gang of Four, use GoF, not Go4.
    I disagree,like what???
    I think googolplex for design pattern is really exaggerating...
    There some design pattern that are difficult to find like analysis matrix...

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I think what Mario is trying to say is that the design patterns are suggestions on how to solve a particular set of problems, but that can be applied to many other problems. But at the same time, there is all sorts of problems that the design patterns can not solve directly or with changes.

    Since there is an ALMOST INFINITE number of programming tasks, one can quite easily find MANY solutions that are not covered by the design patterns.

    And it doesn't matter if GOF comes out with 10, 20 or 100 more design patterns, there will still be problems out there that are not covered by those.

    On the other hand, having ready made solutions for some of the common problems that occur quite often in programming is a good start. Now, depending on what sort of programming you do, the chances of hitting a problem that is not covered by these design patterns will vary. I'm pretty sure that in the area where I work, inside an operating system, I find more cases where the design patterns are not working even after minor modifications, whilst someone writing "common" applications will probably find many more patterns that match their needs.

    In summary, what I'm trying to say is that there is no such thing as a finite number of designs to solve the infinite number of problems that programming will pose to us.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,438
    What do you want to know? That one of design pattern missing from the GoF is recursive functions?

    It's true that the term Design Patterns lacks a formal definition, but you are certainly smart enough to understand that the GoF addresses design patterns from an OOP overview and leaves behind non OOP languages (some might argue Design Patterns only make sense on OOP, but I strongly disagree).

    On the other hand, whenever you create the core solution to a problem that you can reuse over and over again to solve similar problems you are creating a Design Pattern. Similarly, when you ignore existing design patterns and create your own reusable solution to a known problem, you are creating a Design Pattern, even if it is redundant.

    Theoretically there's an infinite number of possible Design Patterns for each problem, and an infinite number of problems. Naturally some design patterns may be better than others and some problems may be solved with the solution from another problem. But infinite - x = infinite

    EDIT: matsp beat me on the minute mark.
    Last edited by Mario F.; 09-12-2008 at 02:06 PM.
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    71
    ok,my bad here.
    I guess I overexcited about pattern here.Since I spend many hours coding some sort of 'if and else' logic today.On my way back,I started thinking about ways to conquer the problem I encounter earlier.Then there's this eureka moment,I remember about state pattern.Hence my overexcitement.
    But hey,no problem in asking right.

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by kypronite View Post
    But hey,no problem in asking right.
    Absolutely not.

    "many if" can be solved by statemachines, but also tables [an oldfashioned technique of using an array to describe what input gives what output in some way or anohter] are a good possible help there.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  8. #8
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Let's not forget that with each new design pattern comes a new anti-pattern as well. New ways to really shoot yourself in the foot. I feel it's just as prudent to study anti-patterns as it is design patterns.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What design pattern to use here?
    By h3ro in forum C++ Programming
    Replies: 1
    Last Post: 04-15-2009, 06:41 PM
  2. Virtual function design pattern
    By George2 in forum C++ Programming
    Replies: 6
    Last Post: 03-19-2008, 07:18 AM
  3. what would be an appropriate design pattern?
    By Raven Arkadon in forum C++ Programming
    Replies: 2
    Last Post: 07-14-2006, 07:14 AM
  4. Cprog tutorial: Design Patterns
    By maes in forum C++ Programming
    Replies: 7
    Last Post: 10-11-2004, 01:41 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21