Showing posts with label Requirements. Show all posts
Showing posts with label Requirements. Show all posts

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, January 5, 2015

Discussing "Inventory" in Software Development - Classifying approaches


Interesting comments of Martin Fowler starting from this idea : "So as an example - one of the principles of lean manufacturing is the elimination of inventory.This leads to the question of whether there is an analogous item to inventory in software development."

http://martinfowler.com/bliki/MetaphoricQuestioning.html

Martin Fowler make a very interesting comment about a IMO less interesting idea "up front documentation is the equivalent of inventory": "Now I agree we need to substantially reduce this kind of speculative documentation; but the rationale for doing so must come from thinking about the software development process, not from purely reasoning by analogy."

Here is my comments on these subjects.

Manufacturing-Software Development Analogies

We should be careful on these analogies because these domains areas are pretty different. Examples: Just-In-Time approach in manufacturing must find solutions for a JIT Production (where the design was previously done "offline") and software development must find find solutions for a JIT Design ("Code is design").

Inventory in Software Development 

Manufacturing inventory mean (simplified) a reserve queue of (done) products, ready to be sold. A similar concept in software development IMO is not the massive up-front documentation (based on too many assumptions) , but rather in the motive of producing a such documentation: a massive set of requirements allocated to the same release/delivery/project. "No inventory" approach means as small is possible set of requirements per release. Indeed from this point of view, the classification is already done:
  • Large set of requirements releases - non-agile, non-lean approach
  • Small set of requirements releases - Agile approach, Lean approach
  • Very small set Small set of requirements releases - Continuous Delivery approach
An explicit description of  lean and Agile life-cycle models could be found in DAD- Disciplined Agile Delivery: https://disciplinedagiledelivery.wordpress.com/lifecycle/ 

More: With an increased construction productivity and/or a higher envisioning productivity, a larger set of requirements could be delivered in the same time. Productivity suppose here here good results and quality 

The resulted formula of "Inventory" for software development:

(Set of Requirements "volume")/productivity.

Comment: the "formula" could be enhanced to:

 (Work volume")/productivity. 

But, in this case, it is too vague.  The main aspects that increase volume or complexity of the "work" must be specified. here are some of them:
  • Requirements volume and complexity at the start
  • Solution that must match the requirement 
  • Team productivity 
  • Process
All elements of the formula are "requirements" for "No Inventory" process in software development:
  • small set of requirements
  • good design
  • no junk stories with associated phantom features
  • high productivity (all contributing aspects)
  • small releases 
  • adapted/effective/efficient process 
Finally, seems that starting with this assumption about a "No Inventory" approach for software development we are very close to the description of a Lean/Agile approach.

See more here:

Friday, January 2, 2015

Requirements, Business Needs, Value: all together

Traditional 
The so called "traditional" approach to materialize WHAT should be done (by a software system) it  is described by "requirements". It is specified also that requirements must be prioritized, but too often that failed because of lack of focus.

Unified Process 
A simplified extension it is provided by Unified Process that define a hierarchical pyramid-like model where Business Needs are in top of Requirements, and there is a trace between each business need and corresponding requirements.

Extended
An extended approach it is described by various sources related to software engineering (Unified Process included): the relationship between target business ans software system requirements are more detailed modeled: with flows (use cases) and data. The software systems use cases/flows are integrated in the overall business use cases/flows (and also the data/information).  

Agile
The most common additional concept associated with the requirements from the Agile viewpoint it is the value (provided to the business) encapsulated by a set of the requirements.

Comments
  • Traditional: seems to be incomplete, because all others are adding valid extensions
  • Extended - flows and data: it is a valid conceptual model about how the business and software system are integrated in details, but seems also to be incomplete on dimension that quantify priorities of the requirements (for other reason that detailed dependencies that are clearly defined here)
  • Business Needs - could be very useful because specify "requirements of the requirements". Anyway, could not describe detailed relationship between business and requirements (as flows and data) but rather most important aspects and it is useful for strategic decisions related to the requirements.
  • Value - it is somehow similar with the Business Needs, but add something more: we can address the business needs better of worse, that mean we could deliver more or less value for same business needs (example: by quality and supplementary non-functional requirements). It quantify that they customer will finally receive. 

An integrated approach 

All the above approaches are correct, but all are incomplete. Unfortunately, for the sake of promoting only one method or only one approach, there are advertised - "sold" -  only some of them. It is very common these days, when Agile it is very trendy, to talk about only about value and diminish the others. A coherent and professional software engineering approach should consider all of them and use them when and where it is appropriate.

Story

We have to define WHAT the software system must do for the target business. This "what" need a name and this name it is Requirements. Anyway, these requirements cannot be defined directly, we need to be aligned to some goals and use specific practices and concepts:
  • Should be a traceability between target business objectives and the requirements: we can use here the Business Needs concept 
  • We need to be more precise about what we shall deliver for business (related to this business needs), and how well are addressed. Here we can use the Value concept 
  • The Value help us to fulfill another goal: prioritizing requirements according to what the target business evolution needs 
  • Both Business Needs and Value provide instruments to strategically manage the requirements 
  • For detailed relationship between business and requirements and their integration, we can use the flows & data model. We can ignore this aspect, but in reality business and system are interacting in a such manner and we need an explicit understanding about what it is really happening. If fact that it is what we will implement and we need to be aware of that.  How much detailed representation "on paper" it is necessary, that it is a another discussion  
Conclusion: there are more aspects and dimensions on the process of managing the requirements and could be very useful to use more concepts and practices (each having its role): Business Needs, Value, Requirements, Flows and Data.

Notes

  • User stories are just particular form (less structured and minimalist) of flows & data approach
  • "Features" concept it is less useful because it is too generic  ( such as "functionality")