{"id":197,"date":"2017-01-13T15:05:31","date_gmt":"2017-01-13T15:05:31","guid":{"rendered":"http:\/\/www.morsello.com\/?p=197"},"modified":"2017-01-13T17:11:22","modified_gmt":"2017-01-13T17:11:22","slug":"the-advantages-of-convention-over-configuration","status":"publish","type":"post","link":"https:\/\/www.morsello.com\/index.php\/2017\/01\/13\/the-advantages-of-convention-over-configuration\/","title":{"rendered":"The Advantages of Convention over Configuration"},"content":{"rendered":"<p>Several popular frameworks have as a core design principle that &#8220;convention&#8221; is preferred over &#8220;configuration&#8221;.<\/p>\n<p>I&#8217;ve come to think that they&#8217;ve actually understated the case. \u00a0In fact, our development team has made significant strides in identifying not only causes of defects, but also the factors that slow development in\u00a0exchange for reducing defects in the first place.<\/p>\n<p>One of the top issues on the latter list is what we&#8217;ve been calling the &#8220;arbitrary decision&#8221;. \u00a0If a given technical challenge is\u00a0<em>hard<\/em>, that can actually simplify development. \u00a0Either the\u00a0<em>first<\/em> solution we find is a good one, since we save time by avoiding looking for additional solutions, which might not even exist. \u00a0Or there may be a clear <em>best<\/em> solution, or even only one that will actually work.<\/p>\n<p>This &#8220;arbitrary decision&#8221; is exactly what&#8217;s referred to as &#8220;convention&#8221;. \u00a0Every convention\u00a0that&#8217;s already been decided\u00a0both reduces defects\u00a0<em>and<\/em> saves developer time.<\/p>\n<p>Defects are reduced because:<\/p>\n<ul>\n<li>Developers have fewer decisions to make, saving focus for important problems<\/li>\n<li>Mismatches between modules or components are reduced<\/li>\n<li>The code\u00a0<em>visually<\/em>\u00a0reflects the standard, making deviation apparent<\/li>\n<\/ul>\n<p>Speed of development is increased simply because there are fewer decisions to make.<\/p>\n<p>Here are some examples of conventions that have benefitted us:<\/p>\n<ul>\n<li>Code formatting standard. \u00a0We really didn&#8217;t fight over this, as the development team is aware of the benefits of\u00a0<em>not<\/em> fighting about it. \u00a0We agreed our standard is &#8220;good enough&#8221;, so we can move on.<\/li>\n<li>Variable naming conventions, including capitalization of common names in our domain space.<\/li>\n<li>Which of the several libraries that provide the same functionality, such as Base64 conversion.<\/li>\n<li>Coding language versions: do we rely on features of newer implementations or make code backward-compatible<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Several popular frameworks have as a core design principle that &#8220;convention&#8221; is preferred over &#8220;configuration&#8221;. I&#8217;ve come to think that they&#8217;ve actually understated the case. \u00a0In fact, our development team has made significant strides in identifying not only causes of defects, but also the factors that slow development in\u00a0exchange for reducing defects in the first&hellip;<\/p>\n<p><a class=\"more-link\" href=\"https:\/\/www.morsello.com\/index.php\/2017\/01\/13\/the-advantages-of-convention-over-configuration\/\" title=\"Continue reading &lsquo;The Advantages of Convention over Configuration&rsquo;\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/posts\/197"}],"collection":[{"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":3,"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":200,"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/posts\/197\/revisions\/200"}],"wp:attachment":[{"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.morsello.com\/index.php\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}