Monthly Archives: May 2008

If It Is Awkward, It Is Probably Wrong

Just a short insight from programming an application for myself. Whenever adding or changing a feature

  • feels overly complicated
  • doesn’t quite fit into what’s already there
  • makes you feel you’d rather do something else

something probably is wrong or suboptimal with the architecture. Why? Because the opposite is so true: when the architecture is right, adding or changing features is a breeze. Just a few turns of the screw, and voila. No open heart surgery and wondering if things ever will work again like before.

As reasons why architecture turns out suboptimal, even if you develop for yourself and call all the shots, I found

  • An idea has not really been thought through. Get away from the computer, and “program” with paper and pencil for a while. Do something else for some time, and come back to tackle the problem later.
  • Changes crop up in places where they haven’t been anticipated and planned for. If an aspect of the program undergoes frequent changes, maybe consider implementing a mechanism accomodating that (a framework, plugins etc.).
  • The requirements changed so much the original approach just does not fit the problem optimally any more – acknowledge it, and change the architecture.

Just my €0.02.