Convert your FHIR JSON -> XML and back here. The CDA Book is sometimes listed for Kindle here and it is also SHIPPING from Amazon! See here for Errata.

Monday, July 30, 2012

Why is Software Hard?

A long time ago, I was in a meeting with a colleague and several senior managers for a project we were working on.  He and I managed different development teams and were being lambasted by a manager (not our own) with respect to a recent bug.  The manager had previously made some comments about his extensive history in software (not realizing that both my colleague and I had more experience in the industry that he had).  He went on to compare software development to car manufacturing.  Why can Toyota build such great cars and we still have bugs in our software?

My colleague made a very simple statement:  "More moving parts."

According to this website, a typical car has around 30,000 parts when you take it down to the level of a single component (e.g., a screw).

Yet we measure software in thousands of lines of code, and a typical enterprise application has millions, tens of millions, or even hundreds of millions of lines of code (and some of that can be 10, 20 or even 30 years old).  And those parts can touch on each other in so many different ways not limited to the laws of physical space.

Some of the best studies (e.g., COCOMO), reports and books (e.g., Mythical Man Month) from decades ago estimate software productivity as being around 10 lines of code per programmer-day, or around 2.5 thousand lines of code a year.  I had an engineer who worked for me at that point in time who produced (measurably), 100,000 lines of code a year (and that was also bug-free).   He was five times more effective than the next-best engineer I had working for me, and my team was arguably 5x better than Brooks 10 lines per programmer-day estimate.  But even so, to consider what that team could do with respect to maintaining tens of millions of lines of code, it's just daunting.

In healthcare, we add to that complexity.  SNOMED CT codes for several hundred thousand concepts.  ICD-9-CM has over 14,000 codes and nearly 4,000 procedures.  ICD-10-CM has more than 68,000 codes, and ICD-10-PCS has 76,000 codes.  LOINC has more than 50,000 terms. RxNORM has nearly 500,000 codes.

Back to the car analogy.  Imagine how difficult it would be to build anything, if the thread count of every screw was different.  At some point, it is amazing that software developers manage to build anything at all.