Antipattern of the month #5: Inertia applied to software development

Things in the universe tend to be lazy. This was how Isaac Asimov used to explain inertia. Have you seen your project recently? Well, look again.

We are allergic to browsing documentation for the new, so we stick to the old-and-trusted, which becomes outdated at a slow pace and so do our knowledge and methods. When some stupid snippet of code is needed, wheel reinvention is the standard procedure just because it's easier/shorter than researching for alternatives. We do need it again in the next project, we copy (if lucky) or reimplement (if not so).

Everybody knows that commons-utils exist, yet there are dozens of implementations of StringUtils. Same with IoC frameworks a la Spring, to get an initial configuration up and running. Me, I have known about Joda time library for years. I had real-goddamn-big-bitter-ugly-beast-shaped experiences with the Date and TimeZone APIs a couple of years ago, and yet I was copying my third implementation of a DateInterval object when I decided to give Joda a go. In less than one hour it was deployed, they have a clean and simple date interval implementation and yes, they have Hibernate support. Man I do feel stupid.

Persistence is another example. Accept an advice, drop anything you have in hands and give JPA a try. Do this kind of things in small steps, because it feels good limiting the number of new technologies in a project, you know, to be able to deliver something with finite time.

Stripes instead of struts, sitemesh instead of tiles, spring, selenium, firebug, JSTL and drop those snippets of java inside the JSP. As a general rule, do yourself a favor and cut with the stick-to-what-works attitude. It's not a matter of reinventing the wheel, it's changing your square wheels with something that knows how to spin.