Wednesday, 9 November 2011

Agile–What’s the problem?

Within my social circle there has been a lot of discussion around agile, scrum and waterfall software development lifecycle techniques (SDLC). The basic issue is that the grass roots feedback coming from sales and delivery is that the customer is asking for agile based delivery and more over, scrum based delivery. Anecdotal evidence suggests that the companies may miss out on lucrative projects through not offering a scrum approach to delivery. Now personally I’ve not seen any customers reject proposals by not offering a scrum approach however that’s not to say that it hasn’t happened. So the question has to be asked why I don’t subscribe to a scrum approach in all cases?

Well the first and foremost issue is that many of our customers request either a fixed price approach or a fixed date approach neither of which fits well with a scrum approach to the SDLC. Fixed price depends on a full understanding of the requirements and a full set of designs before committing to a price, or a significant proportion of the price is contained within contingency to accommodate the risk associated with not knowing the detail behind each requirement. Likewise an understanding of the complexities of interfacing to applications within and without the business domain is required to develop confidence in your commitment. The fixed date approach also requires a set of, and to quote the (ahem) USA philosopher Donald Rumsfeld, ‘known, knowns’. Even Ken Schwaber in his book ‘Agile Project Management With Scrum’, realized that the scrum approach ‘had no silver bullet’ for fixed price/fixed date delivery, going so far as to state that the approach would require ‘adding a waterfall phase to the front of the scrum methodology’, anathema to most scrum advocates.

Steve McConnell in his book ‘Software Estimation’ differentiates between estimates, targets and commitments when estimating software development projects. He states that ‘Businesses have important reasons to establish targets independent of software estimates…While a target is a description of a desirable business objective, a commitment is a promise to deliver defined functionality at a specific level of quality by a certain date’. He goes on to state that ‘a commitment can be the same as the estimate or it can be more aggressive or more conservative than the estimate’. So what does this mean for SDLC?

Customers who are looking for certainty in what is generally an uncertain process want a commitment, either financially in the form of fixed price or schedule, hitting a fixed date release. Since I base pricing on my ability to estimate the delivery of the project on ‘known, knowns’ through a structured approach using models and spread sheets I have to understand and communicate the approach and its impact on the SDLC in a way in which the customer will understand. Steve Resnick et al, in their book ‘Professional Scrum with Team Foundation Server 2010’, make a distinction between waterfall, agile (which they call MSF after the Microsoft Solution Framework) and scrum:

  • Waterfall – Scheduling is predictive. Using a known team and known technology, an experienced team can predict the duration of each phase and task. This method doesn’t respond well to slippage, as dependencies among tasks and phases are often very complex.
  • MSF – Scheduling is predictive, as in the waterfall method. However, because MSF is iterative, with more frequent releases, schedule slippage is more manageable. Subsequent releases can add or remove features to react prior impact.
  • Scrum – Scheduling is empirical. Work is scheduled based on the scrum team’s velocity. Estimation becomes more accurate with each successive sprint, based on actual work completed. Scheduling is very reliable because of the fixed-duration sprints. The scope is less reliable because features will move in and out of sprints and releases to accommodate the fixed schedule.

So what can we take away from these points. Well the first two approaches, waterfall and agile, have a very structured approach to gathering and engineering requirements therefore we can be very predictive around development of the estimate and the delivery schedule at a cost of being less reactive and flexible in adding additional requirements or making a change in the priority of the requirements. The third approach, scrum, has reduced confidence in predicting a schedule due to the nature of the backlog/sprint technique. It is extremely difficult to estimate the initial duration of the project when the points associated with delivery of the requirements within the backlog is based upon velocity, which is based upon historical evidence of delivery of software into the SDLC. This poses difficult questions around how you make a commitment to deliver requirements or how you make an accurate estimate for a fixed price/fixed date SDLC using scrum. So based upon this information, it looks like an agile approach would be the best at satisfying our customers requests to be flexible, yet agreeing to a commitment. I currently have an agile approach which works for me that develops the requirements and designs outside of the iteration using test driven development and continuous integration. This gives the best confidence in providing a price and a date to a customer and in making a delivery commitment to them.

At this point in the discussion I’d like to make in important point. Agile ≠ scrum. In fact for the best breakdown of myths regarding agile and scrum take a look at Eric Brechner’s book, ‘I.M. Wright’s Hard Code’, (2nd edition). He has many good points on this topic based upon his experience of the SDLC within Microsoft. Let’s take a look at his entry from March, 2006 entitled ‘The Agile Bullet; Enemy of the truth’:

  • Myth #1: Agile = eXtreme programming (pair programming, scrum, test driven development, user stories or some other agile method).

Actually what he describes in this section is that agile is actually a collection of many different SDLC approaches. You have to ensure that you have the right approach for the right project. I have spent a lot of time developing methods and I feel confident that the agile approach I have adopted will accommodate my customers requested commitments.

  • Myth #2: Agile methods can’t work for large groups.

I think that this is tosh, agile ≠ scrum. Agile doesn’t require that the customer product owner sits with the team 100% of the time writing user stories. I often work in a distributed fashion with more and more emphasis placed on an offshore delivery model using the India, Manila, China and Brazil. This means that it is impossible to have the product owner sit with the development team. Therefore an approach which works for this model is required. Agile provides the ability to develop requirements and designs outside of the iterations therefore it can accommodate large scale and distributed development teams.

  • Myth #3: Agile methods can work for large groups.

Now I know what you’re thinking “how can he justify this statement when he’s just praised the approach for large groups?” Well, Eric has a good deal to say on this. ‘The agile philosophy values “customer collaboration over contract negotiation” and “responding to change over following a plan”…[customers] get touchy when millions of dollars are involved…[therefore] applying agile methods to large-scale projects requires you to be flexible and creative to deal with these issues.’ So the approach is to make a commitment to fixed price/fixed date delivery based upon an on going discussion with the customer to ensure that they are happy with the priority of the functionality being released from the SDLC and also to discuss or negotiate the impact of changes on the SDLC and the fixed price/fixed date delivery. This means having a team at the customer site working with the product owner and communicating to the team at large.

  • Myth #4: Agile means no documentation.

Eric makes the point that ‘the agile philosophy values “working software over comprehensive documentation”’. So what does this really mean; No documentation? Of course not. Documentation should be seen as a deliverable and should be factored into any estimate and planned accordingly. Documentation makes the maintenance of the application possible and helps the organisation further develop the application in the future.

  • Myth #5: Agile means no up-front design.

When making a commitment to a customer, even using the agile approach, a certain level of design documentation is required. How else do you work out the complexities of the application architecture, which patterns you may use, what software models you may select? Again the design will not emerge from developers ‘doing stuff’. The balance is to generate enough of a design to help with the estimate and to drive requirements engineering so that the backlog and iteration plan is as well developed as it can during the SDLC.

So all in all, we’ve looked at the reasons why I prefer agile as opposed to the scrum approach to the SDLC, we’ve looked at the differences between estimates, objectives and commitments and finally we’ve looked at some to the myths associated with the agile approach. Wrapping this entry up I think we can safely say that although scrum is an excellent approach if you are not making a commitment to your customer and if they can make a mutual choice between delivery of functionality or delivery to price/date. However, most of our customers have fixed budgets and a timeline to hit making scrum a difficult choice pushing us to a decision between waterfall and agile.

If you’d like to have a further discussion then please get in touch.

Thursday, 3 November 2011

Microsoft Team Foundation Services Preview

Recently I was given a link to the Azure based Team Foundation Services CTP which is currently underway. I’m always curious to see how Microsoft are transitioning products into on demand services based in the Cloud. Access to TFS Services preview is only available via a GUID key which is only available from an invite from a user already on board the CTP. That said, if you haven’t a handy contact to obtain one of the keys there is a short video on the access page TFSpreviewAccCreatePagewhich shows an overview of what you get if you are lucky enough to hold the keys to the magic kingdom.

So, let’s assume that you have a key to access the site and therefore have access to the TFS Services environment. What next? Well with many of Microsoft’s services you will need to have a Windows Live ID to authenticate you against the Azure security services. You’ll also want to have an idea of what you wish to call your TFS project. The name you choose will become part of the overall URL in the form of https://yourprojectname.tfspreview.com which will also the the URL you’ll use later on to connect your Visual Studio client to the Cloud based TFS server. Finally you’ll need to enter the GUID key you received and click the check box to agree to Microsoft’s terms and conditions. Once this stage has been complete you’ll be forwarded to the Windows Live ID login page where you can enter your credentials to connect the Service with your Live ID.

Once on the inside you’ll be shown the Welcome page which has a number of activities and information. The item reaffirms the URL you use to connect your Visual Studio client to the TFS project collection. The  second item is a link to a page to create a new team project. Lets take a look at this. CreateNewTeamProjectClicking on this link opens a pop up which prompts you to enter a name for the project, a description of the project and prompts you to select a process template for use within the project. In my first project I selected the default choice which is the Scrum template provided by Microsoft. Once you’ve created the team project you may wish to connect a Visual Studio client to the project. This couldn’t be easier. Start Visual Studio and from the Start page select ‘connect to Team Foundation Server’. Click on the ‘Servers…’ button and then the ‘Add…’ button. Enter the URL you generated for you Project Collection and then authenticate using your Windows Live ID. Voila, you are connected to your TFS Preview project Collection. You then merely have to select the relevant project to connect to.

Now there are some gotchas you’ll need to be aware of before connecting to TFS Services. If you are using Visual Studio 2010 you’ll need to download the following:

  1. hotfixKB2581206
  2. hotfix KB2581206

In that order. If you wish to avoid downloading these installs then you can (if brave/stupid enough) download and install the beta preview of Visual Studio Dev11. This can take considerable time, SP1 is around 60MB which depending on your bandwidth could take over an hour to download and install. The hotfixes are minor but again may take over 30 minutes to download and install. The beta preview of Dev11 will take considerably longer at 1.1GB.

In addition you will need to configure a local build server to run the build agent. This isn’t available within the current setup so you may need to have a handy server sitting around to run this service.

Well, if you’ve achieved all that, pat yourself on the back, sit back and relax while you wander around the new landscape of TFSPreview. The UI will be familiar to those of you who’ve used TFS anywhere and if you are used to this type of interface then you’ll get on fine with managing the project via the browser. Developers/testers and power users will want to use the integration with Visual Studio to access the project, but hey, nothing new there right? The project is free to invite team members and they don’t have to have a unique key to obtain access, although depending on what permissions you apply to their accounts will determine what they can and cannot do. My advice would be to start a small project with some colleagues/friends for fun and see how you get on.

In my opinion this will be one of the game changers for distributed teams. I love the thought of having my team working out of their homes or from offices spread geographically. Mix this with other collaboration tools such as Office 365 then you have a  great set of productivity tools which really does mean that the office can be a thing of the past.