{"id":578,"date":"2015-07-23T11:12:02","date_gmt":"2015-07-23T15:12:02","guid":{"rendered":"http:\/\/fazigu.org\/blog\/?p=578"},"modified":"2015-07-23T11:12:02","modified_gmt":"2015-07-23T15:12:02","slug":"why-80-characters","status":"publish","type":"post","link":"https:\/\/fazigu.org\/blog\/2015\/07\/23\/why-80-characters\/","title":{"rendered":"Why 80 characters?"},"content":{"rendered":"<blockquote><p>Searching for reasonable values for the\u00a0<code>*.vt100.geometry[5-6]<\/code>\u00a0xterm menu font-menu options in my <em>~\/.Xdefaults<\/em> file, I re-stumbled a\u00a0gem of computing history as the top-answer to a <a href=\"http:\/\/programmers.stackexchange.com\/questions\/148677\/why-is-80-characters-the-standard-limit-for-code-width\">question\u00a0on\u00a0StackOverflow<\/a>, and this pretty picture of an old IBM punch-card.<\/p>\n<p><a href=\"http:\/\/programmers.stackexchange.com\/questions\/148677\/why-is-80-characters-the-standard-limit-for-code-width\"><img decoding=\"async\" class=\"alignnone size-full\" src=\"https:\/\/fazigu.org\/blog\/wp-content\/uploads\/2015\/07\/XvPKy.jpg\" alt=\"\" \/><\/a><\/p>\n<p>Inspired by a perl script within the comments,\u00a0I ran this shell pipe:<\/p><\/blockquote>\n<pre style=\"padding-left: 30px;\">2015-07-23 10:30:00 :: ~\r\n rons@rons-VM$ find \/usr\/share\/terminfo\/ -type f -printf '%f\\n' |\r\n   xargs -n1 infocmp | egrep -o 'cols#[0-9]+, *lines#[0-9]+' |\r\n   sort | uniq -c | sort -nr | head\r\n 489  cols#80,  lines#24\r\n 58 \u00a0 cols#132, lines#24\r\n 55 \u00a0 cols#80,  lines#25\r\n 27 \u00a0 cols#80,  lines#34\r\n 15 \u00a0 cols#80,  lines#40\r\n 15 \u00a0 cols#80,  lines#31\r\n 14 \u00a0 cols#80,  lines#33\r\n 12 \u00a0 cols#126, lines#24\r\n 10 \u00a0 cols#85,  lines#64\r\n 8 \u00a0 \u00a0cols#80,  lines#42<\/pre>\n<p><em>Unsure\u00a0if\u00a0infocmp normalizes its output such that the cols and lines entries will always be adjoined, but this is good enough for my purposes.<\/em><\/p>\n<p>80&#215;24 wins by a landslide, with 132&#215;24 a distant second. \u00a0 Then I found a <a href=\"https:\/\/help.gnome.org\/users\/gnome-terminal\/stable\/app-terminal-sizes.html.en\">Gnome help page<\/a>\u00a0which added\u00a080&#215;43 and 132&#215;43 as options for its gooey{sic} terminal. \u00a0Next, a quick\u00a0stop at the <a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/svga.txt\">SVGA documentation in the Linux kernel<\/a>\u00a0with another list of common geometries.<\/p>\n<p>Finally, the\u00a0<a href=\"https:\/\/en.wikipedia.org\/wiki\/Text_mode\">Wikipedia Text Mode entry<\/a>\u00a0which included a neat table of common text modes:<\/p>\n<table class=\"wikitable\" style=\"height: 422px;\" border=\"1\" width=\"561\">\n<tbody>\n<tr style=\"background-color: #b8bab5;\">\n<th>Text res.<\/th>\n<th>Char. size<\/th>\n<th>Graphics res.<\/th>\n<th>Colors<\/th>\n<th>Adapters<\/th>\n<\/tr>\n<tr>\n<td>80\u00d725<\/td>\n<td>9\u00d714<\/td>\n<td>720\u00d7350<\/td>\n<td>B&amp;W<\/td>\n<td><a class=\"mw-redirect\" title=\"Monochrome Display Adapter\" href=\"https:\/\/en.wikipedia.org\/wiki\/Monochrome_Display_Adapter\">MDA<\/a>, <a title=\"Hercules Graphics Card\" href=\"https:\/\/en.wikipedia.org\/wiki\/Hercules_Graphics_Card\">Hercules<\/a><\/td>\n<\/tr>\n<tr>\n<td>40\u00d725<\/td>\n<td>8\u00d78<\/td>\n<td>320\u00d7200<\/td>\n<td>16<\/td>\n<td><a title=\"Color Graphics Adapter\" href=\"https:\/\/en.wikipedia.org\/wiki\/Color_Graphics_Adapter\">CGA<\/a>, EGA<\/td>\n<\/tr>\n<tr>\n<td>80\u00d725<\/td>\n<td>8\u00d78<\/td>\n<td>640\u00d7200<\/td>\n<td>16<\/td>\n<td>CGA, EGA<\/td>\n<\/tr>\n<tr>\n<td>80\u00d725<\/td>\n<td>8\u00d714<\/td>\n<td>640\u00d7350<\/td>\n<td>16<\/td>\n<td><a title=\"Enhanced Graphics Adapter\" href=\"https:\/\/en.wikipedia.org\/wiki\/Enhanced_Graphics_Adapter\">EGA<\/a><\/td>\n<\/tr>\n<tr>\n<td>80\u00d743<\/td>\n<td>8\u00d78<\/td>\n<td>640\u00d7350<\/td>\n<td>16<\/td>\n<td>EGA<\/td>\n<\/tr>\n<tr>\n<td>80\u00d725<\/td>\n<td>9\u00d716<\/td>\n<td>720\u00d7400<\/td>\n<td>16<\/td>\n<td><a title=\"Video Graphics Array\" href=\"https:\/\/en.wikipedia.org\/wiki\/Video_Graphics_Array\">VGA<\/a><\/td>\n<\/tr>\n<tr>\n<td>80\u00d730<\/td>\n<td>8\u00d716<\/td>\n<td>640\u00d7480<\/td>\n<td>16<\/td>\n<td><a title=\"Video Graphics Array\" href=\"https:\/\/en.wikipedia.org\/wiki\/Video_Graphics_Array\">VGA<\/a><\/td>\n<\/tr>\n<tr>\n<td>80\u00d750<\/td>\n<td>9\u00d78<\/td>\n<td>720\u00d7400<\/td>\n<td>16<\/td>\n<td>VGA<\/td>\n<\/tr>\n<tr>\n<td>80\u00d760<\/td>\n<td><\/td>\n<td><\/td>\n<td>16<\/td>\n<td><a title=\"VESA BIOS Extensions\" href=\"https:\/\/en.wikipedia.org\/wiki\/VESA_BIOS_Extensions\">VESA<\/a>-compatible <a class=\"mw-redirect\" title=\"Super VGA\" href=\"https:\/\/en.wikipedia.org\/wiki\/Super_VGA\">SVGA<\/a><\/td>\n<\/tr>\n<tr>\n<td>132\u00d725<\/td>\n<td><\/td>\n<td><\/td>\n<td>16<\/td>\n<td>VESA-compatible SVGA<\/td>\n<\/tr>\n<tr>\n<td>132\u00d743<\/td>\n<td><\/td>\n<td><\/td>\n<td>16<\/td>\n<td>VESA-compatible SVGA<\/td>\n<\/tr>\n<tr>\n<td>132\u00d750<\/td>\n<td><\/td>\n<td><\/td>\n<td>16<\/td>\n<td>VESA-compatible SVGA<\/td>\n<\/tr>\n<tr>\n<td>132\u00d760<\/td>\n<td><\/td>\n<td><\/td>\n<td>16<\/td>\n<td>VESA-compatible SVGA<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I think I&#8217;ll go with 80&#215;50 and 132&#215;60.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Searching for reasonable values for the\u00a0*.vt100.geometry[5-6]\u00a0xterm menu font-menu options in my ~\/.Xdefaults file, I re-stumbled a\u00a0gem of computing history as the top-answer to a question\u00a0on\u00a0StackOverflow, and this pretty picture of an old IBM punch-card. Inspired by a perl script within the comments,\u00a0I ran this shell pipe: 2015-07-23 10:30:00 :: ~ rons@rons-VM$ find \/usr\/share\/terminfo\/ -type f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[68,70,26,28,25,69],"class_list":["post-578","post","type-post","status-publish","format-standard","hentry","category-hacking","tag-hacking","tag-history","tag-linux","tag-screen","tag-sysadmin","tag-text"],"_links":{"self":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts\/578","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/comments?post=578"}],"version-history":[{"count":6,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts\/578\/revisions"}],"predecessor-version":[{"id":587,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/posts\/578\/revisions\/587"}],"wp:attachment":[{"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/media?parent=578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/categories?post=578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fazigu.org\/blog\/wp-json\/wp\/v2\/tags?post=578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}