Category: Phil Ledgerwood

5 Myths About Agile That Every Business Owner Should Know

 

There are several common myths about Agile principles that might prevent your business from adopting them.

We're going to "debunk" these myths below and help make sure that you understand how Agile brings real and meaningful value to the bottom line of every business.

Myth 1: Agile means having no documentation.

Agile methods still produce documentation, but you only produce the documentation you need as you need it.

This provides the best combination of time, cost, and value that your documentation can bring you. You won’t have documents that take hours to produce and update simply because someone suspects they might be useful to someone at some point.

Myth 2: Agile means no up-front planning or decision-making.

Agile does not mean blindly jumping into a project with no planning. What it does mean is that planning is done as you need it, which is where planning adds the most value. 

Having fully planned out every aspect of a project before you begin is a liability, not an asset. Many things will change between Day One of planning and completion of a project. All you’ve done is set yourself up to spend a lot of money for absolutely no reason at all.

However, planning absolutely must be done as you need it. The things that need to be planned and decided before a project starts ought to be, but nothing more and nothing less. The rest of the planning is done progressively as needed.

Myth 3: Agile prescribes a lot of practices and tools we may not want to implement.

Agile is a set of principles. Different people have come up with various practices and tools that they feel capture Agile principles, and some are so commonly used that they are virtually “Agile methodologies,” but there are no mandated practices or tools. Agile is not Scrum, XP, Kanban, or even such valuable practices as TDD.  Those things may be very useful to a group trying to be Agile, but none of that is mandated by being Agile.

Myth 4: Agile is just a development fad.

When all the amazing developers are doing something and big names are trying to find ways to support it, and this has been going on for several years, it’s well past the fad stage. 

It has become a common part of today’s development practices, not because it’s the Next Greatest Thing (NGT), but because it provides real and immense value when properly implemented. Writing Agile off because it is a fad is rather similar to writing off Object-Oriented Programming because it’s a fad.

Incidentally, I think that Internet thing will catch on one day as well.

Myth 5: Agile will not allow me to estimate.

Agile forces you to work with real data and metrics as opposed to wild guesses with no useful connection to reality.  If by “estimate” you meant “make wild guesses with no useful connection to reality,” then this might not be a myth. I’d really like a video of the shareholders meeting where you announce, “We will not go Agile because we are solidly committed to giving you wild guesses with no useful connection to reality. Speaking of, let’s take a look at this year’s budget.”

I’m guessing by “estimate,” you mean, “give a useful approximation of when X amount of work might be done,” and in that case, Agile can not only provide that, but it bases the estimate on actual data that your actual developers produce.

What Agile will not allow you to do is make an estimate that can’t be justified with actual data, such as, “When do you think you can have a CRM built by?”  You will be forced to break that question down into units that can be accurately estimated, and the estimates will be based on your developers’ actual past history, not their guesses.

Which would you rather make decisions on: actual historical data or your developers’ guesses?

Also, Agile development means you get feedback on the validity of that estimate early and often.  If your project is behind, you can find that out on a day by day level as opposed to the month before release.

In summary, moving your organization in a more Agile direction does not do away with anything that provides actual business value (although it does do away with many things that don’t), and it provides that value when the value is most necessary, most current, and most accurate.

How would you like your organization to run?

Did you like this? Share it:

Two Things You Don’t Know About Unit Testing – Pt. 1

NUnit GUI, running unit tests for AutoWikiBrowser

Image via Wikipedia

 

Unit Tests Test Your Requirements, Not Your Code

When people are first getting started with writing unit tests, the pattern typically looks like this:

  1. Write classes and methods
  2. Write unit tests that test those classes and methods

Let’s say I was building an e-commerce application, and I had a ShoppingCart class with an AddProduct(IProduct product) method.  If I’m new to unit testing, I’m probably cutting my teeth by creating a ShoppingCartTest class that has an AddProductTest() method in it.  Lots of people start learning like this.  It is such a common way to do unit tests that certain testing frameworks will even take your code and automatically generate unit tests for you (MSTest, I’m looking in your direction).

Now, we all have to start somewhere, and this is also how I started writing tests, but the weakness of learning this way is, when you decide to make the shift into TDD by writing your unit tests first, most people are totally clueless as to how to do this.  How do you write unit tests before your code if the unit tests are strictly based around the code you’ve written?  These poor souls sweat railroad ties desperately trying to essentially write classes in their head, then write their tests, then write the classes.  This is TDD to them, and it is a painful and unhelpful thing.

The remedy to this, and the quickest path to becoming a TDD developer, is to learn to write unit tests that test your requirements.  This bears repeating with more whitespace around it.

Write tests that test your requirements.

There are all kinds of helpful testing frameworks to make this more intuitive (SpecFlow, MSpec, and many other excellent tools), but for the moment, I just want to focus on how to do this regardless of a specific tool.

To return to the e-commerce example above, let’s say I have the following requirement / user story / common sense insight that reads thus:

As a shopper, I want to add products to a shopping cart so that I can purchase them all at once.

Instead of sitting down and slamming out code for this or circling the nouns to get my class names, I’m going to write a test for this requirement.  Maybe it looks like this:

public class When_adding_a_product_to_the_shopping_cart
{
  public void The_number_of_items_in_the_cart_should_increase_by_one()
  {
  }
}

I would continue to add test methods for each thing that was supposed to be the case when someone added a product to the shopping cart.  For example, I might have a The_item_added_should_be_a_product method and so on.  Notice that the tests are being formed to test the requirement, not any specific code that might get the job done.  Notice that the class and method names read in a pretty straightforward manner.  This is how I know I’m covering my bases.  Even a business user could walk through this (with me, of course) and let me know if there were any aspects of adding a product that I was missing or misunderstanding.

So, now I start thinking about how to test that requirement.  Maybe it looks like this:

public class When_adding_a_product_to_the_shopping_cart
{
  public void The_number_of_items_in_the_cart_should_increase_by_one()
  {
    var cart = new ShoppingCart();
    var product = new Product();
    cart.AddProduct(product);
    Assert.IsTrue(cart.Products.Count == 1);
  }
}

Ok, that’s not actually the code I’d write, to be honest.  The product should be a mock.  I’d set up the cart and possibly execute the add in a precondition to this test and just check the product count in the actual test method, but I don’t want to muddy the waters right now.

This test code will break, of course, mostly because I made reference to a ton of things that don’t exist in my code.  The test will be red.  It now becomes my responsibility to write the smallest amount of code I can that will make this test compile and run successfully.

There are two, huge benefits (among others) from writing your tests this way (which is more of a BDD way):

One, writing your tests first becomes a lot easier.  You write classes around the basic pieces of required functionality and methods around the stuff that should happen with that functionality.  Your methods should also include what happens when things go wrong, etc.  Basically the kind of stuff you need to know to build your application.  Once I have that broken down, it’s a lot easier to formulate the kind of code I’d need to get that done.

Two, and this cannot be stated enough, successful tests mean that I’m delivering what the application should do, not that my code does what I expect.  We’ve all seen it – a nice suite of unit tests that run green, but the code doesn’t deliver on the expected requirements.  It works, it does what you told it to do, it just doesn’t do what anybody wanted or needed.  In this methodology, if all my tests pass, it means my code is fulfilling the functionality we needed, not simply that the code is working as intended.

You can probably see where this is going.  In Part 2, we’ll look at how this process helps you write actual code.

Did you like this? Share it:

Connect With Us

     

Contact Us

Toll Free: (888) 373-8718
Main: (913) 402-9600
Fax: (913) 402-9603
7450 W. 130th Street
Suite 320
Overland Park, KS 66213

Upcoming events

  • Events on May 16, 2013

    LWS Lunch

    Starts: May 16, 2013, 11:30 am

    Ends: May 16, 2013, 1:00 pm

    Location: DEG Offices

  • Events on June 18, 2013

    Kanban Training

    Starts: June 18, 2013, 12:00 am

    Ends: June 20, 2013, 12:00 am

  • Events on June 20, 2013

    LWS Lunch

    Starts: June 20, 2013, 11:30 am

    Ends: June 20, 2013, 1:00 pm

    Location: DEG Offices

  • Events on July 18, 2013

    LWS Lunch

    Starts: July 18, 2013, 11:30 am

    Ends: July 18, 2013, 1:00 pm

    Location: DEG Offices

  • Events on August 15, 2013

    LWS Lunch

    Starts: August 15, 2013, 11:30 am

    Ends: August 15, 2013, 1:00 pm

    Location: DEG Offices

  • Events on September 19, 2013

    LWS Lunch

    Starts: September 19, 2013, 11:30 am

    Ends: September 19, 2013, 1:00 pm

    Location: DEG Offices

  • Events on October 17, 2013

    LWS Lunch

    Starts: October 17, 2013, 11:30 am

    Ends: October 17, 2013, 1:00 pm

    Location: DEG Offices

  • Events on November 21, 2013

    LWS Lunch

    Starts: November 21, 2013, 11:30 am

    Ends: November 21, 2013, 1:00 pm

    Location: DEG Offices

  • Events on December 19, 2013

    LWS Lunch

    Starts: December 19, 2013, 11:30 am

    Ends: December 19, 2013, 1:00 pm

    Location: DEG Offices

  • Events on January 16, 2014

    LWS Lunch

    Starts: January 16, 2014, 11:30 am

    Ends: January 16, 2014, 1:00 pm

    Location: DEG Offices

  • Events on February 20, 2014

    LWS Lunch

    Starts: February 20, 2014, 11:30 am

    Ends: February 20, 2014, 1:00 pm

    Location: DEG Offices

  • Events on March 20, 2014

    LWS Lunch

    Starts: March 20, 2014, 11:30 am

    Ends: March 20, 2014, 1:00 pm

    Location: DEG Offices

  • Events on April 17, 2014

    LWS Lunch

    Starts: April 17, 2014, 11:30 am

    Ends: April 17, 2014, 1:00 pm

    Location: DEG Offices

  • Events on May 15, 2014

    LWS Lunch

    Starts: May 15, 2014, 11:30 am

    Ends: May 15, 2014, 1:00 pm

    Location: DEG Offices

Recent tweets