Quantcast
Channel: Cadence Functional Verification
Viewing all articles
Browse latest Browse all 652

The Return of the Son of Real-World Assertions

$
0
0
I've received some nice feedback on my previous two posts about real-world situations that would benefit from assertions, so I will forge ahead with a few more examples. Last time I mentioned the DMV clerk who told me that glasses were required while driving if one eye was below the threshold but not if one eye was completely devoid of vision. One reason I remember that incident so clearly is that the clerk apparently failed to see any problems whatsoever with this line of reasoning.

That incident reminds of a trip last year when my family and I missed a connecting United Airlines flight because the first flight was running late. We ran to the gate and, of course, the plane was still there but the jet bridge door was closed. A bone-headed gate agent snippily informed me that we were being denied boarding because we had "not checked in at the gate" in time. I was dumbfounded. I pointed out that we were on another United flight and so of course we had not checked in at her gate. There were at least a half dozen of us trying to make the connection but she absolutely refused to re-open the door.

Of course, she knew perfectly well that we were all connecting and that the first flight was late. Her computer showed her that; airlines all the time wait a few minutes for connecting passengers from their own delayed flights. My guess is that the flight was oversold and that she had given away our seats despite knowing that we were arriving imminently. I could not believe that I was standing there listening to a presumably sentient human being scolding us for "not checking in" while we were on another flight on the same airline. She was missing an assertion for sure, and a lot more to boot.

In my last blog, I also talked about the closed financial services office directly customers a half-hour away "to serve you better." For another example of a mismatch between distance and convenience, type "cheap CDs" into your favorite search engine. I did this in an attempt to find some sites offering new or discounted music that I hadn't discovered yet. In the very first page of search results I saw a link for Princeton Record Exchange, and upon clicking it I was greeted with:

Can't Find It At
San Jose CD Stores?
Visit us in Princeton, New Jersey

That didn't surprise me; individual record stores all over the world sell on their own Web sites as well as through the usual channels (ebay, amazon, GEMM, etc.) But then I saw "We do not currently list our inventory or sell online" so I realized that when they say "visit" they really do mean a physical visit. So just for fun I clicked on "Directions" and requested a map for driving from San Jose to Princeton. I enjoy browsing at record stores, and this looks like a good one, but somehow I don't think I'm likely to drive 3,000 miles just to visit.

My final example for this post will be distressingly familiar. I had just finished an online purchase at some site or another when I was asked if I wanted to take an "online shopping cart survey." I don't remember which site I was using, but it was one that I frequented enough to be willing to give feedback. So I clicked on the link and up popped a page stating "This feature is currently not available." This is a good example of where an actual assertion would have helped: "if the survey is unavailable then don't ask the customer about it."

At least I didn't fill out a survey, try to submit it, and then see a failure. The latest (July 2011) edition of IEEE Computer magazine has a really good commentary on "Programmed Politeness" by Norwegian Professor Kai A. Olsen. He cites many such examples where programs and Web sites do things that defy common sense. The article is available from the IEEE but it looks as if you have to be a subscriber to access it. If you're not an IEEE member, here's an excuse to join. In the meantime I'll continue looking for more of my own examples of real-world assertions.

Tom A.

The truth is out there...sometimes it's in a blog.  

Viewing all articles
Browse latest Browse all 652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>