In my experience, being familiar with anti-patterns is as vital as knowing patterns themselves.

Despite an abundance of literature on patterns, there is a surprising lack of literature on anti-patterns. Browsing the web usually reveals advises that are either too vague (e.g. "do not use global variables"), too specific (e.g. "java.lang.Boolean.getBoolean doesn't do what you think it does") or obviously wrong to begin with (e.g. God object).

What I am looking for are anti-patterns that appear to be good solutions at first glance, but tend to lead to issues further down the line.

Do you know any good source of such anti-patterns? (the only good example I know is SQL Antipatterns)

  • 8
    Why does everything these days have to be a pattern? And by extension, the bad things be an anti-pattern?
    – Pieter B
    Aug 26 '13 at 8:48
  • 1
    There are many contenders, but most people will still do a search at c2.com/cgi/wiki for discussions and viewpoints from the gurus of the last decade.
    – rwong
    Aug 26 '13 at 13:12
  • 1
    @Pieter Why can I only +1 you a single time!?
    – KChaloux
    Aug 26 '13 at 14:03
  • @PieterB, there is an easy explanation for the recent surge in interest in the so called "patterns": en.wikipedia.org/wiki/Apophenia
    – SK-logic
    Aug 26 '13 at 14:47
  • Did you try searching Amazon.com for "antipatterns"?
    – user16764
    Aug 26 '13 at 20:57

being familiar with anti-patterns is as vital as knowing patterns themselves

I agree! If you are avoiding all the anti-patterns then you are probably following the good patterns.

I recently took interest in finding anti-patterns and came across Wikipedia's Anti-Pattern Examples which has a large categorized list of anti-patterns and I wanted an alphabetical listing so I put all of them into an alphabetical list on my blog.

Related terms: code smell, dark patterns, common programming pitfalls, bad programming practices

Anti-patterns that might seem like a good idea at first:

  • Unfortunately, the anti-patterns mentioned at Wikipedia hardly fulfill "appear to be good solutions at first glance" part. Aug 27 '13 at 13:41
  • @MarosUrbanec Just like patterns are applied based on the context of the problem I think that solutions that "appear to be good solutions at first glance" but aren't will also have to be taken on a case by base basis. Using a particular architecture might be considered a good solution in one context but when used in another context would be considered "overengineering". Aug 27 '13 at 20:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.