{"id":3,"date":"2008-11-08T12:51:11","date_gmt":"2008-11-08T12:51:11","guid":{"rendered":"http:\/\/www.vidarholen.net\/contents\/blog\/?p=3"},"modified":"2008-11-15T09:54:06","modified_gmt":"2008-11-15T09:54:06","slug":"test-2","status":"publish","type":"post","link":"https:\/\/www.vidarholen.net\/contents\/blog\/?p=3","title":{"rendered":"Cutecodes"},"content":{"rendered":"<p>There seems to be a number of cases where you want to check that two numbers are the same. This could be comparing a number on a printed record to a number on screen, comparing document IDs over the phone, seeing if two people share a phone number, or a bunch of other scenarios. This is highly error prone. Given that you can raed wrods wrhee the lertets are mxied up wouthit porbelms, it&#8217;s no wonder that 85142 and 85412 are easily confused.<\/p>\n<p>Humans are a lot better at concepts, and therefore words. Given the lines &#8220;snowman, blue kiwi&#8221; and &#8220;snowman, red camel&#8221;, anyone will easily see that they&#8217;re not the same. Even though &#8220;snowman, red camel&#8221; has three times as many characters as &#8220;85412&#8221;, I think most people would find the former easier for both long term and short term memorization. <\/p>\n<p>These happen to be actual examples from a simple number-to-string conversion scheme I devised. It&#8217;s based on a set of ten adjectives and a hundred mostly cute and happy nouns. I call the resulting strings &#8220;cutecodes&#8221;. You can test them below, by typing in some digits and hoping that my javascript skills haven&#8217;t rotted.<\/p>\n<p><!-- Feel free to steal --><br \/>\n\r\n<\/p> <!-- wordpress!@$%!#% -->\r\n<div style=\"text-align: center\" >\r\n<form id=\"cuteform\" action=\"javascript:false\">\r\n<script src=\"\/include\/cute.js\" type=\"text\/javascript\"><\/script>\r\n<table width=\"200\" style=\"margin: 0 auto\">\r\n    <tr><td>\r\n            <strong>Cutecode test:<\/strong>\r\n        <\/td><\/tr><tr><td>\r\n            <input type=\"text\" name=\"cute\" id=\"cuteinput\" onkeypress=\"setTimeout('update_cute();',10);\"  \/>\r\n        <\/td><\/tr><tr><td>\r\n            <span id=\"cutetext\">Javascript off?<\/span>\r\n    <\/td><\/tr>\r\n<\/table>\r\n<script type=\"text\/javascript\">\r\n    function update_cute() { \r\n        document.getElementById(\"cutetext\").innerHTML = number_to_cute(document.getElementById(\"cuteinput\").value);\r\n    }\r\n    document.getElementById(\"cuteinput\").value = Math.floor(Math.random()*2000000); \r\n    update_cute();\r\n<\/script>\r\n<\/form>\r\n<\/div>\r\n<p>\r\n<\/p>\n<p>The digits are grouped in threes, the first digit picks an adjective and the last two pick a noun. Here are some thoughts that went into the system:<\/p>\n<ul>\n<li>There should be a sizable amount of words. Here, an adjective and a noun will uniquely identify three digits. With some more work, you might have a hundred adjectives and a thousand nouns, for five digits.<\/li>\n<li>The words should be pleasant and inoffensive, no matter which order they&#8217;re put in. People might object to having &#8220;burning deamon&#8221; as their order number. &#8220;Cutecodes&#8221; came from the resulting high concentration of cute nouns. I tried not making it sappy though, since it should be usable in a serious corporate setting.<\/li>\n<li>Words should not be excessively culture specific. It&#8217;s hard making it global, but I avoided words like &#8220;gopher&#8221; which are primarly American. People will have a harder time remembering words if the concept are difficult to relate to. Since this is a proof of concept there are still some, like &#8220;lemur&#8221;.<\/li>\n<li>With four digits you get two nouns rather than two adjectives and a noun. This is because a &#8220;small, green pencil&#8221; and &#8220;green, small pencil&#8221; is the same concept but would map to different numbers (with this rule, you get &#8220;ginger, pencil&#8221; instead) <\/li>\n<\/ul>\n<p>It could be convenient to be able to convert cutecodes to numbers by hand. One way would be to use &#8220;A&#8221; and &#8220;B&#8221; as &#8220;0&#8221;, &#8220;C&#8221; and &#8220;D&#8221; as 1, etc, and picking the words so that &#8220;BArn&#8221; is 00, &#8220;CAlf&#8221; is &#8220;10&#8221; and so forth. So far, the nouns are just listed in alphabetical order, so you know that &#8220;earthworm, red carrot&#8221; is a lot less than &#8220;wizard, small mushroom&#8221;. <\/p>\n<p>Instead of even trying, I chose single syllable adjectives and double syllable nouns, all with mostly the same rythm: &#8220;black camel, green lemur, sweet raincoat, young almond, white puzzle, small lemming, dry bubble&#8221;. This sounds nice and takes the same number of syllables to say as the number.<\/p>\n<p>Finally, the words should be chosen so that they can be translated unambiguously between a few major languages. I didn&#8217;t bother with this either.<\/p>\n<p>I imagine that this could be shown wherever strings of more than 3-4 digits are displayed, to increase recognition by humans.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I suggest a simple number-to-string scheme for easily recognising and comparing numbers.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3],"tags":[],"class_list":["post-3","post","type-post","status-publish","format-standard","hentry","category-ideas"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3"}],"version-history":[{"count":0,"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vidarholen.net\/contents\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}