Archive for September 2012


Spaghetti code defined

September 20th, 2012 — 7:21am

I recently read this article with interest – What is spaghetti code?.

As the title implies, it goes into a lengthy discussion of spaghetti code. So in layman’s terms, what does it mean if your developer refers to your application code as “spaghetti“?

In the old days, coding languages used a construct called a “goto” statement. This was used as a quick fix for bad coding – you could tell the program to jump to another portion of the code if it got to that spot. So it made the code flow like a strand of spaghetti, weaving back and forth.

Modern day programming languages don’t use goto statements anymore. So today, I define spaghetti code as that which has been poorly designed, or modified significantly since it’s original design. Usually this results in code being tossed in to accomplish some new feature, but not really meshing with the overall code. Think in terms of a single family house that has been turned into multiple apartments. You end up with odd sized rooms, strange room layouts, and the outside wooden steps leading to the second floor apartment entrance. It’s functional, but obvious to anyone that it wasn’t the original design.

With code, sometimes you can hide the code issues behind a nice facade of a gui interface, but usually some oddities bleed through. For instance, one feature doesn’t quite integrate with the rest of the application as it should.

Do you need to fix spaghetti code? Not immediately, but usually major applications and websites undergo a “full rewrite” every 5-6 years. This is because the code has grown beyond the original specifications, and has become unwieldy for the coding team to keep maintaining and expanding. It’s just part of the process with large websites and applications.

Comments Off on Spaghetti code defined | Programming

Is responsive design right for your website?

September 4th, 2012 — 4:57pm

One of the new buzzwords in the web design community is “responsive design“. This refers to website design that responds gracefully to the device it is being displayed on. While on the surface this sounds like a great idea, there are some drawbacks.

  1. It’s hard to design a site that works well on a big screen, AND a small smartphone screen. Elements get re-arranged, content gets squeezed, and the user experience can suffer.
  2. It’s disorienting – users that are used to the “desktop” version of your website, can be disoriented when the site looks different on their tablet or smartphone. If they are used to panning and zooming, they may prefer the site to stay the same, and the way they are used to viewing it.
  3. Less is not more. Users on smartphones can feel like they are “missing something” if the site looks stripped down from the desktop version.

The long term solution for building websites may indeed be responsive design, but I don’t think that’s clear yet. New devices and technologies may change the landscape yet again. While you can’t ignore mobile users, going after a full re-design at this stage may be premature.

Comment » | mobile

Back to top