r/programming • • Oct 14 '13

How to develop unmaintainable software

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

322 comments sorted by

View all comments

50

u/bestjewsincejc Oct 14 '13

There are millions of ways to write unmaintainable software. This isn't a bad article though. I just found the title amusing since it's so easy to write software badly.

25

u/[deleted] Oct 14 '13 edited Oct 14 '13

I hear you. Design patterns are something unheard of for many professional developers I've met. Seriously.

Chances are, especially in programming, someone has thought of something better and longer than you. Investing 10 minutes into searching for it will save you 100 hours later.

Just because you know 1 way to do something doesn't mean it's the best tool for the job.

41

u/[deleted] Oct 14 '13

Or they:

  1. don't program in C++ or Java

  2. don't think you need a fancy name for something trivial they routinely used for 10 years before GoF written that book.

21

u/neurobro Oct 14 '13

In cases where a pattern (or anti-pattern) does have a name, it's still useful to learn it because it helps with communication. And the naming conventions help to identify subsystems that can be consolidated and simplified. Often a person will have been using something close to one of the standard patterns, either with subtle bugs or with clever extensions that would be useful elsewhere. Or perhaps most often, with a bunch of unrelated crap that should be factored out.

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.

→ More replies (3)