{"id":275,"date":"2015-06-18T08:40:35","date_gmt":"2015-06-18T08:40:35","guid":{"rendered":"http:\/\/localhost:8000\/?p=275"},"modified":"2015-06-18T08:40:35","modified_gmt":"2015-06-18T08:40:35","slug":"the-myth-of-code-anyone-can-read","status":"publish","type":"post","link":"https:\/\/blog.gwadej.org\/programmer-musings\/2015\/06\/the-myth-of-code-anyone-can-read\/","title":{"rendered":"The Myth of Code Anyone Can Read"},"content":{"rendered":"<p>I got into a conversation recently coming out of the Houston.pm user group meeting. As usual, we wandered over numerous technical topics, but one stuck out in my mind: whether or not to use more advanced or more complicated language idioms.<\/p>\n<p>I&#8217;ve written about programming idioms and advanced code many times in the past (<a href=\"#list\">see below<\/a>). Part of the reason for revisiting this topic repeatedly is a mindset that I have seen throughout my career. The idea is to <em>write the code so that anyone can read it<\/em>. Although this sounds reasonable at first, lowest common denominator code (<abbr title=\"Lowest Common Denominator Code\">LCDC<\/abbr>) almost always results in a hard-to-maintain code base.<\/p>\n<h2 class=\"subhead\">The Failure of <abbr title=\"Lowest Common Denominator Code\">LCDC<\/abbr><\/h2>\n<p>There are a number of reasons for this simple idea to fall apart. The most obvious comes from your experience of reading text in a human language. If we wanted to keep the text at a level that <em>anyone<\/em> could read, everything would need to be written at a first grade level. That&#8217;s really the lowest level that you can claim that someone can read.<\/p>\n<p>In human languages, text is written at different levels depending on the context and expected audience. Why would you expect programming to be different? Over the next <a target=\"_blank\" rel=\"noopener\" href=\"\/programmer_musings\/series_of_posts\/least-common-denominator-code\/\">few posts<\/a>, I plan to cover some of the context that would change the way code should be written.<\/p>\n<p>Over the course of the next few entries, I plan to show different places where writing lowest common denominator code (<abbr title=\"Lowest Common Denominator Code\">LCDC<\/abbr>) would harm the project and, possibly, your business.<\/p>\n<h2 class=\"subhead\"><a name=\"list\"><\/a>References<\/h2>\n<ul>\n<li><a href=\"\/programmer_musings\/2004\/01\/what-is-a-programming-idiom\/\" target=\"_blank\" rel=\"noopener\">What is a Programming Idiom?<\/a><\/li>\n<li><a href=\"\/programmer_musings\/2004\/05\/idiomatic-programming\/\" target=\"_blank\" rel=\"noopener\">Idiomatic Programming<\/a><\/li>\n<li><a href=\"\/programmer_musings\/2006\/08\/programming-for-other-programmers\/\" target=\"_blank\" rel=\"noopener\">Programming for Other Programmers<\/a><\/li>\n<li><a href=\"\/programmer_musings\/2013\/06\/write-for-your-audience\/\" target=\"_blank\" rel=\"noopener\">Write for Your Audience<\/a><\/li>\n<li><a href=\"\/programmer_musings\/2013\/07\/coding-style-terse-vs-verbose\/\" target=\"_blank\" rel=\"noopener\">Coding Style: Terse vs Verbose<\/a><\/li>\n<li><a href=\"\/programmer_musings\/2015\/05\/bpgb-readable-code\/\" target=\"_blank\" rel=\"noopener\">BPGB: Readable Code<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I got into a conversation recently coming out of the Houston.pm user group meeting. As usual, we wandered over numerous technical topics, but one stuck out in my mind: whether or not to use more advanced or more complicated language idioms. I&#8217;ve written about programming idioms and advanced code many times in the past (see\u2026 <span class=\"read-more\"><a href=\"https:\/\/blog.gwadej.org\/programmer-musings\/2015\/06\/the-myth-of-code-anyone-can-read\/\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[96,106,275,303],"_links":{"self":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts\/275"}],"collection":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/comments?post=275"}],"version-history":[{"count":0,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/posts\/275\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/media?parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/categories?post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.gwadej.org\/programmer-musings\/wp-json\/wp\/v2\/tags?post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}