Live data from Hacker News

I'm Sick Of GOF Design Patterns

thecodist.com

1–10 of 46 posts

Re: I'm Sick Of GOF Design Patterns

#2
that's as good as saying "i'm sick of arcs, square windows, rafter roofs and linked lists". of course patterns aren't the end-all-be-all of software development. but it's the trait of a good craftsman and engineer to know what patterns exist and how to use them.

Sadly, and in that I agree with the author, people in interviews only ask for knowledge of patterns, not when and when not to use them.

in that sense, the title better were: "I'm sick of people thinking of patterns in an idiotic fashion", avoiding creativity at all cost". But then, that's just complaining about the single-mindedness of less experienced colleagues.

The patterns themselves and knowing how to use them I still consider a valuable asset and in parts, the author says that.

But beyond that, the value of patterns is that you can easily communicate with other developers about architectural decisions. And communication is 80% of software development in a team.

Re: I'm Sick Of GOF Design Patterns

#3
I've always taken these "design patterns" to be a Shibboleth of the bottom 80-ish percent of programmers.

The mediocrities can't handle math. If they dig deep enough into any technical area, they get confused and insecure and pissed-off. Design patterns is the Revenge of the Not-Nerds. It's to use the language of the business to turn the tables and make the actually competent feel queasy and unsure of themselves in the (artificially stupid yet complex) environment. It ends up reinstating a mediocrity-protecting connections- or seniority-powered system because no individual can get anything done.

I call the programmers who like that nonsense "math haters". (Rhymes with "death eaters".) Instead of y = sin a*x, which is "too mathematical", it's a Vibrator object with an .apply(double x) method that returns a double. That class of functions (parameterized by a) is a VibratorFactory. But since there can only be one, why not seem extra business savvy and call it a VibratorFactorySingleton. I'm going to throw in Proxy and Abstract and Visitor in there too, not because I know what they mean in this context (I don't) but because no one else does either so I can get away with it. It's an AbstractVibratorFactoryProxyVisitorSingletonFactory.

All because I needed to use a simple trig function. But (to the math haters) trig functions are scary!

So much of this "enterprise-y" nonsense is there not just to dumb down, but to smart-out (as in, drive the smart people out of) programming. It serves the interests of characters like Twitter's PHP CEO (obviously fictional, but people like him exist) who seek to commoditize programming at all costs.

For more on this: http://michaelochurch.wordpress.com/2012/04/13/java-shop-pol...

Re: I'm Sick Of GOF Design Patterns

#4
I had just finished undergrad computer engineering when the GoF book was published and it was a total revelation at the time. But as the author says, good ideas can be made terrible by too much slavish devotion and not enough thinking.

Re: I'm Sick Of GOF Design Patterns

#6
I learned a lot from reading the GOF book two or three years into my programming career. I think like most people, I'd already invented a few of its patterns, like pluggable Strategies, but it was great to have shared names for things.

On the other hand, I interviewed a while back and was talking about a web sockets project where my Javascript received a callback when a message arrived. "Did you think of that in terms of Design Patterns?" they asked. "Not really, callbacks are pretty common in Javascript." They really didn't like that answer. If I could think faster on my feet, I'd have whipped out that quote from Peter Norvig: "Design patterns are bug reports against your programming language."

Re: I'm Sick Of GOF Design Patterns

#7
> Yet people insist on you naming a design pattern in interviews, like it's a secret handshake, or asking a carpenter if they know any kinds of wood. What does it prove? Nothing.

Looking at someone's code is more useful than asking if they know patterns. But some knowledge of patterns is a good thing IMHO.

For example, if I can point at some of my code and say "Yeah, that's kind of like a factory" and know I'm understood by my teammate, then that's a good thing.

One goal of the design patterns movement was to introduce a terminology that could be shared and understood. I think they succeeded to some degree, because employers are looking for familiarity with this terminology. Why is it such a PITA?

> Programming isn't paint by number, every day you make decisions on what to write and how to design or structure the code in a continuous basis.

But wouldn't it be quite cool if you could check your thinking against other peoples successes and failures? Patterns simply catalogue problem/solution, I don't think you're supposed to implement them in a paint by numbers fashion.

Re: I'm Sick Of GOF Design Patterns

#9

I think what you're trying to say is that you're sick of people misusing or otherwise applying GOF patterns without thinking about them. Being 'sick of GOF patterns' is something entirely different.

Not entirely different. If a thing is so consistently misused as to controvert its original purpose, it's fair to say you're "sick of X" as a proxy for its community or educational standards or other meta-application.

I don't agree with the author's approach either, but I don't think he's trying to say what you think.

Re: I'm Sick Of GOF Design Patterns

#10

I've always taken these "design patterns" to be a Shibboleth of the bottom 80-ish percent of programmers. The mediocrities can't handle math. If they dig deep enough into any technical area, they get confused and insecure and pissed-off. Design patterns is the Revenge of the Not-Nerds. It's to use the language of the business to turn the tables and make the actually competent feel queasy and unsure of themselves in t…

That's well and good, but quite a lot of business value can be created using sub-elite programmers.

The problem with not having a good common vocabulary is that it makes it harder and harder to ever have proper engineering in software.

That said, your example of not being able to use trig is flat out unacceptable--that's things taken much, much too far. Even an average programmer shouldn't be afraid of basic trig.

Post reply on HN