Wednesday, February 24, 2016

Practices and principles for an economic documentation



Intro - Agile principles and practices for documentations are responses to the waste, ineffectiveness or even lack of feasibility of traditional approaches such as BRUF – Big Up Front Requirements, BRUD – Big Up Front Design, and to so called “comprehensive documentation”.  We will try  to enumerate and comment here these principles and practices.
Observations – This article is not intended to address also cases where requirements are subject to specific compliance and regulatory environments. Also are out of current post scope some more specific practices like Product Backlog, User Stories or Effective Use Cases.

KISS principle - “Keep It Simple Stupid” - was introduced by Kelly Johnson, system and aeronautical engineer. Unnecessary complexity is “stupid” in a context where complexity it is already an inherent problem. The software domain is one where the unnecessary complexity is a fundamental problem. Here is an example of a software related interpretation: (by Filip Hanik)
Requirements will be changed (!) because of a multitude of reasons: clarifications, business changes, customer understanding changes and others. In such conditions, any comprehensive documentation will require a significant effort of change and in the same time a high risk of not being updated. The first solution is to keep the requirements representation lightweight. That was very clearly said by Robert C. Martin in its book “UML for Java Programmers” (Chapter 5 - Use Cases): “The real trick to use cases is to _keep them simple_. Remember, tomorrow they are going to change” (why requirements as use cases? and why use cases in a programming book? Please discover yourself in the book, or wait for a later post).

 YAGNI principle – “You aren't gonna need it” principle was introduced by XP founders and it is described by Ron Jeffries as: "Always implement things when you actually need them, never when you just foresee that you need them.". That was translated in XP practice “no functionality is added early”.
A good insight about Yagni (and its origins) could be found here: http://martinfowler.com/bliki/Yagni.html 
Martin Fowler states that “only applies to capabilities built into the software to support a presumptive feature, it does not apply to effort to make the software easier to modify.” (For deeper considerations about the last part see Clean Coders series of Robert C. Martin.
Speaking of documentation, you should not “capture” presumptive features, but rather wait until you have good enough information, that mean right balancing between Envisioning and Just In-Time.

TAGRI principle - They Ain't Gonna Read It principle was explained by Scott Ambler here:
The start idea was that “documentation was written and then ignored by the intended audience”. To avoid this problem, Scott propose more rules. Here are some of them: “Create documents with a clear audience”, “Work with the true audience to identify their actual needs”, “Write agile documentation”.
Documentation it is witted with the intention of being used and used effectively and efficiently. Something is very wrong if the TAGRI is manifesting.

Agile Documentation – a more robust work about effective and efficient documentation for software development is included in Agile Modeling and Disciplined Agile methods. Here are some recommended readings:
Agile Documentation - http://agilemodeling.com/essays/agileDocumentation.htm . Some interesting topics:


When we should document


Agile Modeling Practices for documentation

  • Executable Specification – by using TDD, your tests become in fact detailed specification, in a language that is known by the programmer. One of the problems is to know the differences between the flows (what you build) and the scenarios (what you run or test) from coverage point of view. 
  • Single Source of Information – it is the equivalent of DRY (Do Not Repeat Yourself) for documentation. One typical example is to duplicate the requirements specs in the test specification. Duplication are definitely not Agile and not Lean. 
  • Document Continuously – in Agile we start usually with an Envisioning and continuously to refine it during each iteration. 
  • Document Late – a good Agile strategy is to wait until the information is stabilized. Detailed information is rather captured on JIT -Just In Time bases. Also we need to fill the gaps in overview documentation that it is necessary to for the team in the future work on the product.

Important: We can have lightweight requirements documentation in an Agile process only because, in fact. we have also the Executable Specification.

Still … something is missing – To be continued.

Monday, December 7, 2015

Starting (Disciplined) Agile: a possible approach

 Agile stalemate: "The land that Scrum forgot" 


Current large adoption of Agile is mainly based on Scrum. The stalemate on realizing more process improvements it is also - in many cases - related to Scrum. The Scrum team organization practices are easy to adopt, but many teams have no hints how to go further with improvements and with Agile. The original main good option was to adopt XP or Scrum & XP.  What is missing in many Scrum based Agile adoptions was describe by Robert C. Martin in “The Land that Scrum Forgot”.

The more recent approaches like DAD, comes with some complementary ideas: make the Agile habits explicit (as Agile life-cycles), offer guidance support instead of prescriptions, the teams should own & adapt their process context and others. 

First steps problems. Scrum advantage


Even I can argue that DAD approach is better than Scrum-only or  than Scrum & XP (in fact DAD allow to have a as possible choices Scrum-style or XP-style approaches), Scrum could have, in practice, a significant advantage on making the first steps, and making this Agile start it is fundamental. Here are some reasons:
  •  The prescribed practices from Scrum area easy to adopt and it is less likely to be in a deadlock on starting with Agile. On the other hand, many XP practices are not so easy to adopt. DA comes with more guidance and with choices, but a team that struggle with the first Agile steps will still have difficulties:  “How should I start? What are the first factors that should be subjects of my choices?
  •  The main advantage of Scrum practices is related more not to the direct benefits, but with removing of the negative side effects of a lot of legacy (bad) practices that are replaced. Example: if a team use the self-organizing power (enabled by Agile) to make poor process choices and disregard, for example, the practices for a collaborative work, they will have worse results that a Scrum-based team. Simplifying: I will have better results using 3 useful practices from a set of 3 than using just one from a set of 10.

No stalemate: not in the first steps or further

 

We finally need to have an approach offers this kind of support: 
  • Allow an easy start and make more likely the first steps in Agile
  • Quickly definitely replace some legacy habits with many negative side-effects
  • Avoid the further stalemates that too often are encountered with Scrum-only approach
Here is a possible approach on getting these results using DAD. The starting goals are the followings:
        Containers for managing the generic process goals: life-cycle and iterations
        Start working in a collaborative manner: adopt non-solo work practices
        Start persistent improvement: adopting retrospectives

 

Start working in a collaborative manner: non-solo work practices


As was mentioned before, the simple and rather vague Scrum practices for team collaboration have the great advantage of consistently replacing the old habits of non-collaborative work.

We can easily go further and get better results by adopting Agile Modeling/Disciplined Agile non-solo work practices – work with others for:
  •     Release Envisioning – Requirements and Architecture Envisioning
  •     Ahead look on requirements or design – Look Ahead Modeling
  •     Just in time requirements or design – Model Storming
  •     Pair Programming (XP practices)
  •     Others
The essential is to offer guidance to the team and to start practicing non-solo work as soon it is possible. Agile-based process improvements and Agile retrospective works only if the team work is based on continuous and actively collaboration.

Start improvement by adopting retrospectives


The improvement based on Agile and other sources must become continuous and permanent. If the team does not adopt retrospectives, this goals is difficult to st accomplish.

Containers for generic process goals: life-cycle and iterations


In order to get a proper process in context, a team should think to the best options and choices to fulfill these goals. Anyway, we need some containers to manage these goals. Scrum use the Sprint ~ the iteration as the main container. XP goes further and have an implicit life-cycle.
In DAD we can find a more robust approach: we have both iteration and more explicit agile and lean life-cycles (it is the team choice on selecting one).

Ok, but “How should I start”

For an “agile beginner” team here is an option for main process containers:

  •      The iteration - is generic for not-very-advanced cases
  •      The agile-basic life-cycle – fits with most of the cases and it is similar with XP approach
As soon it is possible - using proper guidance – the team should be aware of process goals and how these goals are distributed along the life-cycle and iteration.
Of course, after (or in the same time) familiarizing with the Agile basic-life cycle, the team could explicitly adopt other types of life-cycles depending on the context.


Next step: Just do it! 


Using this initial framework – process goals across life-cycle and iterations – the team should start working collaboratively (non-solo work practices) and use retrospectives and other instruments to decide how to improve and adapt their process. Make sure that this approach is permanent and the process will have further optimizations.