{"id":5049,"date":"2014-12-13T20:42:55","date_gmt":"2014-12-14T03:42:55","guid":{"rendered":"http:\/\/g-liu.com\/blog\/?p=5049"},"modified":"2014-12-13T20:42:55","modified_gmt":"2014-12-14T03:42:55","slug":"home-row-advantage","status":"publish","type":"post","link":"https:\/\/g-liu.com\/blog\/2014\/12\/home-row-advantage\/","title":{"rendered":"Home row advantage"},"content":{"rendered":"<p><a href=\"http:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home.jpg\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"5079\" data-permalink=\"https:\/\/g-liu.com\/blog\/2014\/12\/home-row-advantage\/asdf-home\/\" data-orig-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home.jpg\" data-orig-size=\"640,426\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"asdf-home\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home-300x199.jpg\" data-large-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home.jpg\" class=\"alignleft wp-image-5079 size-medium\" src=\"http:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home-300x199.jpg\" alt=\"asdf-home\" width=\"300\" height=\"199\" srcset=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home-300x199.jpg 300w, https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home.jpg 640w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>I learned a lot of vocabulary just by going through typing lessons in fourth grade. Words such as &#8220;alfalfa&#8221;, &#8220;lads&#8221;, and &#8220;sass&#8221; were very common in the first few exercises, due to their exclusive use of the home row keys. I found most of these home-row words strange and esoteric, as if they were contrived solely for the purpose of teaching students how to type.<\/p>\n<p>Fast forward to seven months ago, when I was learning the Dvorak layout. Home-row words actually made sense in this world! Instead of words about vegetables, one could type common words such as &#8220;the&#8221;, &#8220;an&#8221;, &#8220;ones&#8221;, and &#8220;thin&#8221; with just the home row. Then I wondered, how much more advantageous, if any, is the Dvorak home row versus the QWERTY home row?<\/p>\n<p><!--more--><\/p>\n<p>To find out, I wrote a small Python script to go through a list of words (in this case, a dictionary), and select those which could be typed using the home row. The script itself was very easy to write, in part lending to Python&#8217;s fantastic list comprehension abilities. <a href=\"#methodology\">The &#8220;Methodology&#8221; section of this post<\/a> details the code used in the analysis.<\/p>\n<p>After running the scripts, the difference became obvious right away. Dvorak absolutely blows QWERTY out of the water when it comes to home-row typing. While QWERTY has a mere 822 words on the home-row list, Dvorak has over nine thousand. That&#8217;s over ten\u00a0times more home-row words than QWERTY. Even when disregarding acronyms and proper nouns, the distinction is clear.<\/p>\n<h2>Not just obscure words<\/h2>\n<p>Out of the top 100 words in the English language, how many can be typed in each keyboard layout? To find out, I used <a href=\"http:\/\/norvig.com\/ngrams\/\" target=\"_blank\">Peter Norvig&#8217;s analysis<\/a> of the Google Trillion Word Corpus. His website provides extensive analysis deriving from this and other corpuses, and includes a plethora of resources.<\/p>\n<p>Using a\u00a0text file containing 1\/3 million most common words in the English language, here is what I found:<\/p>\n<table>\n<thead>\n<tr>\n<th>Out of the top <i>n<\/i>\u00a0words<\/th>\n<th colspan=\"2\">Dvorak contains&#8230;<\/th>\n<th colspan=\"2\">QWERTY contains&#8230;<\/th>\n<th>Dvorak to QWERTY ratio<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>10<\/td>\n<td>8<\/td>\n<td>(80%)<\/td>\n<td>1<\/td>\n<td>(10%)<\/td>\n<td>8.0<\/td>\n<\/tr>\n<tr>\n<td>100<\/td>\n<td>32<\/td>\n<td>(32%)<\/td>\n<td>5<\/td>\n<td>(5%)<\/td>\n<td>6.4<\/td>\n<\/tr>\n<tr>\n<td>1,000<\/td>\n<td>103<\/td>\n<td>(10.3%)<\/td>\n<td>19<\/td>\n<td>(1.9%)<\/td>\n<td>5.42<\/td>\n<\/tr>\n<tr>\n<td>10,000<\/td>\n<td>543<\/td>\n<td>(5.4%)<\/td>\n<td>102<\/td>\n<td>(1.0%)<\/td>\n<td>5.32<\/td>\n<\/tr>\n<tr>\n<td>100,000<\/td>\n<td>2561<\/td>\n<td>(2.6%)<\/td>\n<td>379<\/td>\n<td>(&lt;1%)<\/td>\n<td>6.76<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Dvorak trumps QWERTY for its use of the home row, containing more frequently used words than QWERTY can even dream of. This property allows Dvorak users to type with more ease, whereas on the QWERTY keyboard, much of one&#8217;s time is spent on the top row.<\/p>\n<figure style=\"width: 799px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"http:\/\/cdn.arstechnica.net\/wp-content\/uploads\/2014\/03\/dvorak3.jpg\" alt=\"Most frequently used keys on QWERTY and Dvorak.\" width=\"799\" height=\"756\" \/><figcaption class=\"wp-caption-text\">A look at the most frequently used keys on QWERTY vs Dvorak. Note the distinct distribution of key usage for the different layouts.<\/figcaption><\/figure>\n<h2 id=\"methodology\">Methodology<\/h2>\n<p>The dictionary I used was the Unix dictionary, available on most Linux systems by typing <code>cat \/usr\/share\/dict\/words<\/code>.<\/p>\n<p>With Python&#8217;s comprehensions and set operations, it was very easy to determine whether a particular string was a subset of the characters on the home row.<\/p>\n<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\n# sys.argv is set by the user, and determines whether to\r\n# analyze with QWERTY layout or with Dvorak layout\r\nhome = set('asdfghjkl;\\'') if sys.argv&#x5B;2] is &quot;q&quot; else set('aoeuidhtns-')\r\nfor line in open(sys.argv&#x5B;1], 'r'):\r\n\tline = line.strip();\r\n\tif set(line.lower()) &lt;= home:\r\n\t\tprint(line)\r\n<\/pre>\n<p>The result can be streamed to a file in the command line, e.g. using <code>py homerow.py unix-dict.txt q &gt; row-q.txt<\/code>. Afterwards, <code>row-q.txt<\/code> can be analyzed against a text file of the frequently used words.<\/p>\n<p>The source code for the entire analysis is <a href=\"https:\/\/github.com\/g-liu\/home-row-explorer\/\" target=\"_blank\">available on my GitHub at home-row-explorer<\/a>.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content --><!-- AddThis Related Posts generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>I learned a lot of vocabulary just by going through typing lessons in fourth grade. Words such as &#8220;alfalfa&#8221;, &#8220;lads&#8221;, and &#8220;sass&#8221; were very common in the first few exercises, due to their exclusive use of the home row keys. I found most of these home-row words strange and esoteric, as if they were contrived solely for the purpose of &#8230;<!-- AddThis Advanced Settings generic via filter on wp_trim_excerpt --><!-- AddThis Share Buttons generic via filter on wp_trim_excerpt --><!-- AddThis Related Posts generic via filter on wp_trim_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":5079,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"Home row advantage http:\/\/wp.me\/p2Zt3y-1jr #QWERTY #Dvorak","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[830,19],"tags":[],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/12\/asdf-home.jpg","jetpack_shortlink":"https:\/\/wp.me\/p2Zt3y-1jr","_links":{"self":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/5049"}],"collection":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/comments?post=5049"}],"version-history":[{"count":12,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/5049\/revisions"}],"predecessor-version":[{"id":5090,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/5049\/revisions\/5090"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/media\/5079"}],"wp:attachment":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/media?parent=5049"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/categories?post=5049"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/tags?post=5049"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}