{"id":162,"date":"2008-07-19T02:29:24","date_gmt":"2008-07-19T01:29:24","guid":{"rendered":"http:\/\/people.iola.dk\/arj\/?p=162"},"modified":"2008-07-19T02:29:24","modified_gmt":"2008-07-19T01:29:24","slug":"beautiful-code-proportionality-integrity-and-clarity","status":"publish","type":"post","link":"https:\/\/people.iola.dk\/arj\/2008\/07\/19\/beautiful-code-proportionality-integrity-and-clarity\/","title":{"rendered":"Beautiful code = proportionality, integrity and clarity?"},"content":{"rendered":"<p>Writing beautiful code is such an elusive subject. I&#8217;ve never been able to put into words what makes code great, it&#8217;s sort of these things that just is. I even read a <a href=\"http:\/\/oreilly.com\/catalog\/9780596510046\/\">book<\/a> on it once, and while it had some quite tricks and hacks along the way, I never really thought I got closer to a definition of what beautiful code is.<\/p>\n<p>I saw this talk about <a href=\"http:\/\/rubyconf2007.confreaks.com\/d1t1p1_what_makes_code_beautiful.html\">beautiful code<\/a> yesterday. The talk is from a ruby conference and starts a little slow, but around 18 minutes in, it gets really interested. His main thesis of the talk is that beautiful code can be defined using only three measuring sticks: proportional &#8211; 200 lines to read a simple file (Hello C)?, integrity &#8211; does it actually do what it&#8217;s supposed to do and in a reasonable fashion (speed, memory usage etc.) and finally clarity &#8211; can you grok the code again quickly 2 years after you wrote it in the first place (Hello Perl). Each one of these must be balanced.<\/p>\n<p>Can beautiful code really be captured by three such simple rules? Rules that individually seems to be far from beautiful, instead much more functional in nature.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Writing beautiful code is such an elusive subject. I&#8217;ve never been able to put into words what makes code great, it&#8217;s sort of these things that just is. I even read a book on it once, and while it had some quite tricks and hacks along the way, I never really thought I got closer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,43],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry","category-programming","category-ruby"],"_links":{"self":[{"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":1,"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/posts\/162\/revisions"}],"predecessor-version":[{"id":238,"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/posts\/162\/revisions\/238"}],"wp:attachment":[{"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/categories?post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/people.iola.dk\/arj\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}