{"id":112,"date":"2017-06-02T11:40:41","date_gmt":"2017-06-02T10:40:41","guid":{"rendered":"http:\/\/www.smharter.com\/blog\/?p=112"},"modified":"2024-09-26T12:19:27","modified_gmt":"2024-09-26T11:19:27","slug":"an-holistic-view-on-code-quality","status":"publish","type":"post","link":"https:\/\/www.smharter.ai\/blog\/2017\/06\/02\/an-holistic-view-on-code-quality\/","title":{"rendered":"A holistic view on code quality that matters for the business as well as for IT"},"content":{"rendered":"<p><strong>Updated on Sep 2024<\/strong><br \/><br \/>if you were spending your own money to pay software engineers to improve the quality of service\/product\u2019s codebase, what would you rather have?<\/p>\n<p>I\u2019ve seen software developers arguing passionately and endlessly about trivial topics such as spaces vs tabs (coding style standards) without coming to a useful conclusion. Code quality is a very controversial topic indeed, but I\u2019m sure you won\u2019t pay with your own monely from your holiday money pot for those arguments!<\/p>\n<p>Nonetheless, in a quite useful turn of events, in the last 15 years, the agile movement contributed enormously to expand the understanding of quality in IT.<br \/>Now our quest for quality can count on patterns (PoEAA, GoF, GRASP, Hexagonal Architecture, Asyc patterns, etc), principles (SOLID, Demeter, Simple Design Rules, Dependency Inversion, CAP Theorem, Promise Theory, etc), heuristics of good and bad design (loose coupling, high cohesion, rigidity, fragility, etc), diagnostics (metrics such as cyclomatic complexity, Sandi Metz\u2019s TRUE , etc), and practices (described in the <a href=\"http:\/\/www.smharter.com\/blog\/2017\/03\/26\/software-development-done-right-the-foundations-a-cto-cannot-ignore\/\">previous post<\/a>).<\/p>\n<p>On the other hand, that understanding expanded so quickly, that the vast majority of the industry has not caught up yet. Most are still at the imitation phase.<br \/>Indeed, even in recent years, I\u2019ve seen some business people systematically cutting down quality up to a point of bringing over time\u00a0 the project or product to its knees, and I\u2019ve seen some technical people asking for time and resources to improve quality and then failing to produce the promised benefits. I\u2019m sure you can also recall some epic IT failures from the news. You would not want that either, for your money.<\/p>\n<p>Mastering those patterns, principles, heuristics, diagnostics, and practices &#8211; software craftsmanship &#8211; is the best way we know today to pursue the quality of the code. <strong>But it is not the whole answer! They all are a means to an end.<\/strong><\/p>\n<p><strong>What is the end goal of code quality, and what is the meaning of code quality for the business?<\/strong><br \/>Here are a few examples of end goals of code quality that support key tangible and beneficial business needs\/wants:<\/p>\n<ul>\n<li><strong>Product\u2019s reliability<\/strong><br \/>to avoid service interruptions, increased costs, and reputation damage; and finally to keep users and customers happy<\/li>\n<li><strong>Adaptability<\/strong><br \/>to ever-changing and evolving user\u2019 needs<\/li>\n<li><strong>Extensibility<\/strong><br \/>to acquire and support new users and to expand in new markets<\/li>\n<li><strong>Speed &amp; low cost of Change<\/strong><br \/>in implementing the required changes and evolutions and in keeping up with competitors<\/li>\n<li><strong>Affordability<\/strong><br \/>that leads to competitive market prices and lower costs of client acquisition<\/li>\n<li><strong>Flexibility &amp; Reversibility<\/strong><br \/>to support options that enable strategic business decisions in a changing landscape.<\/li>\n<\/ul>\n<p>This is the code quality that matters to the business as well as to IT. But how do we achieve such quality?<\/p>\n<p>When one blindly applies those quality patterns, principles, heuristics, diagnostics, and practices &#8211; that is what I call code quality cargo cult &#8211; it doesn\u2019t work.<br \/>This is because practices are contextual. Principles, heuristics and diagnostics are broad and blind, abstract, and generic. Quality is elusive, subjective, relative, and at times intangible, and it is in constant evolution, always changing in unpredictable ways.<\/p>\n<p><strong>To achieve the quality that enables exactly the business goals needed for the specific product\/service, for its users and clients served, for value to be created, and for the current circumstances, one has to select and apply those quality practices in context, each one with the right dosage and the right timing.<\/strong><\/p>\n<p>The way to do this is to try to improve the code quality in the best way we know today, measure the impact on business goals, learn what\u2019s working and what\u2019s not, and loop again.<br \/>That is the quality that\u2019s valuable and meaningful for both IT and the business!<\/p>\n<p>There is also an importan cultural element to quality, that goes beyond software and digital products.<br \/>And for that I suggest to watch this short video that provides a very nice recap from a differnet point: <a href=\"https:\/\/vimeo.com\/824659933\" target=\"_blank\" rel=\"noopener\">https:\/\/vimeo.com\/824659933<\/a><\/p>\n<p><em>Thanks to Paul Eastabrook, Praveen Karadiguddi, and Uberto Barbini for their useful feedback and comments.<\/em><\/p>\n\n\n<div style=\"height:33px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\"><figure class=\"alignright size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.smharter.com\/blog\/wp-content\/uploads\/develop.png\" alt=\"\" class=\"wp-image-2071\" width=\"260\" height=\"330\"\/><\/figure><\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"text-ads\">\n\t<h3>Develop Technical Excellence that delivers.<\/h3>\n\t<p>\n\t<br>\n\tSee how we can help.\n\t<br>\n\tYou, your team, your Tech.\n\t<br>\n\t<br>\n\t<\/p>\n\n\t<div class=\"local-scroll\">\n\t\t<a href=\"\/coaching.html#one_session\" target=\"_blank\" class=\" btn elastic-btn-mod btn-mod btn-dark btn-medium btn-round\" onclick=\"ga('send','event','Blog tech-ads','Click one_session button','Virtual Tech Mentoring');\" rel=\"noopener noreferrer\">\n\t\tVirtual Tech Mentoring\n\t\t<\/a> \n\t\t<a href=\"\/coaching.html#assessments\" target=\"_blank\" class=\"btn elastic-btn-mod btn-mod btn-dark btn-medium btn-round\" onclick=\"ga('send','event','Blog tech-ads','Click assessments button','Virtual Tech Assessments');\" rel=\"noopener noreferrer\">\n\t\tVirtual Tech Assessments\n\t\t<\/a>\n\t<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>#CodeQuality: a definition unknown or misunderstood by most, that goes beyond  #SoftwareCraftsmanship.<\/p>\n<p>Given that software is eating the world and IT *is* becoming the business, it do matters. <br \/>\nThis post gives a pragmatic definition valuable and meaningful for both IT and the business.<\/p>\n","protected":false},"author":2,"featured_media":251,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-112","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development"],"_links":{"self":[{"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/posts\/112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/comments?post=112"}],"version-history":[{"count":12,"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/posts\/112\/revisions"}],"predecessor-version":[{"id":3232,"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/posts\/112\/revisions\/3232"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/media\/251"}],"wp:attachment":[{"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/media?parent=112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/categories?post=112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smharter.ai\/blog\/wp-json\/wp\/v2\/tags?post=112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}