Sunday, May 31, 2009

I Committed a Cardinal Sin of Software Development


Well, if I can critique the FDA, I sure as hell better be able to critique myself--and I blew it big time.

Cardinal Sin? Hard-wiring potentially variable data into an application (especially when you have no control over when the data is changed).

As my assiduous readers know (all 3 of them), I developed an iPhone app called FDA Mobile News. It's a glorified RSS reader for FDA news feeds.

The app contains the URLs for each RSS feed hard-wired into the application itself, meaning that if the FDA ever bothered to change those URLs, my app would no longer work.

Well, by my calculation, FDA had not changed it's RSS URLs in over 1.5 years, but guess what happened 1 day after my app was approved and put on the app store? Yep, FDA changed the URLs for most of those feeds and got rid of some of them altogether.

I woke up on Saturday morning to find my app throwing more errors than a drunken Derek Jeter. Now, it will take a week (hopefully less) to get the new version out the door.

I knew I shouldn't have hard-wired those addresses into the app, but I figured "hey, what's the likelihood that the URLs will change before I get around to making each app 'phone-home' to a central repository where I can change the addresses at will?"

"How long would I wait to do it the 'right way'?", you ask? As my wife pointed out...I was probably going to get caught up in other work and let it slide until it *did* become a problem--which in my case was all of 36 hours.

Bad Bad Move on my part.

(more on FDA feeds and other stuff later, though)