Marshall Brain has an entertaining and wise tutorial/presentation on how to do it. While I was reading it, I thought his name sounded familiar, and then I realised I had read his book on programming the Motif user interface.
Hat tip to Pale Blue Dot for the pointer to the presentation.

Leave a comment