{"id":3125,"date":"2014-04-14T09:00:49","date_gmt":"2014-04-14T13:00:49","guid":{"rendered":"http:\/\/judykat.com\/ken-judy\/?p=3125"},"modified":"2014-07-19T14:40:03","modified_gmt":"2014-07-19T18:40:03","slug":"continuous-process-improvement-deliver-less-at-better-quality-achieve-more","status":"publish","type":"post","link":"https:\/\/judykat.com\/ken-judy\/continuous-process-improvement-deliver-less-at-better-quality-achieve-more\/","title":{"rendered":"Continuous Process Improvement &#8212; Deliver Less Code at Better Quality to Achieve More"},"content":{"rendered":"<p><a href=\"\/ken-judy\/continuous-process-improvement-doing-less\/\">In my last post I claimed we rebuilt our website properties with with half to one third the developers and with &#8220;about <del datetime=\"2014-04-10T22:46:51+00:00\">half<\/del> 65%&#8221; the resulting code. All to justify my claim that &#8220;You accomplish more by doing less.&#8221;<\/a><\/p>\n<p>Now, I&#8217;ll back that claim with some metrics.<\/p>\n<h4>Lines of code<\/h4>\n<p>There are a number of tools for measuring ruby code size and complexity. The <a href=\"https:\/\/github.com\/jscruggs\/metric_fu\" title=\"Metric Fu\" target=\"_blank\">metric_fu<\/a> gem does a good job a aggregating them.<\/p>\n<p>But because our retired rails application is six years old, I resorted to the perl based <a href=\"http:\/\/cloc.sourceforge.net\/\" target=\"_blank\">cloc<\/a> to count lines of code. I excluded standard libraries and counted code in the app and lib directories supporting websites common to both codebases.<\/p>\n<table class=\"table table-bordered\">\n<tr>\n<th>Old Application<\/th>\n<th>Lines of code (LOC)<\/th>\n<th>New Application<\/th>\n<th>Lines of code (LOC)<\/th>\n<\/tr>\n<tr>\n<td>Websites<\/td>\n<td>39,981<\/td>\n<td>Websites<\/td>\n<td>27,071<\/td>\n<\/tr>\n<tr>\n<td>Admin websites<\/td>\n<td>15,011<\/td>\n<td>Data ingest\/processing app<\/td>\n<td>6,176<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td>Shared library<\/td>\n<td>2,716<\/td>\n<\/tr>\n<tr>\n<th style=\"text-align: right\">Total Old<\/th>\n<th>54,992<\/td>\n<th style=\"text-align: right\">Total New<\/th>\n<th>35,963<\/td>\n<\/tr>\n<\/table>\n<p><strong>Our current codebase is 65% the size of our original<\/strong>*.<\/p>\n<p>Code size is a predictor of defect count and ongoing maintenance. That our current codebase is 35% more efficient at delivering roughly the same perceived value implies it is materially less expensive to maintain.<\/p>\n<p>Take from this that lines of code is a terrible measure of productivity. <\/p>\n<h4>Less code is not our only indicator of the health<\/h4>\n<p>As measured by rake stat, we now have 3.6 lines of test code for every line of production code. Our old codebase measures 0.4. <em>Our new applications have 9 lines of test for every one in our old.<\/em><\/p>\n<p>Test lines of code is not a measure of test coverage or quality but remember I also work in this code. I know from direct experience that the new tests are more thoughtful &#8212; less fragile and opaque &#8212; better at testing real business logic with real data. We have invested in improving our test practice.<\/p>\n<p>Better tests and better test coverage allows developers to take more initiative in changing and optimizing code. We can turn around features faster and we can improve our code with less fear of breakage. It&#8217;s a virtuous circle.<\/p>\n<p>Again, we rebuilt our corporate websites with half to one third the development resource, 35% less code and better test coverage. We did this over a similar time frame in one week increments without schedule pressure or extraordinary efforts.<\/p>\n<h4>For the product and executive managers out there<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"3184\" data-permalink=\"https:\/\/judykat.com\/ken-judy\/continuous-process-improvement-deliver-less-at-better-quality-achieve-more\/istock_000014441542small\/\" data-orig-file=\"https:\/\/judykat.com\/ken-judy\/wp-content\/uploads\/2014\/04\/iStock_000014441542Small.jpg\" data-orig-size=\"774,620\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Spiral Starecase\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/judykat.com\/ken-judy\/wp-content\/uploads\/2014\/04\/iStock_000014441542Small-300x240.jpg\" data-large-file=\"https:\/\/judykat.com\/ken-judy\/wp-content\/uploads\/2014\/04\/iStock_000014441542Small.jpg\" src=\"http:\/\/judykat.com\/ken-judy\/wp-content\/uploads\/2014\/04\/iStock_000014441542Small-300x240.jpg\" alt=\"Spiral Staircase\" width=\"300\" height=\"240\" class=\"alignright size-medium wp-image-3184\" srcset=\"https:\/\/judykat.com\/ken-judy\/wp-content\/uploads\/2014\/04\/iStock_000014441542Small-300x240.jpg 300w, https:\/\/judykat.com\/ken-judy\/wp-content\/uploads\/2014\/04\/iStock_000014441542Small.jpg 774w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Managers want predictable delivery in short cycles. But that is an outcome. You achieve that outcome by reducing waste and building with quality. <\/p>\n<p>If you don&#8217;t make quality your priority, your developers &#8212; out of loyalty and best intentions &#8212; will not build with quality. And that leads to larger, less maintainable code, longer and less predictable delivery cycles. The opposite of what you want.<\/p>\n<p>Allow developers their due as craftspeople and professionals. Instead of banging the drum on delivery and delegating responsibility for quality, commit time and attention to building with quality and your team will deliver.<\/p>\n<p>Next time, I&#8217;ll dive into how and why our practices have changed over time&#8230;<\/p>\n<p><small>When I first measured this it was 50%. In the meantime, we&#8217;ve added features, services and a new source data feed. Still 5% of our current codebase is localized terms of use and privacy policies that didn&#8217;t exist in our old website. So, growth of the codebase is something to watch but I&#8217;m not sweating it yet.<\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my last post I claimed we rebuilt our website properties with with half to one third the developers and with &#8220;about half 65%&#8221; the resulting code. All to justify my claim that &#8220;You accomplish more by doing less.&#8221; Now, &hellip; <a href=\"https:\/\/judykat.com\/ken-judy\/continuous-process-improvement-deliver-less-at-better-quality-achieve-more\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":3184,"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,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"quality leads to delivery not the reverse (continuous improvement 2)","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[30],"tags":[19,138,26,43,869,868,870,110],"class_list":["post-3125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software-development","tag-agile-software-development","tag-manager","tag-metrics","tag-quality","tag-software-engineering","tag-software-metrics","tag-software-testing","tag-test"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/judykat.com\/ken-judy\/wp-content\/uploads\/2014\/04\/iStock_000014441542Small.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts\/3125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/comments?post=3125"}],"version-history":[{"count":84,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts\/3125\/revisions"}],"predecessor-version":[{"id":3211,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/posts\/3125\/revisions\/3211"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/media\/3184"}],"wp:attachment":[{"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/media?parent=3125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/categories?post=3125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/judykat.com\/ken-judy\/wp-json\/wp\/v2\/tags?post=3125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}