{"id":178,"date":"2006-01-19T00:59:21","date_gmt":"2006-01-18T13:59:21","guid":{"rendered":"http:\/\/www.somethinkodd.com\/oddthinking\/2006\/01\/19\/the-absurdly-simple-email-client\/"},"modified":"2006-01-19T00:59:21","modified_gmt":"2006-01-18T13:59:21","slug":"the-absurdly-simple-email-client","status":"publish","type":"post","link":"https:\/\/www.somethinkodd.com\/oddthinking\/2006\/01\/19\/the-absurdly-simple-email-client\/","title":{"rendered":"The Absurdly Simple Email Client"},"content":{"rendered":"<p>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. <\/p>\n<p>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 &#8220;LIST_ALL_COMMANDS&#8221; command, which was fine unless you couldn&#8217;t remember the command to list all the commands.<\/p>\n<p>I approached it a different way. If you typed an illegal command, like &#8220;foo&#8221;, my mail program would respond like so:<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\nCommand> <b>foo<\/b> \r\n\r\nCommand not recognised: foo\r\nLegal commands are:\r\n   * COMPOSE\r\n   * READ\r\n   * LIST\r\n   * DELETE\r\n   * QUIT\r\n\r\nCommand> _ \r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>When it was my turn to demonstrate my software to the class, I tried to explain my approach, but it wasn&#8217;t what was expected, and it wasn&#8217;t very well received.<\/p>\n<p>&#8220;But, isn&#8217;t there any way to type a command to list the legal commands? It was a requirement of the assignment!&#8221; they demanded.<\/p>\n<p>&#8220;No &#8211; errr&#8230; I mean Yes!&#8221; I stammered. &#8220;It&#8217;s &#8216;LIST_THE_LEGAL_COMMANDS&#8217; &#8211; let me show you!&#8221;<\/p>\n<blockquote><p><code><\/p>\n<pre>\r\nCommand> <b>LIST_THE_LEGAL_COMMANDS<\/b> \r\n\r\nCommand not recognised: LIST_THE_LEGAL_COMMANDS\r\nLegal commands are:\r\n   * COMPOSE\r\n   * READ\r\n   * LIST\r\n   * DELETE\r\n   * QUIT\r\n\r\nCommand> _ \r\n<\/pre>\n<p><\/code><\/p><\/blockquote>\n<p>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>During a training course on Ada and the Rational 1000, we wrote an absurdly simple email client.<\/p>\n<p>When it was my turn to demonstrate my software, it wasn&#8217;t very well received.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_s2mail":"","footnotes":""},"categories":[23,30,42],"tags":[],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-based-on-a-true-story","category-humour","category-rat1000"],"_links":{"self":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":0,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.somethinkodd.com\/oddthinking\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}