Wednesday, March 31, 2010

V&V

As a software/system engineer, I can't help but compare the process I follow to provide a product vs. the process our legislatures follow. Maybe I just don't get political science. The process I use may seem a little dry, but even cool products like the iPod and cell phone were not produced by a continuous stream of pizza parties and happy hours (or backroom deals).

Intro

Verification and Validation or "V&V" is the process of making sure that a product does what it was asked to do (Verification) and meets its intended purpose (Validation). In other words, verification is "I did what you asked me to do" and validation is "I met your needs".

In developing software, the process before V&V includes coding (writing the software), compiling (the computer converts your software into a program it can run), and testing (Make sure the program doesn't crash and appears to do what it should). For example, let's write a program that provides health care for every American.

Coding and Compiling

Which of the following two code samples will compile?

Code Sample 1:
for (american=1, american<=NUMBER_OF_AMERICANS, american++) {
provide_healthcare(american)
}

Code Sample 2:
for (american=1; american<=NUMBER_OF_AMERICANS; american++) {
provide_healthcare(american);
}

The answer is Code Sample 2, since a "for" loop uses semi-colons instead of commas and the "provide_healthcare" statement is not terminated with a semi-colon.

I think that one of the main complaints about the healthcare bill is that we don't understand the language required. The legal system is like a big compiler that expects the language to follow very strict rules that your average American is not familiar with.

Testing

Even though the code in sample 2 compiles, it crashes when we run it. The reason is that the computer starts with "0" when for the first American. Here's the fix:

Code Sample 2 Fixed:
for (american=0; american < NUM_AMERICANS; american++) {
provide_healthcare(american);
}


This compiles and runs, but we have to test to make sure the function provide_healthcare does what it says and has no side effects. One problem with software is what is called a "memory leak". This is where the software uses resources and doesn't properly return the resource to the operating system when it's done with it. Eventually the result is that the computer will start getting slow and then eventually crash. For critical applications, this can be very dangerous and precautions need to be taken in advance to recover from a computer crash to avoid catastrophe.

The "memory leak" problem is a big fear for health care reform. This is one of the main problems with Medicare.

Take the word of the Engineer


Another alternative to the above process is to ask the engineer "Is this going to work?". The answer is typically "Yeah, sure". The reality is that relying on this answer is like playing Russian Roulette. Even if the engineer is experienced and answers with confidence "I stake my reputation on this!!!", taking his word is no replacement for a rigorous V&V process.

Back to health care, it doesn't matter who voted for it, what the polls say, what groups (AMA, AARP, etc.) support it; the question is "Will it improve the health of Americans?" A second question (that V&V doesn't address) is "what will it cost?".

Sunday, March 21, 2010

How did we ever get anything done?

Last Thursday I got a text message from Jon at work:

"We'll merge in the morning. Be here around 9ish. See email".

We are currently working towards a deadline and we had to come in on our Friday off. I got home and checked my email. He needed my help with the "merge". Friday morning I pulled in the parking lot and I didn't see Jon's car. I was a little bugged until I read my email. It turns out Jon finished the merge about 2:00 am that morning. I quickly forgave Jon and was glad because I could start testing our software immediately. When Jon showed up around 10:30, I was surprised since I knew he had worked late.

Flashback to 1990


Whenever I needed to coordinate with someone at work (no instant messaging, email OR voice mail), I would call on the phone. Usually they weren't there, so the phone would roll over to the secretary. She would leave a note on their desk to call you. They would call back and usually miss you and then leave a note with your secretary that they were returning your call. Sometimes it took a week or two to get a simple answer.

The way I see it that with faster computers and better communication, we should be several times more efficient today than 20 years ago. I actually feel more efficient, I just don't remember how we got anything done that required people working together.

Flashback to 1986


I had a summer job as a research assistant. I was modifying a simple software program for my professor. It took 20 minutes to recompile the software after the smallest change. How did I ever get anything done?

Flashback to 1969


We landed a man on the moon. The computers they used had less computing power than my cell phone. How did they do that?

Friday, March 5, 2010

The Mental Health of California

I heard an interesting piece of news about California cutting benefits for the mentally ill. The news story argued that we should all contact the State government to tell them to not cut benefits. There are several syllogisms (logical appeals) that I would like to address.

Let's get my position out of the way on this:

P1. Society as a whole should provide support to families, individuals and institutions that care for the mentally ill.
P2. Charities, private businesses and individuals most likely do not meet all the needs of caring for the mentally ill.
P3. The only other significant source of support for meeting the needs of the mentally ill is the government.
C1. The government should use some of their tax revenues to help support meeting the needs of caring for the mentally ill that is not provided by other sources.

The first two premises (P1 and P2) I think are reasonable. P3 is only true insofar as I can't think of other sources of support. The conclusion (C1) is a valid logical appeal, but the truth of the premises need to be proven.

Here is the syllogism from the news story
P1. The government should provide support to families, individuals and institutions that care for the mentally ill.
P2. The government is cutting benefits for the mentally ill.
C1. You should contact the government to tell them that they should not cut benefits for the mentally ill.

I'm not enough of an expert, but my emotions agree with C2 while the fiscally responsible side is confused. These are unanswered questions:

Why is government cutting support for the mentally ill?
These are my premises:
P1. State revenues have dropped relative to financial obligations
P2. Support for the mentally ill does not have the priority (due to political and legal reasons) as other financial obligations (such as pensions, etc) do.
P3. Cutting funding for emotionally charged issues like mental health care is a political move to gain acceptance for increasing government budgets and is a distraction from the need to cut less critical expenditures in a time of declining state revenues.

An implied syllogism from the news story:

P1. State revenues have dropped relative to financial obligations.
P2. The people don't want the state to cut spending on critical programs like mental health care.
C1. Therefore, the State should spend more than it has or raise taxes.

This syllogism is not valid, since it does not address the total State budget and what other items could be cut. My version of this logical argument is:

P1. There are many families, individuals and institutions that operate at the margin of their budget that would be significantly overburdened by a reduction in mental health benefits.
P2. There are other means of cost cutting that would not cause undo burden on an individual. Examples (to name a few):
  • Cutting the salary ($117,000) for wealthy members of the California State Assembly.
  • Cutting the retirement benefits provided by California to wealthy recipients.
  • Cutting the budget of other programs.
P3. There are other means of revenue generation. Examples:
  • Wealthy Athletes, Hollywood stars, heirs/heiresses, etc.
  • Using more of California's rich resources (untapped oil and natural gas).
P4. A general tax increase will put an unfair burden on some Californians.
C1. Therefore, we should look for specific areas of cost cutting and revenue generation instead of raising taxes in general to help meet the mental health needs in California.

Tuesday, March 2, 2010

A Memorial to Chelsea King

I was shaken to the core when I found out what happened to Chelsea King. I don't know her personally. The first I heard of her was an email at work last week saying she was missing. The place where they arrested her murderer was the same place my sons and I go mountain biking. I remember my young son falling behind and it is terrifying to think that a predator lurked in the same area. This atrocity is too close to home.

Chelsea is not much younger than my own daughter. I can't imagine the pain this loss is causing her family and friends. I found out yesterday that a coworker lives in Danielle Van Dam's neighborhood. My friend's daughter was in Danielle's class at school and she had come over for a birthday party about a year earlier. She is still scarred by Danielle's murder after 8 years.

To remember the true horror and reality of the crimes against these girls, I recommend that the next time you watch CSI Crime Scene Investigation, CSI New York, CSI Las Vegas, CSI Miama, Law & Order Criminal Intent, Law & Order Special Crimes Unit, Criminal Minds, Cold Case, Bones, Without a Trace, or any other crime drama or horror movie (of which there is a disturbing abundance) ---

Remember it is real and it is ugly!!!

P.S. If I just ruined watching these shows for you, then this posting served its purpose.