Software Engineering == Marriage … sort of

ORIGINALLY POSTED JULY 19, 2009

You know, programmers love to build layers, especially us (primarily) Java guys. For some reason, a language named after a caffeine-heavy beverage brings out the need to abstract away everything from everything else, to extend this and that, to build parts on top of parts on top of yet other parts.

The CIA uses layers to hide the truth. They tend to “abstract out”, so to speak, the field agents from the analysts, make it so that the truth is at least ten levels of indirection away. I guess the spooks are developers at heart!

I’ve known people who take the simplest of programming tasks and turn it into a monumental task, complete with implementation of 10 different patterns, 20 different interfaces because God knows we might need to implement a whole other way to add two integers together someday, and build delegates and DAOs and DTOs and VOs and Cheeri-o’s and O-rings and O MY GOD JUST STOP ALREADY!!

You know, a layer cake is good. It’s really damned good actually. Look at my gut these days and that fact becomes obvious. But too much will clog your arteries and make your heart explode at age 35. Thus it is with software engineering (I’m not really sure what that means, but it sounded good as I typed it).

Then there’s loose coupling. It’s great to have small parts with very fine-meshed interfaces that can be connected in new and exciting ways to do all sorts of whiz-bang things. I’m all for that.

And then, there’s love and marriage.

You see, love, and most especially marriage, is a WHOLE lot software architecture, at least the type I’ve described here:

  • Of course, there’s the KISS principle in software design (Keep It Simple Stupid, for those living under the proverbial rock, a principal more and more developers and architects seem to either forget or just don’t get these days). There’s, of course, a “kiss” in marriage, but unlike the KISS principle, which can lead to elegant, easy-to-maintain software, the “kiss” in marriage usually leads to a creation that sucks the life out of you, is anything but elegant, and is a bitch to maintain.
  • Marriage is an exercise in bad SOA (Service-Oriented Architecture): the interface between the two entities is highly unknown, constantly changing and very confusing. I’m not talking about the PHYSICAL interface of course. No, that’s pretty simple for most people. Trying to get the two objects in a marriage to communicate however is an exercise in frustration under the best of circumstances. A wife’s interface changes constantly, is prone to blow up if you feed it the wrong information, and is unusable for about a week out of every month. A husband’s interface is usually easily distracted by anything that can be thrown, or can be shown on television, tends to not remember values from one request to the next (which is how HTTP works, but men don’t remotely as well as the protocol does) and usually have too simple a data type collection (grunt, groan, hmrph, that’s about it). No, husbands and wives, like a client calling a service with a poorly-documented external interface don’t communicate very well on most occasions.
  • In a marriage, as in a poorly-designed system, there isn’t enough separation of layers. Now, of course above I was saying how too many layers is a bad thing, but on the other hand, if there’s not quite enough abstraction between layers, that’s just as bad. Components that know too much about each other are difficult to maintain separately. Translation for the married crowd: no time apart from one another leads to nothing good. There has to be some degree of separation, some degree of space, some degree of personal freedom, or things won’t work, much like a change in one function can break an entire system if not abstracted quite enough.
  • Like in a lot of software written today, love and marriage have terrible error handling. When something goes wrong, it isn’t usually handled gracefully, the whole system just falls apart. Statistics say that 50%+ of all marriage ends in divorce, which means the system couldn’t be rebooted. I suppose modern computers have an edge there because a reboot tends to fix just about anything, at least in the Windows world.
  • Marriage in general, like so much software written today, is an exercise in anti-patterns. The whole point of sex is to perpetuate the species. As such, the seeds should be spread around as much as possible (this isn’t an argument for being promiscuous; it’s just a statement of biologic imperative and evolutionary truth). So whose bright idea was it exactly for two people to stick themselves together and never do right by their species by ensuring genetic diversity?!? I submit that’s an anti-pattern! Love, and certainly marriage, is exercises in two people giving things up to be together. That’s an anti-pattern!

Of course, software engineering isn’t ENTIRELY like marriage:

  • The user interface of most software stays pretty static over the years. There are tweaks, sure, but most UI’s don’t change drastically over time, barring a complete rewrite of the application (which you can liken to getting divorced and then re-married). Husbands and wives, on the other hand, have interfaces that change drastically over time, and unlike software that can be re-written to have a prettier look for the marketing folks, married people don’t have it so easy. You got what you got, that’s the simple way to put it. When the hair, when the teeth fall out, when the fat hangs and the smells get more stringent, sorry, that’s the software you bought all those years ago, be happy with it!
  • When big development projects fail, lots of money is lost. There’s always plenty of blame to go around too. When a marriage fails though, it tends to be a lot less fair on one party or the other, and it tends to be the fault of one person or another. It’s nice to know where the blame should go I suppose, but not if you’re that target!
  • A successful development effort usually leads to someone wanting you to do more, better projects. With marriage, once you have that first success, so to speak, that tends to be it, no more come down the pipe. Not without running into the last point at least!
    *Aside from TurboTax, not many software projects will help you get more money back from taxes. Marriage does.

So you see, software development, love and marriage are all different sides of the same coin… a weird-ass three-sided coin I grant you, but the same coin none the less. So the next time you’re writing some software, think to yourself “hey, if I can do this, I can be in love and have a good marriage!” And always remember as you work through your marriage: “this is no harder than that trend analysis algorithm I wrote last week!”

I think you’ll be a happier person for it.

(Disclaimer: I am a happily married man, and a happily-employed software developer… any relation to your job or marriage, or anything resembling sanity here, is strictly a coincidence)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.