{"id":302,"date":"2013-01-09T17:18:24","date_gmt":"2013-01-10T01:18:24","guid":{"rendered":"http:\/\/zuill.us\/WoodyZuill\/?p=302"},"modified":"2014-08-14T09:11:35","modified_gmt":"2014-08-14T17:11:35","slug":"no-estimate-approach-for-end-of-life-legacy-support","status":"publish","type":"post","link":"https:\/\/zuill.us\/WoodyZuill\/2013\/01\/09\/no-estimate-approach-for-end-of-life-legacy-support\/","title":{"rendered":"No Estimate Approach For End-Of-Life Legacy Support"},"content":{"rendered":"<p>In this episode I&#8217;ll cover an extremely satisfying application of Lean and Agile on a large &#8216;Legacy&#8217; effort I was part of a while back.<\/p>\n<p>Please understand that I am not at liberty to discuss certain (that is, most)\u00a0details. I must protect the guilty. I will give just the bare details &#8211; only what is necessary. I bet you don&#8217;t believe I will be able\u00a0to give just the bare details, right?<\/p>\n<p>So &#8211; this is about using the No Estimate Approach on an End-Of-Life Legacy Support project.<\/p>\n<p>First, a few definitions:<\/p>\n<h4>What is &#8220;Legacy&#8221; code?<\/h4>\n<p>I am glad you asked.\u00a0 There are many definitions of legacy code. Here is the one I use: Legacy code is ANY CODE THAT IS DOING ACTUAL WORK THAT YOU WANT TO KEEP WORKING. (Please note the clever use of &#8220;all caps&#8221; for emphasis.)\u00a0 Does that make sense to you? Doesn&#8217;t matter &#8211; just pretend that is what it means.\u00a0 Using my definition, most projects become legacy code as soon as you have some functionality in production. That&#8217;s when the bits hit the fan, usually, so to speak.\u00a0 However, even if it isn&#8217;t yet in production, it could still be &#8220;legacy&#8221; if we have stuff working we don&#8217;t want to break.<\/p>\n<h4>What is Legacy Support?<\/h4>\n<p>Regardless of what you think legacy support is,\u00a0for the purposes of this post I am using it to mean this: &#8220;Work done\u00a0(bug fixes and minor enhancements &#8211; that sort of thing, or more serious stuff if needed)\u00a0to\u00a0extend and protect\u00a0the life of code that is in use&#8221;.\u00a0\u00a0 I&#8217;m leaving out more extensive enhancements like &#8220;whole, new functionality&#8221;.\u00a0 You can\u00a0judge for yourself the difference between minor and &#8220;more extensive&#8221; enhancements.\u00a0 Doesn&#8217;t really matter to me.<\/p>\n<h4>What is End-Of-Life?<\/h4>\n<p>For the purposes of this post, an End-Of-Life project is a project that is almost retired.\u00a0 It&#8217;s still in use but\u00a0going to be replaced sometime soon. \u00a0\u00a0In software programming &#8220;Soon&#8221; means &#8220;perhaps sometime, but we have no clue when.&#8221;\u00a0 The basic idea is that people are using it, and it is important enough to keep supporting, but we&#8217;ll stop doing big additions and improvements.\u00a0 Some bugs will just be ignored, but any deemed to be important to fix will be fixed if possible.<\/p>\n<h4>Project History and Details<\/h4>\n<p>The project that we are discussing is is a large, line-of-business set of applications (<strong>&#8216;The System&#8217;<\/strong>)\u00a0that is critical to the users of the software for managing most aspects of their business.\u00a0 The typical user of <strong>The System<\/strong> manages thousands to millions\u00a0of their own customers &#8211; sales, billing, transactions of all sorts, bunches of &#8220;real-time&#8221; stuff, reporting, etc.\u00a0 Typical line-of-business stuff.\u00a0 I was told the code base was about 2 million lines of code [and\u00a0that&#8217;s about enough, in my opinion &#8211; any more is just bragging.]<\/p>\n<p><strong>The System<\/strong> has been in production for 15 years or so and has moved through several different code bases.\u00a0 The current code base is about 4 or 5\u00a0years old.\u00a0 It uses several languages &#8211; 4 or 5 perhaps.\u00a0 Typical stuff.<\/p>\n<p>Enhancements and bug fixes are managed, worked on, and delivered using a waterfall approach, with a 3 month delivery schedule (that takes 6 months due to test and fix cycle, and other typical deadline issues).<\/p>\n<p>Due to design, industry, and technical reasons it is deemed necessary to re-write<strong> The System<\/strong> in a new language with a new architecture.<\/p>\n<h4>The Path Going Forward<\/h4>\n<p>The current version of <strong>The System<\/strong> MUST continue to serve the user base, and even more &#8211; it has to be clear that we are still\u00a0responsive to concerns and issues of the user base so they don&#8217;t start looking to competitors to solve problems while the &#8220;greenfield&#8221; version of <strong>The System<\/strong> is being developed.\u00a0 It has to look and feel like &#8220;business as usual, only better&#8221;.<\/p>\n<p>A &#8220;maintenance team&#8221; is put together to provide this service.<\/p>\n<p>I&#8217;m not sure exactly how many people were working on\u00a0<strong>The\u00a0System<\/strong>\u00a0before the End-Of-Life Maintenance, but it was something on the order of 20 to 25 people &#8211; maybe more, it was a while back and I didn&#8217;t keep track.<\/p>\n<p>The new team was to be 6 people: 2 QA, 2 BA (Business analyst or &#8220;Product Owner&#8221;), 2 Dev.\u00a0 I was one of the two Devs, and also the manager, or co-manager\u00a0(more or less).\u00a0 I &#8220;volunteered&#8221; for this assignment on one condition: I would be allowed to manage this effort\u00a0<strong>my way &#8211; which means Lean\/Agile\/XP.<\/strong><\/p>\n<p>We&#8217;ll call this <strong>System EOL<\/strong> (for system end-of-life)\u00a0.<\/p>\n<h4>The State of System EOL \u00a0on Day One<\/h4>\n<p>There are approximately <strong>500 active bugs in the bug tracking system<\/strong>.\u00a0 Some of these bugs have been pernicious. Some have never been addressed due to\u00a0level, some have been introduced in the fixing of other bugs, some have been there a long time but just recently discovered &#8211; All the typical bug stuff.<\/p>\n<h4>500 Acitve Bugs???!<\/h4>\n<p>There are 500 active bugs!\u00a0There are a number of reasons there are so many bugs.\u00a0 Before we talk about that, I&#8217;d like to ask a question.<\/p>\n<ul>\n<li>Question: What is an appropriate number of known bugs for a project that is in production?<\/li>\n<li>Answer: Zero.<\/li>\n<\/ul>\n<p>Got that? I&#8217;ll allow for any bugs that have easy work-arounds &#8211; you can leave those if you have to.\u00a0 I&#8217;ll also allow for any bugs that were discovered since the last deployment.\u00a0 But you better fix those NOW and then you&#8217;ll have zero bugs once again. Nice.<\/p>\n<p>Remember that: Zero bugs.\u00a0 Does that seem unreasonable to you? If it does, I&#8217;ll ask another question: Why bother reading my blog? Go do something else that seems reasonable to you.\u00a0 Why waste your time on what I&#8217;ve got to say? I am NOT REASONABLE most of the time.\u00a0 I want a better way to do stuff than whatever we used to think is &#8220;reasonable&#8221;.\u00a0 Zero bugs is a &#8220;lofty goal&#8221; in some workplaces.\u00a0 In others, it is business as usual. I prefer zero bugs.<\/p>\n<p>So, 500 bugs is not just way too many, it is infinitely too many.\u00a0 Or whatever 500 divided by zero is.\u00a0 Anyone know?<\/p>\n<h4>One reason there are so many bugs: The old process.<\/h4>\n<p>There were several reasons all these bugs existed, but the one that is most pertinent to our discussion today is the process that was in place for assessing and fixing bugs.\u00a0The way things were being done was\u00a0about like this:<\/p>\n<ul>\n<li>Bug report is entered into the tracking\u00a0system by a user, support person, developer<\/li>\n<li>The bug is reviewed at a &#8220;triage&#8221; meeting where its importance\u00a0determined<\/li>\n<li>If it is important enough, it is assigned to an &#8220;investigator&#8221; who will assess it: that is, attempt to reproduce it, determine the\u00a0likely cause and\u00a0module that will probably contains the &#8220;bad code&#8221;, \u00a0and estimates the time to fix.<\/li>\n<li>After the assesment, the bug goes back to a &#8220;bug review&#8221; meeting to re-assess it&#8217;s importance and schedule the work to be done.<\/li>\n<li>If it is deemed important enought,\u00a0it is scheduled to be fixed (either sooner or later based on the &#8220;cost&#8221; of fixing it and importance to the customers).\u00a0 If it is not important enough, it is closed and it&#8217;s status and other details are communicated to the interested parties.<\/li>\n<li>It is assigned to a developer who works in the area of the &#8220;bad code&#8221;. Since the developer is a different person than the investigator, the developer starts from square one and &#8220;re-thinks&#8221; the stuff the investigator already thought about.<\/li>\n<li>In working on the bug, the developer discovers the problem is NOT in the area of code it was thought to be in, so he adds his comments and assigns it back to the bug review team.<\/li>\n<li>The bug review team looks at it again, and then re-assigns it to an investigator.<\/li>\n<li>And so on and so on&#8230;<\/li>\n<li>Once a bug is actually fixed, it goes thorugh QA where it is discovered that\u00a0it didn&#8217;t fix what needed to be fixed.<\/li>\n<li>Go through\u00a0whole process again.<\/li>\n<li>Once a\u00a0bug is fixed and passes QA, it\u00a0is deployed in the next deployment, and&#8230;<\/li>\n<li>The users discover that it didn&#8217;t fix what needed to be fixed, or the fix was only partial, or that something else is now broken.<\/li>\n<li>Even worse &#8211; some other things have been broken that are not yet discovered that will lead to other bug reports sometime soon.<\/li>\n<\/ul>\n<p>Okay &#8211; you get the point.\u00a0 I am not making this up.<\/p>\n<p>There were other reasons <strong>System EOL<\/strong><strong><\/strong> was in this state, which included lack of unit tests, code neglect (huge methods, overwhelming complexity, fragility, coupling and cohesion problems),\u00a0and so on&#8230; but we&#8217;ll solve one thing at a time.<\/p>\n<h4>Chutes and Ladders<\/h4>\n<p>Well.\u00a0 Does that remind you of that game you used to play when you were a kid?\u00a0 It should.\u00a0 And it is JUST AS FRUSTRATING, at least conceptually.\u00a0 Only difference is you get paid to play Bug Fixing Chutes and Ladders.\u00a0 But overall &#8211; it is terrible and horrendous (and other bad words).<\/p>\n<h4>What to do???<\/h4>\n<p>Since I was allowed to manage <strong>System\u00a0EOL<\/strong> in my own way &#8211; Here is what we did.<\/p>\n<h4>Value Stream Map<\/h4>\n<p>First day I brought in 6\u00a0copies of\u00a0Mary and Tom Poppendiecks &#8220;Lean Software Development&#8221; book, and we all agreed to read it, and more or less follow their basic concept.\u00a0 I&#8217;d been doing XP for years (more or less) but it&#8217;s a hard sell so I opted for the &#8220;easy sell&#8221;.\u00a0 If Lean is good enough for Toyota, it&#8217;s good enough for me.<\/p>\n<p>First\u00a0thing we did was a value stream map on the \u00a0&#8220;Chutes and Ladders&#8221; methodolgy that was in use. If you haven&#8217;t seen a value stream map or know how to do one, take a look at Mary and Tom Poppendiecks &#8220;Lean Software Development&#8221; book.\u00a0 The basic idea is that anything that is not directly adding value can (and should) be eliminated. For example: waiting in queues is a waste &#8211; it brings no value to the person interested in having the bug fixed.<\/p>\n<p>I bet you can guess that we found a lot of NON-VALUE-ADDING behaviors.\u00a0 So, we made a few rules.\u00a0 For example&#8230;<\/p>\n<h4>First of all, a few rules:<\/h4>\n<ul>\n<li>No Triage meetings or Bug Review meetings<\/li>\n<li>No Assesments for &#8220;where the code is broken&#8221;<\/li>\n<li>No prioritization or severity determination (a bug is a bug is a bug).\u00a0 If it&#8217;s in the tracking system, fix it.<\/li>\n<li>No Estimation of effort. We gotta work on all the bugs.<\/li>\n<li>&#8230; and Other things<\/li>\n<\/ul>\n<p>NOTE: No Estimates, No prioritization, No meetings.\u00a0 These are wastes (at least in some situations, if not a lot)\u00a0&#8211; bringing no value to the &#8220;customer&#8221;. Even worse,\u00a0 waste usually removes value by using up time and &#8220;spirit&#8221;.\u00a0 A team doing a lot of meetings, estimates, assessments, meetings, prioritization, meetings, waiting, etc.\u00a0becomes NUMB. Avoid numbness.<\/p>\n<h4>An initial assessment:<\/h4>\n<p>We quickly read each\u00a0bug in the tracking system,\u00a0looking for duplicates, bugs no one had asked about in a year or more, and bugs\u00a0where\u00a0the description\u00a0could not be understood (and there was no one who could clarify).\u00a0This was done very quickly and eliminated about one half of the bugs.\u00a0 NICE. 500 bugs cut down to 250 bugs.\u00a0 No one can say that is not progress!<\/p>\n<p>This took about a week (as I recall).\u00a0 During this &#8220;first-week&#8221; the developers and QA took on bugs to fix, since there were plenty that were clear enough to work on &#8211; but spent some of their time helping the BA&#8217;s &#8220;weed out&#8221; the bugs that we removed.<\/p>\n<h4>Daily process we adopted:<\/h4>\n<ul>\n<li>Daily morning 1\/2\u00a0hour\u00a0meeting.\u00a0 Sitting. Quickly talk about some\u00a0interesting things (movies we had seen, a great lunch place we found, etc)\u00a0, and occasionally some work stuff as well.\u00a0 Seriously &#8211; this was a time for the team to become comfortable with each other and build some common memories and start the day off on a pleasant note.\u00a0 And everyone outside the team expected we&#8217;d do daily meetings and we didn&#8217;t want to disappoint them.<\/li>\n<li>Pick a bug, any bug.<\/li>\n<li>QA and Dev sit together and reproduce bug. Confer with BA as needed.<\/li>\n<li>QA and Dev examine code together, and create a characterization test to &#8220;clamp down&#8221; the code.<\/li>\n<li>Dev fixes code using TDD whenever possible, conferring with\u00a0and pairing with\u00a0QA and BA whenever needed<\/li>\n<li>QA and Dev test code to verify fix works as expected<\/li>\n<li>QA and Dev run all existing characterization tests<\/li>\n<li>Code is checked in and project is built<\/li>\n<li>QA runs all existing automated UA tests and any needed manual tests.<\/li>\n<li>Pick next bug &#8211; preferable one that is in some way related to last bug &#8211; but not critical. Just pick one, and repeat.<\/li>\n<\/ul>\n<h4>Release Schedule:<\/h4>\n<ul>\n<li>About every two weeks a build of whatever was fixed at that point was made avaliable to customers.<\/li>\n<li>They could take the build\u00a0if any bugs they were interested in were fixed, or they could ignore it.\u00a0 It was up to them.<\/li>\n<\/ul>\n<h4>End Result:<\/h4>\n<p>Guess how long it took to clean this project of\u00a0 bugs.\u00a0 Give up?\u00a0 3 months!<\/p>\n<p>250 bugs in 3 months &#8211; that&#8217;s about 4 bugs a day!!! Well, we did have 17 &#8220;un-fixable&#8221; bugs.\u00a0 Those were bugs that we weren&#8217;t allowed to fix for some business\u00a0reason.\u00a0 So still &#8211; an average of\u00a0just under 4 bugs a day.<\/p>\n<p>This is the power of eliminating waste.\u00a0 All of our time was spent doing meaningful work, REAL WORK on bugs. No reviewing, no estimating, no &#8220;pre&#8221; investigation that wasn&#8217;t part of doing the fix, no passing code to QA that we were not confident would pass all tests, etc. In other words:\u00a0NO WASTE.\u00a0 Or at least: We were no longer doing any of the steps that\u00a0we had identified as waste.<\/p>\n<h4>A Few Other Interesting Things:<\/h4>\n<p>Well, what we found is that in fixing some bugs, we&#8217;d incidently fix other bugs.\u00a0 That is, some bugs were caused by a single underlying malfunction.\u00a0 That happens, and it is a sweet bonus when it does.<\/p>\n<p>We had no recidivism. Once delivered to the customers, we\u00a0did not have a single fix that was &#8220;sent back&#8221;.\u00a0 Once fixed it stayed fixed.\u00a0 I think this can mostly be attributed to the QA and Dev working together, the unit tests put in place, and the &#8220;one-at-a-time&#8221; approach to &#8220;fix and build.&#8221; We would fix ONE BUG at a time.\u00a0Fix,\u00a0 Build, Unit Tests, Checked in, Built, Tested, confirmed.\u00a0 Only then would next bug be tackled.<\/p>\n<h4>Conclusion<\/h4>\n<p>So&#8230; this\u00a0is about no estimates.\u00a0\u00a0Our rule: Eliminate waste.\u00a0 In this case, estimates were a waste.\u00a0 They were thought to provide a way to &#8220;manage&#8221; the work being done, but were in fact reducing the ability of the organization to &#8220;manage&#8221; getting work done.\u00a0 I think they are like the dice in chutes and ladders? Probably not. Still, focus on the real work, don&#8217;t muddle things by playing chutes and ladders.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this episode I&#8217;ll cover an extremely satisfying application of Lean and Agile on a large &#8216;Legacy&#8217; effort I was part of a while back. Please understand that I am not at liberty to discuss certain (that is, most)\u00a0details. I must protect the guilty. I will give just the bare details &#8211; only what is [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,21,22,24,4],"tags":[],"class_list":["post-302","post","type-post","status-publish","format-standard","hentry","category-agile-stuff","category-estimating","category-no-estimating","category-noestimates","category-waterfall"],"_links":{"self":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/posts\/302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/comments?post=302"}],"version-history":[{"count":33,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/posts\/302\/revisions"}],"predecessor-version":[{"id":972,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/posts\/302\/revisions\/972"}],"wp:attachment":[{"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/media?parent=302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/categories?post=302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zuill.us\/WoodyZuill\/wp-json\/wp\/v2\/tags?post=302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}