Sun 02 Apr 2006

A year as a man

Norah Vincent spends a year in drag. Fascinating.

Posted at 2006-04-02 15:18:13 by RichardLink to A year as a man
Comments, trackbacks.

One, two, many

There is a bit of community wisdom amongst programmers: any time a choice appears between two things, make the logic work for an arbitrary number of options, because you can guarantee that the number of options will expand soon enough (cf. Booleans suck).

This came to mind after fiddling with a bit of code today. Working with voice interfaces is complex — people expect interfaces to adapt to the options available. No numbers, one number, two numbers, three to five numbers, lots of numbers; no actions, one action, a few actions, lots of actions… each should be treated differently. The same patterns keep coming up:
(case (length x)
(0 …)
(1 …)
(2 …)
(t …))
This is rather at odds with the ‘adapt and generalise’ approach taken in code, but it's necessary. It's curious seeing the fine line between the flexible, general, list-passing application code, and the verbose, case-by-case interface generation code. I don't see a better way, though.

Posted at 2006-04-02 00:01:45 by RichardLink to One, two, many
Comments, trackbacks.

Google
Web holygoat.co.uk
  • richard is: