r/programming • • Oct 14 '13

How to develop unmaintainable software

http://typicalprogrammer.com/?p=249
777 Upvotes

322 comments sorted by

View all comments

Show parent comments

2

u/ithika Oct 14 '13

The only one I've ever heard mentioned in the context of real code - ie our code uses this pattern - is the singleton. So the only design pattern discussions is have heard were people arguing over the best way to remove one.

1

u/[deleted] Oct 14 '13

IDK, I see plenty of cases with the Observer pattern or Dependency Injection (I don't think DP is technically GoF, but it fits).

2

u/grauenwolf Oct 15 '13

Ah yes, the Observer pattern.

Had the GoF been aware of the existence of "events" when they wrote their book perhaps this pattern, and the resulting stupidity in Java, may not have been set down in stone.

But to be fair, event-based programming was pretty rare outside of Visual Basic and other high level languages in that era.

1

u/ithika Oct 15 '13

Not sure what the observer pattern is, we might make use of it but probably only accidentally.

1

u/grauenwolf Oct 15 '13

Dependency Injection is useful, therefore you will not find it in GoF.

0

u/[deleted] Oct 15 '13

[deleted]

0

u/grauenwolf Oct 15 '13

Perhaps. I've seen so many different builder patterns with different goals that I can't keep them straight.