[PRL] Case exhaustiveness for interactivity

Mitch mwand1 at gmail.com
Mon Apr 7 07:32:28 EDT 2008


Hmm, sounds like a thesis topic to me...

Sent to you by Mitch via Google Reader: Case exhaustiveness for
interactivity via The Little Calculist by Dave Herman on 4/6/08 In
functional programming we're very good at exhaustive case analysis of
our data definitions. But I've found I'm pretty bad at reasoning about
cases in interactive programs. (Embarrassingly, I recently lost a
week's worth of data in an Ajax application I wrote due to a bad
response to an unpredicted server failure.)

What are all the possible actions the user could perform? What are all
the failure cases? What are all the possible interleavings of
interactions? These are harder questions than enumerating variants of a
disjoint union.

I think this is where dynamic safety (e.g., runtime tag checking in
dynamically typed languages or case-dispatch catchalls in statically
typed languages) is so critical: if you don't have a sound model for
enumerating the space of possible behaviors, you have to make sure that
there's some reasonable recovery programmed into the system for when
you encounter an event you didn't predict. This reminds me of
recovery-oriented computing and Erlang's "let it fail" philosophy.
Things you can do from here:
- Subscribe to The Little Calculist using Google Reader
- Get started using Google Reader to easily keep up with all your
favorite sites
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the PRL mailing list