4 ms·
design patterns are recurring patterns in code. you may not know how often you're solving problems in the same way, but patterns recur, even if they're not one
by orenmazor 16y ago
design patterns are recurring patterns in code. you may not know how often you're solving problems in the same way, but patterns recur, even if they're not one of the classic big-white-algorithms-book ones.
just because you dont have a class called Factory in your code, doesn't mean you're not using one.
and finally, if your programmer doesnt know what design patterns are, do yourself a favor and tell them to learn at LEAST what they are. they'll find a use for them, guaranteed.
- earl 16y agoWell, it's been my (and many people seem to agree) experience that the design patterns -- at least from the GOF book -- are really only recurring patterns in inferior languages. C++, java, etc. In languages with better abstractions, most of their patterns are useless or trivial.
- orenmazor 16y agoI'm not sure what the GOF book is, and while its been years since I was a c++ programmer, I'm pretty sure that design patterns are generally independent of language. also, "inferior languages"? really? can you elaborate? I would also like to transcend beyond the petty squabbles of mere mortals and my .net/python existence.
- chipsy 16y agoThe GOF book codified design patterns. You should probably read it.
- orenmazor 16y agodon't worry. I own it. I just call it by the author's names.
- earl 16y agoSorry, I thought GOF was a common name for it. I don't really have time to type out a long reply as to why C++/Java style design patterns don't occur in better languages, but I'd recommend putting some time in on lisp, ruby, or haskell. If you read idiomatic code in those languages, I think you'll understand my point.
- util 16y agoGoF = "gang of four". The book has four authors. http://en.wikipedia.org/wiki/Design_Patterns http://en.wikipedia.org/wiki/Design_Patterns I'm not sure if it's an intentional reference to the Gang of Four from the Chinese cultural revolution.
- nickik 16y agoshould i read GoF or SICP? What is more importend? Mmmhh I think im going to spend more time on SICP and PAIP then on the Gof Book and more programmers should do that.
- hga 16y agoUnless you intend to or need to program in languages with weak abstraction facilities (i.e. C++ and Java) there's little need to read the GoF book. If you know Lisp (i.e. have done SICP) then reading the GoF book will result in a "Where's the beef?" reaction, at least if you're anything like me.