Monday, March 26, 2007

tests to prevent bugs: coral snakes and king snakes



I was presented with a PNG screen capture of an application some time ago and asked to brainstorm test ideas based on the static representation of a limited section of the application UI.

I think I acquitted myself reasonably well at the time, but I've been thinking about the situation since then, because there is an interesting aspect to this particular application: if this software has defects, the repercussions of such defects could have a drastic effect on the physical health of users.

Assume that this application exists in order to tell the difference between snakes, so as to warn people if they are dealing with one that is poisonous or not. This is a very far-fetched analogy, but it serves to make my point. Right now, the development is in early stages, and the software is able to tell the difference between rattlesnakes, cobras, and coral snakes. Tests for those are easy: rattlesnakes have rattles, cobras have hoods, coral snakes are red, yellow, and black.

But someday we're going to want to add more snakes, like a scarlet king snake. Before we go on, take a look.



I don't have any requirement right now to add a scarlet king snake to the system, nor will I know any time soon if there ever will be such a requirement. However, the risk of confusing the two snakes is so incredibly high that I feel compelled to mitigate that risk with a test.

The appropriate test, of course, is to add a record for the scarlet king snake anyway, and to make sure regardless of the state of development of the app that the app never, ever confuses the coral snake record with the scarlet king snake record.

But the snakes are incredibly similar. How to design the test? We have to do enough research to find the 100% distinguishing feature:
Red next to Black - is safe for Jack;
Red next to Yellow - will kill any fellow.
I put a test into my regression suite saying that regardless of any other criteria (which could change anytime: my app is under development) if red-is-next-to-yellow: always choose "coral snake"; if red-is-next-to-black: always choose "scarlet king snake".

I'd probably want to add a couple of other bellwether tests as well, for instance, to distinguish between cottonmouth water moccasins and other water snakes.

If these tests ever break, then my users' health is at risk, and my company is at risk for serious litigation.

Friday, March 23, 2007

Transactionless

Welcome back Mr. Caputo...

A number of people have been commenting on Martin Fowler's "Transactionless" essay. I didn't realize how unusual that approach seems.

I've said a number of times in public that if I had not begun my career by reading COBOL instead of, say, Java, I probably would not have gotten so far so fast.

Likewise, if I had not begun my career dealing with ISAM files instead of relational databases, I would probably have a much shallower understanding of what databases are and how they work.

In fact, of all the projects I've ever been a part of, one of the most impressive, most critical, and most educational was converting several enormous databases full of life-critical 911 location information from what was essentially a fancy ISAM arrangement to a true SQL database. Even at the time, though, our target SQL db did not have full support for referential integrity, so I became quite familiar with code that handles both referential-integrity checks and also that handles commits and rollbacks based on those checks.

I once wrote an article called "Old School Meets New Wave". Its funny how certain old techniques return to use over and over.

Monday, March 12, 2007

agile telecommuters?

I would be very interested in hearing if anyone other than Kent Beck has stories about telecommuting for software development projects, particularly agile-ish software projects, with high-bandwidth communication requirements and short iterations and such.

My original assumption was that it was a widespread practice, but now I think it's much more rare than I had assumed. Which is strange, considering the savings to the business on office infrastructure, etc. and the availability of communication tools like IM, Skype, VPNs etc. Not to mention cheap airfare when you have to make that site visit.

I am also interested in promoting the practice-- if you are a telecommuting wannabe, you should say so as well.

I want to live in paradise and no one else seems to want to (although, if you all did, it wouldn't be paradise any more)
-Kent Beck (on the extremeprogramming mail list)

Thursday, March 08, 2007

one good thing about the term "QA"

Most serious software testers of my acquaintance object to the term "Quality Assurance". There are any number of specific objections to the term, but the general objection is that competent software testing goes far beyond the definition of Quality Assurance.

However, searching for jobs online is a heck of a lot easier using the string "QA".

Sunday, March 04, 2007

a comprehensive guide to Google SketchUp Help

In case you ever want to navigate your way through all of the help available in Google SketchUp, here's a quick guide:

There is the Help Center with really basic information about downloading and installing, links to major areas, high-level FAQs and such.

The User's Guide (which interestingly enough looks fine in Firefox but gives me an "Error on page" in IE) has the real nuts-and-bolts of what each control does and how to use it. This is deep information about all aspects of the UI.

The Help Groups which is a link to all of the Google Groups that have to do with SketchUp.

Video tutorials which are fun to watch but might be a little slow for some tastes. But there are 26 of them, so if something is perplexing, the answer might be here.

Examples (actually model structures) of both realistic and wireframe buildings.

Quick Reference Card a one-page PDF describing in shorthand how to use all of the UI widgets

SketchUp Community with a link to the public Google Groups, but also another link to the "Pro" groups.

Ruby Help The introduction to SketchUp's Ruby API

Self-Paced Tutorials Very nice, basic, simple tutorials that run within SketchUp itself. Only 6 of them, and they don't cover the super-complex topics, but they'll take you a long way.

Send a Suggestion Just in case this doesn't cover what you want, people are listening :)