{"id":274,"date":"2009-04-21T07:23:47","date_gmt":"2009-04-21T07:23:47","guid":{"rendered":"http:\/\/kubasek.com\/blog\/pragmatic_craftsman\/?p=274"},"modified":"2009-04-21T07:23:47","modified_gmt":"2009-04-21T07:23:47","slug":"what-is-maintainable-code","status":"publish","type":"post","link":"https:\/\/pragmaticcraftsman.kubasek.com\/2009\/04\/21\/what-is-maintainable-code\/","title":{"rendered":"What is Maintainable Code"},"content":{"rendered":"<p>While reading the excellent Javascript book, Professional Javascript for Web Developers, I came across a very good definition of maintainable code. It&#8217;s one that I fully subscribe to, but since it was put so well in the book, here it is.<\/p>\n<blockquote><p><strong>What is Maintanable Code?<\/strong><\/p>\n<p>Maintainable code has several characteristics. In general, code is said to be maintainable when it is <strong>all of the following<\/strong>:<\/p>\n<ul>\n<li><strong>Understandable <\/strong>&#8212; Someone else can pick up the code and figure out its purpose and general approach without a walkthrough by the original developer.<\/li>\n<li><strong>Intuitive <\/strong>&#8212; in the code just seem to make sense, no matter how complex the operation.<\/li>\n<li><strong>Adaptable <\/strong>&#8212; The code is written in such a way that variances in data don&#8217;t require a complete rewrite.<\/li>\n<li><strong>Extendable <\/strong>&#8212; Care has been given in the code architecture to allow extension of the core functionality in the future.<\/li>\n<li><strong>Debuggable <\/strong>&#8212; When something goes wrong, the code gives you enough information to identify the issues as directly as possible.<\/li>\n<\/ul>\n<p>Being able to write maintainable JavaScript [any language] code is an important skill for professionals. This is the difference between hobbyists who hack together a site over the weekend and professional developers who really know their craft.<\/p><\/blockquote>\n<p>Very well said, Mr. Zakas!<\/p>\n<p>Being able to write maintainable code is what distinguishes you as a programmer. It&#8217;s a difference between a craftsman and an apprentice.<\/p>\n<p><strong>Reference<\/strong><a href=\"http:\/\/www.amazon.com\/Professional-JavaScript-Developers-Wrox-Programmer\/dp\/047022780X%3FSubscriptionId%3D0DEETVQGV87MTJA1QCR2%26tag%3Dthepragmaticc-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D047022780X%26coliid%3DIC9X5H0H3WLJO%26colid%3D1TOEQTJTSO6F7\">Professional Javascript for Web Developers (2nd ed)<\/a>, Nicholas C. Zakas<\/p>\n","protected":false},"excerpt":{"rendered":"<p>While reading the excellent Javascript book, Professional Javascript for Web Developers, I came across a very good definition of maintainable code. It&#8217;s one that I fully subscribe to, but since [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-274","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/posts\/274","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/comments?post=274"}],"version-history":[{"count":0,"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/posts\/274\/revisions"}],"wp:attachment":[{"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/media?parent=274"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/categories?post=274"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pragmaticcraftsman.kubasek.com\/wp-json\/wp\/v2\/tags?post=274"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}