If you’re not a developer, this rant might not apply… (although there’s probably parallels in every discipline)
The “hard” stuff is easy. The “easy” stuff is hard.
It’s difficult to give a concrete example of this without going annoyingly deep into details, but I’ll try to capture the gist of what I mean with a made-up example: Let’s say you have a web site and you want the entire site’s look (logo image, background colors, highlights, etc) to change and reflect the season (Christmas, for example). If you think about this at the surface without knowing the technology (such as a manager or boss might), it seems like a huge, complex task. If you’re not privy to the knowledge of how things work, you’d likely assume that doing such a massive change could involve edits to hundreds or thousands of files! Daunting! (Which in manager-speak translates to: Expensive! Which means some web designers end up making a lot more than programmers do per hour.) And yet, this is actually quite easy stuff assuming you’ve done your CSS/HTML properly. Just a few changes to one or two files, some new artwork graphics, and you’re good to go - the entire site has been updated!
Ultra-simplistic example:
old CSS:
#header-logo { background: src(/img/logo.png) }
#header-title { color: black; background: white }
new CSS:
#header-logo { background: src(/img/xmas-logo.png) }
#header-title { color: red; background: green }
Just sit and think about that for a moment… a few changes and this potentially HUGE website got an entirely new look for the holidays. Every single page is changed. Wow!
So if something so “hard” as changing every page on the entire site is that straightforward, why not just change how the input box accepts input real quick, too? How about getting rid of the text box for “birthday” and putting in a day/month/year box with drop downs for each value? That can’t be too hard, right?
No, that sort of thing is not terribly difficult in the grand scheme of things, but compared to tweaking a few styles in CSS it is likely many orders of magnitude more time consuming and potentially error-prone. Why is that? It doesn’t make sense! It’s a small, localized thing - only visible in one input box. How hard can it be?!? Why does it take so long? What’s the big deal?!?
Well, there’s a ton of things that could potentially need to be changed just because of this “easy” modification. The number of changes that the developer makes is inversely proportional to the elegance, clarity, maintainability, and cleanliness of the resulting code. This birthday example is sort of simple, but maybe it can illuminate how a larger “simple” feature can result in a developer going totally insane as complexity ripples throughout the program…
Ok, so we’re changing the birthday field on an input form from a simple text box to three individual boxes. This means that the user-entered data now needs to be gathered from not one place, but three. This means the amount of code required just to get the raw data has trebled. Sure, in this case you’re talking about 3 whole lines - big deal, right? Well, in addition to those three lines, the final date would need to be rebuilt from the component parts and validated as a legal date (unless you want bad data in your database). So there’s more code to combine all the discrete parts back together. On top of that, the old input box was empty and this new input system requires pre-populating the drop down menus with numbers and month names and years - so that’s even more code that’s either hardcoded in the HTML itself or added as yet another condition that gets activated on page load or whatever.
Previously code might have looked like this (in a fake language I made up just now):
onPageLoad:
... nothing extra ...
onFormSubmit:
birthday = Date.dateFromString( Form.birthday );
And it has been transformed into this:
onPageLoad:
Form.birthdayDay.selectOneOf( 1 .. 31 );
Form.birthdayMonth.selectOneOf( Jan, Feb, ... etc.. );
Form.birthdayYear.selectOneOf( 1900 .. Date.currentYear );
onFormSubmit:
birthday = Date.new;
birthday.setDay( Form.birthdayDay );
birthday.setMonth( Form.birthdayMonth );
birthday.setYear( Form.birthdayYear );
Or something like that… (Note, I’m not cheating with the previous code that calls something named “dateFromString” as many common libraries have functions that do exactly that and will parse all sorts of user-generated date format strings.)
This example doesn’t even account for the fact that the HTML of the page probably had to change to accommodate the new drop downs, which means that the structure of the CSS may have changed a little bit, too, and possibly caused a headache for the web designer! On top of all that, my made up example language would actually be a welcome change to the insanity that it can take to do some of these things in some real-world UI frameworks (for the web or otherwise) which means in real life you’re probably looking at even more lines of code to manage everything. All for this so-called “easy” change!
I know this is a somewhat convoluted example, but I hope somehow my point has been made.
Whew. I wish I felt better… sadly, though, I have to go back to working on “easy” stuff that’s taking way, WAY too long. *sigh*