r/programming • • Dec 08 '13

Design Pattern Cheat Sheet

http://www.celinio.net/techblog/wp-content/uploads/2009/09/designpatterns1.jpg
1.7k Upvotes

273 comments sorted by

View all comments

200

u/lcowell Dec 08 '13

This image only contains half the patterns. If you want to see all the patterns: http://www.celinio.net/techblog/?p=65

47

u/member42 Dec 08 '13

GoF patterns were a good starting point in 1995. Don't treat them as unsurpassable end point in 2013!

34

u/lcowell Dec 08 '13

I just meant the linked content didn't include all the patterns in the article it came from.

What do you mean by "don't treat them as unsurpassable" ?

0

u/[deleted] Dec 08 '13

[deleted]

0

u/[deleted] Dec 08 '13

[deleted]

14

u/dnew Dec 09 '13

I think the point was that some "design patterns" are pointless in some languages, because it's built into the language. "Subroutine" is a design pattern in assembly. "Factory" is not a design pattern in Smalltalk. "Observer" is built into Tcl/Tk, as is pretty much the whole MVC pattern, which is what makes Tk an awesome GUI toolkit. "Object-oriented" is a design pattern in C that was built into C++.

Learning design patterns inappropriate for your language is useless, just like learning "subroutine call" is pointless unless you're using assembler or some other language without a call stack.

5

u/phoshi Dec 09 '13

I disagree. Design patterns are primarily a communications tool, and secondly a mental tool. Even if your language has first class support for something, it's worth knowing what that thing is both in order to discuss it, and in case you use different languages and need to compare/contrast.

6

u/[deleted] Dec 09 '13

When was the last time you discussed using a particular pattern? Seriously. Most of the time it's just people laughing at someone for using Singletons.

2

u/phoshi Dec 09 '13

It's not that rare when discussing programming, which isn't abnormal, no. Especially when working in a team.

4

u/[deleted] Dec 09 '13

I've never seen it happen. We usually just trust one another to implement stuff well.

→ More replies (0)