In defense of "In Defense of Not-Invented-Here Syndrome"

At work I've taken a hiatus from Asp.Net to write a PDA app. It comprises about a dozen forms arranged in a shiny Next/Previous wizard fashion and collects various odds and sods of data (dates and times, digital photos, scanned bar codes and the like) building, as it progresses, a business object. After each 'Next' tap, the data entered on that form is tucked gently into SQL CE 3.0 (or SQL Mobile 2005, as it appears to be called today).

The decision to keep the whole business object in memory as each stage is written to persistent storage could have been a bad one. But it does mean that when the user taps back and forth between completed forms, he doesn't have to wait for DB reads as I can fill the form from memory. Besides, we're only talking about 300K. The periodic DB writes are essential, by the way, to allow the app to exit (or, let's face it, crash) without massive loss of data.

One requirement I haven't yet mentioned is the collection of a GPS position. GPS devices are manifold but the decision was taken to select one of the most popular (in the UK, at any rate) SatNav applications because we might want to display maps on the device at a later date.

This application (let's anthropomorphise it.... Thomas is a good name) is very popular indeed. He's cool; everyone loves him. Thomas is the iPod of satellite navigation. If you don't have Thomas in your car, how on earth can you know where you're going? He also has, or so I was told, an excellent SDK. He probably has an excellent SDK if you're coding in C++. I'm not.

There are two ways I can talk to Thomas. I can either buy an interpreter - someone who is at home in my cozy garbage collected, intellisensed world as he is kneeling in the dirt chanting in hushed arcane tongues, P/Invoking Odd Thomas - or get down there and learn those same P/Invocations myself.

I tried. I really did. I almost had it too, but when you're whispering names from the book of the dead on bloodied knees, there's nothing like the inky shadow of The Deadline to really put the willies up you. Besides, as all good software engineers know - hold on - as I thought all good software engineers knew, it is much cheaper to buy COTS (commercial off the shelf) than it is to DIY. Suffice to say, we hired the interpreter.

Things looked up, for a moment.

Thomas is cool; everyone loves him. Thomas is the iPod of satellite navigation. Thomas comes with baggage, though. Thomas comes with luggage trolleys laden so heavily and precariously high as to frighten small children and cause a hazard to short haul air traffic. Thomas puts such a strain on my shiny little XDA that the next call to SQLCE after invoking Thomas' wrapper (which p/invokes the SDK which launches Monolithic Thomas) fails catastrophically. I rarely even get an exception to catch, my app simply unloads to leave Thomas' once beautiful but now, frankly, quite stupid looking face staring back.

Third party libraries? Not next time matey, not if I can help it. No, I'm a firm supporter of "In Defense of Not-Invented-Here Syndrome". When you're using third-party hardware, dongles and the like, you can't really avoid their SDKs, but you can minimise exposure by choosing the simplest, lightest ones and by sorting this stuff out at the beginning of the project, not at the end.

Comments

Popular Posts