Archive for August, 2009

Quality, Quality Assurance

August 25th, 2009

I started writing software professionally late in 1997, if you consider the first real web site for which I was paid.  There really wasn’t a lot of architecture or process that went into that first site.  I had been reading on Perl and Javascript and wrote some very simple email forms, picture slide-shows, and did some Photoshop work.

I got going in earnest in the spring of 1998 when I was hired on as a web developer at a local Internet Service Provider.  At first what I did was more hacking that software engineering.  Maintaining Perl scripts written before my time (that had not been that well thought through to start with) and writing Classic ASP (we just called it ASP back then) that was more about getting it to work than getting it to work well.  But I had a background in computer science, and I soon started buying books to gain the Microsoft Certified Solution Developer credential.  This is where I was introduced to software engineering as a profession.  I distinctly remember reading about the roles Microsoft used for software development, and a matrix about who could wear multiple hats.  For example, a manager might also be a lead programmer, a designer might also be a developer.  But a developer could not also wear the hat of tester.  Microsoft was very, very clear on this point.

Of course we did not have a Quality Assurance department at our little ISP.  Hell, the web development department wasn’t even profitable the first year I was there so we weren’t about to spend money on someone just to test our stuff.  And we really didn’t need it at the scale we were at.  I had, at most, two or three other developers on my team during my tenure.  These were mostly part time; we simply weren’t building huge web applications.  Software engineering for me at this point didn’t include a lot of process; what I was doing really should not be called software engineering and I certainly wasn’t calling it that then.

After getting my MCSD and realizing that the entire software industry was booming I took a job with the State of Wyoming making the big cash.  The first big project I worked on had about 40 developers; there was no QA.  We tested our own stuff and occasionally each others stuff.  In hindsight this is surprising because Anderson Consulting (now Accenture) was running the project.  There were several individuals, including the manager, that had over 10 years of experience.  They should have known better.  I know I didn’t at the time.

Over the next couple of years I did a lot of contracting.  There was never any QA.  During this time I was really beefing up on .Net and my programming skills in general.  I noticed my skills increasing sometimes week by week, and definitely month by month.  I was optimistic, but I was still inexperienced.  I thought that quality programming was all that was needed to create quality software.  This myth had started for me in my early programming days, and had solidified at Wyoming, and was reinforced by the fact that I seemed to be writing better and better software and didn’t seem to need QA to do it.  However, I was also digesting a lot of books at this time that said the exact opposite of what I was thinking.

In 2003 we moved to Austin, and I started a full-time job with a local medical software company.  I had come a long way in the 6 years I had been in the field.  I was now convinced of the need for QA, for unit testing, and for other, industry proven methodologies.  I was fortunate to find a job quickly in a down economy.  I was unfortunate to go to work for a friendly, but completely incompetent manager.  She basically ran a cowboy coding shop.  There were no formal requirements to look at, there were no processes in place.  Even though we had a relatively small team information was poorly distributed.  We had no QA, and unit testing was downright discouraged.  I was beginning to think that QA was a myth; no one seemed to actually do it.  Was I wrong?  Had I been right earlier in my career?

During this time I continued reading about process; in the I realized that what we were doing was very wrong.  For the first time in my career the software was complex enough that the lack of QA was obvious in the final quality.  Here I had the proof in front of me. Although it could have been all the other things we were doing wrong – I am sure  When I had a chance to leave the company when even worse management took over I did.  And I found some QA.

I went to work at a second medical software company in Austin about 3 years ago.  There was an entire, dedicated Quality Assurance Department with Quality Assurance Engineers.  I was excited.  I thought I had finally found someplace with individuals that understood software development methodology and applied it to testing of software.  Boy was I wrong.  As the weeks and months rolled by I was moved from my initial R&D role doing framework development (no real QA interaction) to one doing production software (lots of QA interaction).  I soon learned that the vast majority of our QA “Engineers” really didn’t have any clue about software development.  In fact, they really didn’t know a lot about computers.  There were a few bright spots, and a few bright people.  There were definitely some hard working people.  But no real methodology was employed, and leadership in the QA department was horrible from the top down.

My first real experience with dedicated QA showed me a QA effort that only hindered the development of quality software.  Now I really reconsidered my stance.  Was I really, really right early in my career?  Is this why so many shops lacked QA, because QA just got in the way?  I had a hard time believing that.  There were a couple of stand-out QA people that did catch a lot of bugs and did help produce better software.  Most of these stand-outs lacked a background in software, and they all lacked any real empowerment from their management.  What would it be like to have a QA department with smart people that used good process and good management?  What would quality, Quality Assurance be like?

I got the answer last spring when I was laid off and quickly found a job with my current employer.  I ran into my second, real QA department in my career.  And this time I ran into the real deal.   We have engineers that all have a significant background in software development or IT.  I can think of at least three QA engineers at my job that know much more about networking and servers than I do.  I think they all know more about the product that I do.

Over the last year and a half I have come to the startling conclusion that not only is good QA important, but it might be the most important thing in software development of any significant complexity.  It is Quality Assurance Engineers, not Software Engineers, that have the most significant impact on Quality Software.  When this dawned on me a few weeks ago, I felt a bit lost.  The control had been taken out of my hands.  As a software engineer I realized I was not necessarily the most important portion of the product development.  It is the QA engineer that keeps me honest.  It is the QA engineer that tests my software in ways I would never have thought to test it.  It is the QA engineer, writing automation tests that pushes my software far past anything I could simulate.  At my current employer, our QA engineers vastly improve the quality of our software.

I continue to strive to learn new skills and to become a better software engineer.  But something I know is that I will never be a good QA engineer for myself, and am thankful for the people we have.  I think back on all those previous experiences.  I think of those managers at previous jobs that were hopelessly lost.  This is just one more lesson for me.  Trust the experts.  Trust your instincts.  And quality, Quality Assurance is really important.

Diamonds and Snow

August 24th, 2009

About a year ago I started digging back into science fiction reading.  I wanted to spend some time getting back into something I had really enjoyed when I was younger.  As a goal I decided to start reading Hugo Award winning books.  In the last year I have read a number of great science fiction novels from a variety of sub-generas, but none have taken hold of my imagination like the works of Neal Stephenson.

About 6 months ago I picked up The Diamond Age or, A Young Lady’s Illustrated Primer.  I had read an article about a reprinting of The Diamond Age which made the book sound fascinating, and it was a Hugo winner so it fit into my reading list.  Upon getting about 20 pages in, I thought nothing was further from the truth.  I wanted to put the book down and never see it again.  The story was confusing; it was being told from the perspective of about 7 different people most of whom didn’t interact with each other.  A coworker that had read the book some years before recommend I read to page 100, and if I still didn’t like it that I should quit.  By the time I got to page 100 I was enthralled with the book.  The depth in which Mr. Stephenson had researched numerous cultures and technologies was amazing, the characters he portrayed were multi-layered and real, and the various plots he was carefully weaving from multiple starting points had hints of dovetailing into something marvelous.  By the end of the book I was eagerly waiting for something fantastic, and the book did not disappoint.

It was with this experience that I purchased Snow Crash.  The publishing of Snow Crash predates that of the The Diamond Age by 3 years.  Snow Crash had apparently been the break through book for Stephenson back in the early 90s.  I dove right in.  This time I knew that the plot might be disorienting and splintered at first, but that I should pay attention and stick to it.  Snow Crash did not let me down.  Again I was impressed with the level or research Stephenson must have done in religion, ancient cultures, technology and various other subjects.  The characters and locations were futuristic yet real.  I found myself cheering for the Protagonist in the book (capitalized because that was his name) and his side-kick (which is what he referrers to her as).  The book has a wonder self-referential feel that one usually see from more mature, already-confident-from-their-success authors.  Stephenson knew what his world was, knew who his characters were, and knew what happened to them.  The book was a tour de force with no apologies.  When it ended I wished for a sequel which Stephenson has not written and probably will not.

I settled for the next best thing: I ordered a couple more Neal Stephenson book.  I have just cracked into my 3rd of his books, and am just now at that threshold where his initial introduction of characters is starting to turn to coherent plot.  Now I cannot believe that I ever disliked this style of writing.

I would highly recommend both The Diamond Age and Snow Crash to anyone looking for hard science fiction.  They are both well written, seem (for the most part) technically accurate, and will leave your mind racing after you are done.

Morality

August 23rd, 2009

Introduction

I have been putting a lot of thought into what defines my personal morality for some time now.  I came up with an idea a few years back, and I think it has survived the test of time and personal scrutiny.  It has also passed the scrutiny of several friends with whom I have discussed it.  For me all morality boils down to one rule with one caveat.

Rule and Caveat

Rule: Don’t do anything to another person that they consider harmful.

Caveat: Certain individuals (children, mentally incapable, etc) can be deemed by society as having that choice handled by others.

I have come to the conclusion that this statement covers everything I believe in.  The rule covers all major crimes that have some type of strict codification: murder, rape, theft, assault, kidnapping, etc.  It also means that I cannot force my beliefs on someone else.  And importantly, it means that if my dying friend needs help to leave this life, I can provide that help and it isn’t murder because he didn’t consider it harmful.

The caveat covers the case where the person in question is deemed to not have adequate judgment to tell what is harmful.  Society already makes this distinction, and so do I.  A child doesn’t know some things are bad or doesn’t yet have the maturity or experience to make that decision, so we as a society make it for them.  Children aren’t allowed to smoke or drink.  There are any number of other restrictions on children.  The same points can be applied to aging members of society with dementia, and those members of our society with mental health issues.  But we do give some choices to children.  And the choices that are handled by the children vs. family or society are determined by various criteria.  This caveat is not a hard line drawn in the sand.  Its a principle to be followed with judgment.

Justification

My justification seems to follow from the principle that we are self-aware beings.  We have choice and free will, or at least the illusion of such.  If you define being human in terms of being self-away and having free will, then it naturally follows that anything that constrains this is anti-human.  This is where I would squeeze in my idea of morality.  I have a free will and you have a free will; if we get in each others way then that is the point of conflict and the only possible point of morality.  Why follow any other artificial constructs?

Application of Personal Morality

All laws that do not agree with these moral principles are against them.  This is fundamental to the first (and only) rule of my morality.   For example, a law that limits two adult gay people from having a relationship is immoral.  If these two people are consenting, then their relationship isn’t breaking this moral rule.  But a law against it is.  This law is forcing onto these two people some other person’s belief systems.  These two people do not deem their relationship to be harmful to them, but they do deem this unwarranted intrusion harmful, so the law is immoral.

I think my morality boils down to this: freedom.  Pure and simple, freedom from everything and anything unless that anything is harmful to someone else.  Should I be able to smoke?  Yes.  Should I be able to smoke in a crowded restaurant where second hand smoke can cause other people harm?  No.  Should I be able to worship any deity I choose?  Yes.  Should I be able to make laws based on those religious beliefs that impact others? No.

Social Impact

Of course absolute rules of morality break down in a society where we have to share some resources for the good of all.  And if you carefully read my caveat, I am actually stating that I believe society or family needs some say over who gets full control of their own free will.  I am quite aware of the contradiction here.  This is a kind of recursive definition; I think if you exam many things in life you will find this type of self-referencing structure.  To be blunt I am not sure how to boil this down to a simpler explanation.  At some point society has to make a determination about others in that society.  I believe that determination should be as liberal as possible.  That is to say, that society should try to err on the side of free will as opposed to the side of enforcing restriction.  But the line has to be drawn somewhere.  And there are obvious barriers that should not be crossed.

What sacrifices to my own free will should I be willing to make to gain the benefits of society?  What do I contribute so that I have security and a better life in general?  Where do we force upon others these same sacrifices?  I live in a country (United States) where I am forced to pay taxes for a number of things I will never use myself, but can be argued help society as a whole.  A lot of it I would argue doesn’t help at all or actually hurts us.  I think this is where personal morality starts to run into social morality as stated above.  Should  we have a big military to protect us or a small military, or should the defense of our nation simply be up to individuals?  Should we have a central health care system or should health care be the responsibility of each citizen?  Where do we draw these social lines?  I don’t know where my moral principle draws a line on these issues, or if it even can.  This is the one place it really fails me.  But that is built in to the rule and caveat.  Its OK that it fails here.

Conclusion

In my personal life I think this morality has began to really serve me well.  I feel I am less judgmental of some  people, that I am more open minded.  I feel more at peace with my beliefs and the way they shape the way I live my life.  I feel less trouble trying to justify myself.  And I also feel that if I make a bad decision that I have the flexibility and freedom to change, to say what I did was immoral and change my opinion or my actions.  Carying around the luggage of a strict religious doctrine makes this much more difficult.  Carrying around a simple, derived from the nature of existence system seems unencumbering yet fair.

Cash for Clunkers Numbers

August 5th, 2009

I don’t personally like the politics behind Cash for Clunkers.  I believe in small government and free markets.  I mean, really believe in them, not just as a political slogan the way the GOP does.  Having said that, I find the numbers interesting:

  • $1 billion dollars in the initial government investment
  • $3500 to $4500 offered for a clunker depending on various criteria
  • To date the cars being purchased are averaging about 10 mpg better than those they are replacing.  Specifically, the average of those traded in is 15.8 mpg and the replacements is 25.4 mpg.
  • The national average for a gallon of gas is currently $2.57
  • The federal government estimates the average car drives around 15k miles per year
  • The federal government estimates US drivers in total will use 345 million gallons per day in 2009.

Let’s guesstimate that the average money given to a consumer is $4k per car.  When the initial $1bn is used up (most likely sometime this week) about 250k cars will have been sold.  If we assume that these cars are being driven 15k miles a year (both the car being replaced and the new car) and the average of those autos went from 15.8 mpg to 25.4 mpg then we are taking 359 million gallons of consumption per year off the market.  In contrast if we took $1bn and just bought gas we could afford about 389 million gallons of gas.  This program will break even in a year and a week.  These are obviously very rough numbers.  And when one considers that we use about 345 million gallons per day, we have only removed one day of usage from the road per year for the $1 billion spent.  Obviously this trend cannot continue forever.  We cannot spend $36.5 billion and reduce our gasoline consumption by 10%.  If we could, it would be an easy sell.  Right now we have removed almost 0.3% of gasoline demand.

Each of these consumers will save about $922 a year with their new car in reduced fuel consumption.  It amazes me that people weren’t already upgrading on their own.   Many of these clunkers would probably get some minimal trade in value, say $1k.  These individuals would have seen a benefit in 4 years in reduced fuel consumption.  Of course all of this is neglecting both the benefits of less environmental impact and less reliance on foreign oil, but we haven’t made a huge dent in either.  That is not to say we should not try.  Of course we can pay for those 250k deals with the cutting of seven unneeded F 22 fighters.

Its also worth noting that 10 MPG is a big change, but when you think of the actual mileages involved its actually a 61% increase in efficiency.

From a free markets perspective, I don’t really like this program.  Its taking our tax dollars and rewarding specific consumers and specific businesses.  From a pragmatic perspective, it seems like it has done remarkably well so far.  I would like to see this also offered with more stringent MPG requirements for used cars as well, if they are going to continue the program.

Sources:

http://www.time.com/time/health/article/0,8599,1914602,00.html

http://www.eia.doe.gov/oil_gas/petroleum/data_publications/wrgp/mogas_home_page.html

http://wheels.blogs.nytimes.com/2009/08/04/ford-focus-tops-rebate-purchases/?nl=wheels&emc=wheelsa1