OddThinking

A blog for odd things and odd thoughts.

The Absurdly Simple Email Client

During a training course on Ada and the Rational 1000, we wrote an absurdly simple email client. It had an absurdly simple command line, with a user-interface that was guaranteed to be poor, based purely on the language features we were required to demonstrate.

One of the requirements was for a way for the user to list all the possible commands that they could type. Most people in the class implemented this by adding a “LIST_ALL_COMMANDS” command, which was fine unless you couldn’t remember the command to list all the commands.

I approached it a different way. If you typed an illegal command, like “foo”, my mail program would respond like so:

Command> foo 

Command not recognised: foo
Legal commands are:
   * COMPOSE
   * READ
   * LIST
   * DELETE
   * QUIT

Command> _ 

When it was my turn to demonstrate my software to the class, I tried to explain my approach, but it wasn’t what was expected, and it wasn’t very well received.

“But, isn’t there any way to type a command to list the legal commands? It was a requirement of the assignment!” they demanded.

“No – errr… I mean Yes!” I stammered. “It’s ‘LIST_THE_LEGAL_COMMANDS’ – let me show you!”

Command> LIST_THE_LEGAL_COMMANDS 

Command not recognised: LIST_THE_LEGAL_COMMANDS
Legal commands are:
   * COMPOSE
   * READ
   * LIST
   * DELETE
   * QUIT

Command> _ 

Everyone immediately nodded their head in approval when the list sprang out as they expected. I almost got away with it, until someone started laughing when they cottoned on to what I had done.


Comment

  1. Hehe.

    Command not recognised: LIST_THE_LEGAL_COMMANDS

Leave a comment

You must be logged in to post a comment.