Tuesday, February 28, 2012

"Software" and "code"

As I suspect most developers do, I make a distinction between "software" and "code":

  • Software is the end-product: a website or web-application accessible by the end user, an installable GUI program, a long-running installable service, etc.  The point is: software is the product which customers purchase and use.
  • Code is the source code - the building blocks from which the software is made - including "raw" code (C#, Java, Ruby, Javascript, HTML, SQL, etc), configuration files, publicly-accessible APIs, and even the designs which govern how the subsystems are built and interact.  Most significantly, customers never see the code or directly interact with it.

Considering this distinction between software and code, it's not surprising that quality of software and quality of code are measured differently:

  • "Good" software is generally measured by number of bugs found during QA, number of issues found "in the field", function points implemented,, etc.  Sometimes it is measured using more "business-y" factors, such as customer satisfaction with the product, quantity of sales, etc.  And ultimately, by the only business yardstick that really matters to the company: profitability.
  • "Good" code is generally measured by its adherence to industry-standard best-practices (appropriate use of design patterns, appropriate use of the language / platform's idioms, adherence to "DRY" concepts, encapsulation and code reuse, etc.).  And sometimes by more quantifiable measures (completeness of code comments, unit test coverage, etc.).  In my experience, those quantifiable measures rarely reflect the actual quality of the code, but that's a discussion for another day.

So even though code is the building material from which software is made, the two are surprisingly distinct.  With that in mind, what is the relationship between code quality and software quality? 

I think I'll mull that over, and make it my next post.

1 comment:

  1. Trying to thing of other analogies. Part vs Car just didn't seem to work. Best I can come up with is Dinner vs Cooking. Dinner is what you make with the ingredients, how you mix them etc. Oddly enough, Dinner, like software, can also be measured by the number of bugs found :)

    Keep it up. Have been thinking of doing some sort of rambling "I'm older, listen to me" blog for a bit. Will be watching.