Agileista : Archives for August 2006 http://www.agileista.com/articles/2006/08.rss en-us 40 Inciting the Agile Revolution Some good practice for agile coding <p>While the process framework behind Scrum and Agile in general gets you thinking about how you organise the work and the facilitate the team, it's only half the story. </p> <p>For software development teams there are some engineering practices that can help the team code well within the people and organisational processes that Agile implements. The aim of these engineering practices is to allow the development team to create the best software product possible. These are enabling approaches that allow us to focus on the most important aspect of software development; not engineering practices but building the <em>right</em> software. </p> <p>The idea is to define and agree a basic way of working that allows us to focus on writing great software that satisfies the business. By using some good engineering practices we remove the waste in a developers day and allow them to get on with coding. </p> <p>What follows is a mixture of engineering practice and working practices that I've had some success with.</p> <ol> <li><p><strong>Control your code</strong> - It's just good practice to use revision control however you decide to run the project. We like <a href="http://en.wikipedia.org/wiki/SVN">subversion</a>.</p></li> <li><p><strong>TDD/BDD</strong> - Test Driven Development or Behaviour Driven Development. Write your tests first and then write your code to fulfil those tests. This way you don't end up with no time to test and it means you're doing the design up front in small chunks. People often wonder where the Architecture is in Agile, well if you do TDD the way it was <a href="http://blog.daveastels.com/articles/2005/07/05/a-new-look-at-test-driven-development">meant to be done</a> then when you write your tests you're actually designing how the code should behave. Effectively the TDD cycle of test-code-refactor is an inspect and adapt design process, that a developer goes through in cycles lasting minutes.</p></li> <li><p><strong>War room</strong> - Your team and their interactions are the single the most important factor in the success or failure of a project. If you can get all your team in one <a href="http://www.possibility.com/Cpp/SoftDevOfficeLayout.html">room</a> and make it their war room it will help the team to be cohesive and develop a sense of shared values and team practices or behaviours.</p></li> <li><p><strong>Continuous Integration and Automated Testing</strong> - Automate both unit testing and acceptance or functional testing. Ad hoc testing is a bad idea - by automating the building and testing in the code control system you ensure that the software builds at every check-in; this is continuous integration. Developers will feel more comfortable changing existing code and refactoring, no one forgets to run the tests, you spot errors early, development becomes more flexible. For a test framework in Rails apps there is Rake, <a href="http://rubyforge.org/projects/zentest/">Zentest</a> and <a href="http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html">Test::Unit</a> for Ruby, and for <a href="http://www.junit.org/index.htm">JUnit</a> for Java. For acceptance testing there is <a href="http://www.openqa.org/selenium/">Selenium</a> and <a href="http://fitnesse.org/">Fitnesse</a>. <a href="http://cruisecontrol.sourceforge.net/">Cruise control</a> for Ant enforces continuous integration in Java. </p></li> <li><p><strong>Quiet time</strong> - When you're in the zone and cranking out quality code like it was gong out of fashion, the last thing you need is an interruption. Once you've been rudely awakened it can take ages to get back into the right frame of mind for problem solving. Agree a quiet time with no phones and email or devise a physical signalling system like a busy flag so people know not to interrupt.</p></li> <li><p><strong>Automate those documents</strong> - Use software that extracts relevant information from the code and creates some of your documentation for you. That way your documents show you what is really happening with the software. It almost documents itself. So much more useful than some spec that says what <em>should</em> be happening.</p></li> </ol> <p>You should also look at pair programming. Once I've had more experience of it I'll post my thoughts on it. Check <a href="http://www.xprogramming.com/">Ron Jeffries</a> site for more.</p> <p>Remember, not every practice works for every situation, try them out and keep what fits. Make sure to get the team to agree their working practices - enforced ways of working that validate and measure the wrong practices and metrics wont deliver you software, let alone agility.</p> Fri, 25 Aug 2006 18:00:00 -0700 urn:uuid:e1a31cd0-4c90-4b45-b2c3-d16f21ac99b0 http://www.agileista.com/articles/2006/08/25/ruby-agile-coding-good-practice-engineering#comments Coding Agile Scrum TDD code agile engineering http://www.agileista.com/trackbacks?article_id=ruby-agile-coding-good-practice-engineering&day=25&month=08&year=2006 http://www.agileista.com/articles/2006/08/25/ruby-agile-coding-good-practice-engineering An Agile Overview <p>I'm going to give a brief overview of an Agile development process called SCRUM. At the end of this article are some links to further information for those of you that want to read about SCRUM in more depth.</p> <p>First some terminology:</p> <ul> <li><strong>Scrum Master</strong> - The person who enables the Scrum process, a facilitator</li> <li><strong>Product Owner</strong> - The person ultimately responsible for defining the product and its features</li> <li><strong>Iteration</strong> - A set cycle of development time </li> <li><strong>Sprint</strong> - Scrum name for the iteration cycle</li> <li><strong>Development team</strong> - Everyone it takes to get from requirement to tested releasable code (coders, testers, Q&amp;A, Analysts, DBA's etc) </li> <li><strong>Velocity</strong> - A measure of the completed features for a given iteration</li> </ul> <p>The first thing you need to begin Scrum is a <strong>Product Backlog</strong>. This is essentially a list of features or in my case user stories. This initial list - just enough to get you started - should be prioritised by the <strong>Product Owner</strong> according to business priorities. Next you'll need to decide on your iteration lengths. Typically a team starts with iteration lengths of 30 days but some teams prefer 2 week iterations.</p> <p>Now you're ready to begin <strong>Sprint planning</strong>. Sprint planning is usually split into 2 four hour section - during the initial phase of planning the Development Team sit with the Product Owner and the Scrum Master to estimate items on the Product Backlog. These should be sized according to their relative complexity - that is 'how big is this feature?' not 'how long will it take?' Points are awarded to each User Story. This meeting is usually time-boxed to around 4 hours with as many features as possible estimated in that time. Times for daily scrums and the end of <strong>Sprint Review</strong> and <strong>Sprint Retrospective</strong> are also agreed. </p> <p>With the backlog estimated and prioritised the team work out how many of the most important items on the <em>Product Backlog</em> they think they can do in the allotted Iteration or Sprint period. This can be based on the teams current Velocity if the team have been sprinting together for a while or it can be based on the expert opinion of the team. Based on the items chosen from the Product Backlog a <em>Sprint Goal</em> is agreed with the Product Owner.</p> <p>For the second half of <strong>Sprint Planning</strong> the team take the list of items to be worked on during the Sprint - the <strong>Sprint Backlog</strong> - and break down each item into more granular tasks covering everything from coding to meetings. These tasks are estimated in hours to complete. The team then commits to deliver the functionality in the Sprint Backlog along with the overall Sprint Goal.</p> <p>Once the Sprint begins there are daily meetings of around 15 min where the team gets a chance to inspect and adapt again. Three key questions are asked: What have you done, what are you going to do and what has been an impediment to your work? It is then the Scrum Masters role to work with the business to remove those impediments to progress for the team.</p> <p>Once the iteration comes to a close the larger inspect and adapt cycle kicks in. There is a <strong>Sprint Review</strong> with the product owner to go over all the code completed in that iteration. The Product Owner runs through the software to be sure it meets the original requirements and if it does the team are awarded the points for each user story deemed complete. These team points are their <strong>Velocity</strong> - a measure of the amount of functionality/complexity that they can deliver per iteration. This review period is also a chance for the team to share their work and get feedback from the rest of the company.</p> <p>The best time for a <strong>Sprint Retrospective</strong> is right at the end of the iteration. During the retrospective the team looks at what went well and what didn't and looks to adapt accordingly. Once the retrospective has been held its back to <strong>Sprint Planning</strong> and the iteration cycle kicks in again.</p> <p>Some further reading.</p> <p>Books:</p> <p><a href="http://www.amazon.co.uk/exec/obidos/ASIN/073561993X/sr=8-1/qid=1156245017/ref=pd_ka_1/026-2113224-9742006?%5Fencoding=UTF8&amp;s=gateway&amp;v=glance">Agile Project Management with Scrum</a></p> <p><a href="http://www.amazon.co.uk/exec/obidos/ASIN/0130676349/sr=8-2/qid=1156245017/ref=pd_ka_2/026-2113224-9742006?%5Fencoding=UTF8&amp;s=gateway&amp;v=glance">Agile software Developement with Scrum</a></p> <p>Websites:</p> <p><a href="http://www.controlchaos.com">Control Chaos</a></p> <p><a href="http://www.agilealliance.com">Agile Alliance</a></p> <p><a href="http://www.scrumalliance.org">Scrum Alliance</a></p> <p><a href="http://c2.com/cgi/wiki">C2 Wiki</a></p> <p><a href="http://wiki.scrums.org/">Scrums Wiki</a></p> <p><a href="http://www.xprogramming.com/">Ron Jeffries</a></p> <p><a href="http://www.mountaingoatsoftware.com/">Mike Cohen</a></p> <p><a href="http://jeffsutherland.com/">Jeff Sutherland</a></p> Sun, 20 Aug 2006 09:25:00 -0700 urn:uuid:ee1bb7b7-ef95-4ec5-9f3e-19cc6529ef05 http://www.agileista.com/articles/2006/08/20/an-agile-overview#comments Coding overview process scrum agile http://www.agileista.com/trackbacks?article_id=an-agile-overview&day=20&month=08&year=2006 http://www.agileista.com/articles/2006/08/20/an-agile-overview A little Agile history <p>Before I get into my experiences of implementing Agile lets take a brief look at some background.</p> <p>Agile refers to a conceptual framework of processes for managing high risk, high entropy projects such as software development. The <a href="http://www.agilealliance.com">Agile Alliance</a> has this to say - </p> <blockquote> <p>"In the late 1990's several methodologies began to get increasing public attention. Each had a different combination of old ideas, new ideas, and transmuted old ideas. But they all emphasized close collaboration between the programmer team and business experts; face-to-face communication (as more efficient than written documentation); frequent delivery of new deployable business value; tight, self-organizing teams; and ways to craft the code and the team such that the inevitable requirements churn was not a crisis"</p> </blockquote> <p>Lean management, an influential and successful movement in management theory shares some of the same values and principles as Agile. One of the pioneers of Lean was Toyota Corporation of Japan. Throughout the 1990's Toyota was making striding gains in the U.S. car market and was fast becoming the market leader. Theorists and consultants from around the world lauded them as the model of efficient, high quality, modern car manufacturing. </p> <p>Lean management principles and Just in Time (JIT) manufacturing techniques meant that Toyota - a conglomerate of over 150 companies - was able to sustain its production line output whilst holding only three days of stock at any one time. Envious competitors and detractors alike were waiting for Toyota's new management techniques to blow up in their face. </p> <p>In early 1997 Toyota woke up to their first real <a href="http://sloanreview.mit.edu/smr/issue/1998/fall/4/">crisis</a> since implementing Lean processes. By 9 a.m. on February 1st Aisin Kariya plant number one had burned to the ground. A key plant in the manufacture of P-valves, Aisin produced over 32,500 P-valves per day for the Toyota group. Its demise left Toyota facing an uncertain future with only three days of production capacity left before suffering potentially huge and irretrievable loss in sales and profits. This had dire consequences for not only Toyota but the Japanese economy as a whole.</p> <p>Remarkably, the Toyota network of associated companies and suppliers managed to re-organise themselves into a new structure (emergence - self organising) and had managed to begin manufacture of P-valves again only two days later. By working together with no haggling over commercial contracts or technical rights, more than 200 helped out with over 62 taking direct responsibility for p-valve production. This emergent behavior can be paralleled with the operation and response of organic networks and systems such as ecosystems responding to a change in the environment, or the neural networks repairing themselves after brain damage.</p> <p>What does all this have to do with Agile you say? Well one of the important outcomes that that we try to nurture in Agile is emergent behavior from our teams and organisations. We want to create an environment that is conducive to autonomous emergent behavior. When you embrace change and integrate your supply chain communications and methods within an Agile or Lean environment wonderful unexpected things can grow out of it.</p> Thu, 17 Aug 2006 03:42:00 -0700 urn:uuid:b0e64742-3e62-4dfb-9d18-db9f4a3b7acb http://www.agileista.com/articles/2006/08/17/how-it-all-began#comments Agile Scrum JIT lean toyota history agile http://www.agileista.com/trackbacks?article_id=how-it-all-began&day=17&month=08&year=2006 http://www.agileista.com/articles/2006/08/17/how-it-all-began Revolutionary Intent <p><br /></p> <p>I've been having what could only be described as a good time implementing Agile methodologies with the development team at work. We've been merrily iterating away, all the while thinking 'this is great'. Not only does SCRUM seem to be working well but when there are issues even they become stimulating challenges. I think it's because the procedures and techniques that support an Agile approach simply give you the tools and techniques to get on with it.</p> <p> The process you go through during Agile software development serves to simplify and clarify the task at hand to the degree that you can almost forget about the process entirely and concentrate on the work. Sure it can be hard work, implementing Agile methodologies is not an easy task. Luckily understanding them is. The hard work is in the work itself, not in implementing some overbearing project framework. This is great because it frees up time to concentrate on the biggest single issue in application development. Building the right Software.</p> <p>That's where, for want of a better phrase 'Agile engineering practices' come into play. Agile project management methodologies like SCRUM help you create the right environment for development and the engineering practices help you develop great code. It's probably easiest to understand how it all fits together if you look at the process of getting from requirements to product, or from soup to nuts as one ex-Accenture con put it. In future posts I'll talk about the processes we've been through stage by stage, what worked and what didn't and how each of the two layers of an Agile approach; engineering practices and management practices, work to support each other.</p> Thu, 17 Aug 2006 03:34:00 -0700 urn:uuid:afae9eb6-a37e-434e-8c46-bdc2aefb5e5c http://www.agileista.com/articles/2006/08/17/revolutionary-intent#comments Agile agile scrum lean code TDD software development http://www.agileista.com/trackbacks?article_id=revolutionary-intent&day=17&month=08&year=2006 http://www.agileista.com/articles/2006/08/17/revolutionary-intent