TG #23: Antipatterns

February 12, 2009 – 6:00 am

This Tweak and Geek episode has us discussing antipatterns — that is, things you shouldn’t do, like programming poorly or NOT listening to Tweak and Geek. We also bring our Lame News feature out again.

Anti Patterns

Recently, Craig has become interested in software design patterns. They’re time-tested solutions to general problems. Although they do not, by themselves, deliver guaranteed results, they are good tools.

However, I’ve also noticed that bad habits are much easier to adopt than good habits. These bad habits, “antipatterns”, are “a commonly occurring solution to a problem that generates decidedly negative consequences”. Antipatterns can represent a lesson learned, rather than just a bad thing. The interesting thing is that using antipatterns don’t necessarily lead to failure, rather, they may lead to a bad solution to a problem. Think about when you first learned about exception handling in Java or C#. Say you’re performing a division. You get two numbers as input, and perform your division inside a try block. If the divisor is 0, your program will throw an exception. Well, that’s great, because you can just recover from it in the catch block. However, using the exception handling as a normal part of program flow is an example of something that works, but is a poor solution. Exception handling is a costly operation and can degrade the performance of your program.

Antipatterns don’t only exist in software. They exist anywhere that problems need to be solved. Wikipedia has a pretty good article on antipatterns, as does a consulting company’s wiki. Sometimes it seems that antipatterns are just an opportunity for someone to give an insoluble problem a funny name.

At there are several books (Antipatterns in Project Management, Antipatterns and Patterns in Software Configuration Management and AntiPatterns – Refactoring Software, Architecture and Projects in Crisis).

Here are some interesting management antipatterns from Wikipedia:

  • Design by Committee: Many contributors but no unifying vision. Too much consensus and not enough leadership.
  • Crisis Mode: Deal with things only when there is a crisis. Being reactive rather than proactive.
  • Analysis Paralysis: The inability to take action due to the over analysis of a problem.
  • Death March (SuperHero): Employees are expected to bear the brunt of a failing project with unreasonable expectations (deadlines or budgets).
  • Escalation of Commitment: The failure to rescind a wrong decision

Interesting Software Design and Programming Antipatterns

  • Gold Plating – Working on a project beyond its worth (i.e. 90% of effort in last 10%)
  • Magic Numbers and Strings – Hard coded values
  • Copy and Paste Programming – Copying and modifying existing code instead of implementing a general purpose solution (who hasn’t done this?)
  • Programming By Accident – Trying things until something works (html/css)
  • God Object – Having too much functionality in one object.

Lamest News of the Week

Kids With Nazi Names Taken From Home
Adolf Hitler Campbell, JoyceLynn Aryan Nation Campbell and Honszlynn Hinler Jeannie Campbell were taken into state custody. No comment on why, but this came to everyone’s attention when, last month (I remember this), a grocery store refused to put Adolf’s name on a birthday cake. Lameness?

  • Lame parents would name their children such
  • Lame grocery store taking editorial liberty with their birthday cakes.

Need your pr0n fix without that annoying captcha? Automate the captcha with a Javascript neural network! This is actually a nicely-written neural net… but it sure is odd to apply such high-tech to this sort of problem!

TrackBack URI for this entry is
  1. 2 Responses to “TG #23: Antipatterns”

  2. Good show.

    I used my own anti-pattern this week. I waited a few days before listening and then commenting on the podcast.

    Hurry up and get the listener driven show done.

    By ShadesOfGrey on Feb 18, 2009

  3. My problem with antipatterns is not realizing I’m using them until I realize I’m using them. Perhaps that’s the point.

    I second Shades’ motion to have the listener-driven show done. I’m curious what he came up with (I’m sure it’s better than mine).

    By Michael Swindler on Feb 25, 2009

Post a Comment