What is Continuous Delivery

First let’s talk about the acronyms CI, CD and CD…  This whole CI / CD thing causes all sorts of confusion.  First CI is Continuous Integration, for a definition see my previous post here: What is Continuous Integration.  CD, now that’s a little trickier…  CD is either Continuous Delivery or Continuous Deployment depending on where you are in the pipeline. So then what is Continuous Delivery really? The textbook definition of continuous delivery is as follows:
Be ready and able to deploy any version of the solution to any supported platform at any time.
But what does that mean Exactly? Before we break down the definition of Continuous Delivery lets list a few key enablers.

  • Test Driven Development
  • Developing on Trunk
  • Implementing Feature Flags
  • Automated Acceptance Testing
  • Configuration Management
  • Automated Deployment

As we break down the definition of Continuous Delivery we will see where each of these processes helps to enable Continuous Delivery.
First let’s talk about being ready and able.  If your boss or a client were to come to your team’s work area right now and say “hey, you geeks deploy that solution right now!” how long would it take you to get it into production? Will it take 15 minutes, an hour, 8 hours, 48 hours or more? If we want to be “ready and able” to deploy at any time we can’t have a bunch of incomplete features, untested code, branches that need to be merged and bugs that need to be fixed. Since there will always be times that a feature is not complete because the developer is still working on it we can use Feature Flags. Feature Flags disable, hide or restrict access to code when committing changes to source control so that the solution can deployed at any time. For example, imagine you are adding a new login functionality to your solution. The developer has created the login page but the login database has not yet been created therefore the login page will not work. We can use Feature Flags to commit the new login page to source control while keeping the login feature disabled. Using Feature Flags also to develop changes without branching because the primary reason for branching is to avoid changes breaking the codebase and restricting our ability to deploy. We call this approach Developing on Trunk (get it no branches it’s just the trunk)  To make sure that we can deploy quickly after changes are committed to source control we need to make sure that the code is already well tested automatically as its committed. We call this technique Continuous Integration but in order to have the tests available at commit we must also implement Test Driven Development also known as Test First Development. To ensure that we can repeat the deployment process on demand and in a reasonable amount of time Configuration Management must be automated as well to a point that we can reconfigure servers as settings files stored in Source / Version Control. Configuration Management avoids issues like Configuration Drift, Snowflake Servers and Inconsistent Environments. Configuration Management also allows us to maintain installation and configuration settings in Source / Version control for all previous versions enabling deployment of “any supported version to any platform”. Lastly while we just need to be “ready and able” to deploy we still need to ensure that deployment is not a painful or high-risk process. Deployment needs to be a push button, single click, low risk event. To accomplish this deployment must be automated. Automated Deployment can be achieved in many different ways from batch files and scripts to release management software. The way you automate is as import as the fact that you actually do Automate Deployment.
As you begin your journey of Continuous Improvement to your Solution Delivery Pipeline remember this “You do not need to solve all the world problems in the first iteration”. Make incremental improvements to your current process, collect feedback and integrate that feedback into the next iteration to Continuously Improve the Solution and the Process.

Advertisements

What is Agile Marketing

I am a firm believer that everything can and should be Agile! The days of analysis paralysis should be long behind us. Our customers and their attention spans move at internet speeds and you have 3 clicks or less to get their attention. Agile software delivery strives to deliver business value to customers quickly while minimizing risk and defects while Agile Marketing is essentially the same idea where the business value is timely and relevant information about our product / service offerings to new and existing customers. Defects or campaigns that do not generate interest and conversions should be quickly identified, modified and / or eliminated in favor of better performing campaigns.

Agile Marketing Manifesto (interpreted) :

Individuals and Interactions over Processes and Tools
Measurement and Data over Opinions and Conventions
Authentic Engagement and Transparency over Official Posturing
Rapid Iterations over a Few Large Bets
Two-way Conversations over One-way Interruptions
Intimate Customer Tribes over Impersonal Mass Markets

Below, we have compiled are a few Agile Marketing related resources:

Intro to Agile Marketing in 2 minutes

The title of this video speaks for itself… 2 minutes – let’s go!

The Agile Marketing Manifesto

Home

Here, the author discusses newways to create customer value for organizations through the new marketing approaches. These approaches come from a combination of Agile Marketing manifestos featured in a blog post by Travis Arnold. Values that have been highlighted include collaboration, adaptive campaigns, customer discovery, and more.

A collection of Agile Marketing Manifestos

Roundup: Agile Marketing Manifestos

As referenced above, this article compiles a host of different Agile ideas and principles, and in doing so points out the differences between them. The contrast between comprehensiveness, and simplicity are reviewed, and the limitations of each are discussed.  In addition, he gives feedback on each manifesto, focusing on what is most important from his point of view.  Different Agile practitioners often have different views, so it is valuable to look at the simple breakdowns of the initial framework that embodies what Agile Marketing is all about.

Implement Scrum for Digital Marketing

Agile Marketing: How to Implement Scrum for Digital Marketing


This article looks at Agile as a marketing methodology, separating it from its roots in software development and applying the practices to marketing campaigns. Digital marketing teams face different challenges than software development teams, but conceptually, many of these issues are very similar. Agile management practices that are data driven, quantitative, and iterative can be applied to marketing campaigns to mitigate risk, and help them operate more effectively. Here, the parallels are pointed out, and the problems faced in software development are adapted to a digital marketing teams point of view.

Agile Marketing a step by step guide
https://www.mckinsey.com/business-functions/marketing-and-sales/our-insights/agile-marketing-a-step-by-step-guide
This is another great article that focuses on engaging in innovative new ways to meet customers’ needs more effectively through Agile marketing practices. Again, it looks at Agile from a marketing perspective, and gives a step by step overview of how to implement it properly. It covers core concepts, such as evaluating results to improve data driven solutions, deploying tests quickly, and rapidly iterating processes to achieve targeted goals. Not only does it describe and define the concepts of Sprints, designing tests, and customer first methodology, this article also provides practical and effective tips to do so.

Airline club membership Is it worth it

On an early Monday flight I pretty much have the whole United club to myself…

If you have ever thought about United Club membership before I offer a little food for thought:

If you spend as much time at the airport as I do (or even way less) think of club membership in terms of free “faster” Wifi, free drinks, soups and salads as well as a relatively quiet space to relax or work and wait for your delayed flight.

Imagine this scenario:
You have an hour and 25 minute wait for your next flight or enough time to have 2 glasses of wine a bowl of soup (or 2) and a salad. While enjoying your wine and eating your soup and salad you return a few emails and finish that proposal on your laptop. What’s that your flight was canceled and you need to talk to customer service but so do the other 247 people on your flight? No problem go to the club and talk to customer service there “members only”.
So how much does all of this cost?
First let’s do the math…
2 airport glasses of wine – $18
1 airport bowl of soup – $9
1 airport salad – $12
Quiet workspace with space for laptop and faster wifi – $priceless

For a grand total of $39 actual dollars per leg of your trip plus at least $50 worth of less noise and airport DRAMA. What is your peace of mind worth??
So you get stuck on that flight from SFO to DCA and have to go through ORD because you booked last minute. That’s $39 at SFO $39 at ORD and $39 at DCA (Because it’s better to wait for your bags in the club with a free drink in your hand) or $117 each way. A grand total of $234 round trip. Did I mention you get a plus 1?
The membership is $550 which sounds expensive until you do the math. If you travel for work at least once per month club membership represents a cost savings. Or if you travel for fun with a companion more than 4 times per year or if you just drink and snack A LOT. You have a full year to eat and snack your way to your $550 membership fee.
https://www.united.com/…/c…/travel/airport/lounge/rates.aspx

The Increasing Cost of Technical Debt

The cost of defects increases exponentially as they slip down the delivery pipeline a shift left in quality, security and stability goes a long way toward reducing costs. We must make a shift left in quality, security and stability by surfacing defects earlier in the Delivery pipeline as defects get exponentially more expensive as they slip down the pipeline. A defect caught after development in quality assurance is about 15x costlier than a defect found in design.

The Increasing Cost of Technical Debt
The Increasing Cost of Technical Debt

From a development perspective, a defect found during implementation is 6.5x costlier than if it were found in design but still about half the cost of finding the same defect in QA. If we have so many gaps in our process that a defect makes it from design, through implementation and QA and somehow finds itself in production the cost is 100x higher than finding that same defect in design.
A more elusive fact we must also take into account is the soft costs associated with the very public statement that the dev (and quality assurance) team “is a joke” as colleague of mine would say. All joking aside this is a team effort it is not only the developers fault but also QA, infrastructure, release management and anyone else responsible for any part of the pipeline. We sink or swim as a team and quality is everyone’s responsibility. If we deliver a crappy piece of software and the stock tanks and the company goes out of business we are ALL out of a job. Reputation cost is a little difficult to quantify but suffice it to say that releasing software riddled with defects and poor user experience does not build confidence in your team’s ability to deliver quality solutions to its customers.
http://www.isixsigma.com/industries/software-it/defect-prevention-reducing-costs-and-enhancing-quality/
Implementing processes such as Test-Driven Development, Continuous Integration and Automated Acceptance Testing / Behavior Driven Development can help teams make that “Shift Left” in quality that reduces the cost of their debt. As teams will typically incur from 10% – 30% technical debt to new work ratio per sprint it’s a good idea to do everything we can to find the defects and reduce debt before is slips down the pipeline towards Maintenance / Production where the costs skyrocket.

DevOps Key Metrics

What I find most compelling about the DevOps metrics listed below is the fact that control of almost all of the metrics can be gained by mastering the first metric in the list. The metric that seems to tame all others is the Number and Frequency of deployments / software releases. If we strive for the seemingly extreme goal of 10+ Deploys per Day the milestones that we much achieve to reach this goal end up covering all of the remaining metrics. For example, if we are able to deploy 10 times per day without losing or pissing off every single one of our customers we must have reduced the volume of defects, number and frequency of outages as well as cost of those outages. As the story goes in order to deploy 10 times a day most everything in the delivery pipeline needs to be automated therefore automated testing should reduce the Number of Defects and the cost associated with fixing them. By the same token if the deployment is automated the Number and Cost of Resources associated with deployment should be reduced. Lastly in order to deploy 10 times during a normal workday of 8 hours (480 minutes) our deployments must be done every 48 minutes. If we intend for our customers to actually use our solution the actual deployment must take significantly less than 48 minutes! As a result, Mean Time to Recovery and Mean Time to Change must go down as changes and fixes can go out in the next deployment within 48 minutes.

Number and frequency of software releases
Volume of defects
Time/cost per release
MTTR (Mean Time to Recover)
MTTC (Mean Time to Change)
Number and frequency of outages / performance issues
Revenue/profit impact of outages / performance issues
Number and cost of resources

  

Acceptance Criteria, Are we DONE yet?

When working on an Agile Project, solution requirements are gathered through meetings between the customer and the Product Owner and potentially a Business Analyst. Unlike requirements from a traditional Waterfall project the solution requirements for an Agile Project are written is a simple nontechnical format that is easily consumable by all project stakeholders. Project stakeholders from the customer, nontechnical product owner and executive team to the technical implementation team members should be able to read and understand the meaning behind the simplified requirement. This plain English, nontechnical, easily consumable format is known as a User Story. User Stories follow a basic format that is consistent regardless of who writes the User Story and their technical background (or lack thereof). This simple format includes the type of user performing the action, the action they are performing and the results they hope to gain by performing said action for example:

As a customer
I want to log in
so that I can order the items in my shopping cart without reentering my information for every order.

In this example the type of user is a customer, the action is logging in and the goal is to avoid entering customer details when making a purchase. It’s a nice standard format easily understood by all parties involved but where are the details? As a developer how do I know “exactly” what the customer is asking for? As a tester how do I know what I should test for to ensure that we deliver what the customer really wants? The answer is Acceptance Criteria! Acceptance Criteria is where the details of our User Story are fleshed out through further discussion with the customer. For example, the Product Owner might ask the Customer “What information does the user not want to reenter? To which the customer might respond “Shipping address, billing address and payment details”. To further clarify the customer’s intentions for the desired feature the Product Owner may dig deeper and ask “what do you mean by payment details”. To which the customer might respond “credit card number, name on card, expiration date and CVS number on the back of the card”.
Once the Product Owner has collected enough detail that they have a firm grasp on the functionality requested by the customer the information is documented in the User Story as Acceptance Criteria. There is no requirement to use a standard format for the Acceptance Criteria, however for the same reasons we use a standard format for the User Story we should also adopt a standard format for Acceptance Criteria so no matter who writes the Acceptance Criteria it is in a consistent format that is easily understood by all project stakeholders. A good candidate for this standard Acceptance Criteria format is Gherkin format. Gherkin format is used in an acceptance testing tool called cucumber, hence the name. A Gherkin is a smaller variety of cucumber used to make pickles so it’s fitting that it is the name of the syntax used to write Acceptance Criteria in an application called “Cucumber”. Gherkin use a standard format that describes the scenario in question, the action to be performed and the expected result keeping the statement short and to the point using the Given…When…Then… format.

Given a valid username and password
When I login
Then I am taken to the profile page

Without this standard format, Acceptance Criteria could appear as a bulleted list, as a long winded paragraph with no structure or as some other nonstandard format making it difficult to consume both by technical and nontechnical team members.
During sprint planning when the delivery team is reviewing the User Stories to be committed to the sprint the team will first play Planning Poker to come to a consensus on the Story Points assigned to a User Story. Then the team will begin to flesh out the necessary tasks to get the story to its Definition of Done. It’s worth noting that typically the sprint planning meeting should be no more than 2-4 hours per week of the sprint. During this 4-8 hour planning meeting (for a typical 2 week sprint) we should expect the team to identity 60-75 percent of the delivery team tasks necessary to get the User Story to the teams stated Definition of Done. The amount of additional time necessary to identify the 25-40 percent of delivery teams task is far beyond the effort vs accuracy curve. The more detailed the Acceptance Criteria the more likely we are to capture a larger percentage of the necessary Delivery Team tasks.
Generally speaking if a User Story has more than 15-20 Gherkin format Acceptance Criteria is probably too large (an Epic) and should be sliced to make it more manageable. As the theory goes the larger and more complex the User Story, the more Acceptance Criteria it will have and the more likely we are to miss more of the detailed delivery team tasks during sprint planning.
We do not consider a User Story “Done” until, at a minimum, all Acceptance Criteria has been met.
So, write good User Stories, write detailed Acceptance Criteria and use Gherkin format to keep the Acceptance Criteria consistent regardless who writes them.

Slicing User Stories Method 1

Slice by Happy vs. Unhappy Path

Any feature or method that we add to our solution will have happy and one or more unhappy paths.  The happy path describes how the feature will behave when everything goes according to plan.  If there are any errors exceptions or omissions then the unhappy path is taken.
Consider a standard authentication User Story for a website with members only content:

As a member I want to log in with my account so that I can access members only content.

If we assume a standard login procedure we can identify a happy path and several possible unhappy paths.

As a member I want to log in with my account so that I can access members only content (Happy)

As a member I want to be able to request a new password when my login fails, so that I can try to log in again (Unhappy)

As a new member I need the option to register a new account so that I can access secured content (Unhappy)

As a site owner I want to block users with 3 failed log in attempts in a row so I can protect the site against hackers (Unhappy)

As you can see the unhappy path describes omissions or exceptions in our process.  By identifying the various happy and unhappy paths we ensure that the delivery team fully understands the functionality required by the customer.  The more detailed and granular user stories also provide an opportunity for more accurate Acceptance Criteria for each sliced user story.  The sliced User Stories also give the product owner the opportunity to prioritize functionality at a more granular level.  For example, in the first release there may only be a few users so locking accounts after 3 failed logins may not be important yet.  The password reset feature may also be overkill in the first release as someone in Operations or Support can easily reset a user’s password upon receipt of an email request from the user.

Stay tuned for 6 more methods for slicing User Stories…

Slicing User Stories 7 Methods ***** Next Method 2 – Slicing by Workflow Steps

Slicing User Stories 7 Methods

In an Agile Development Project, the Solution Requirements are communicated from the customer to the delivery / development team using a standard notation easily understood by the delivery team and all stakeholders.  This standard notation is known as a User Story.  See our post on What Makes a Good User Story for more details.

When committing a User Story to a sprint in an agile project it is best that all the tasks necessary to take the User Story to the teams stated definition of done can be completed within a single sprint.  In most cases a User Story so large that it cannot be completed within a sprint is a feature or epic that should be broken down into smaller components before being committed to the sprint.

There are several different ways we can go about breaking down or slicing a User Story.  We call it slicing to invoke the “Layered Cake Metaphor”.

As the theory goes we can only truly enjoy our cake if we take a vertical slice of the cake ensuring that we get all of the flavors from each layer including the frosting between layers.  Taking that concept to our layered application architecture this simply means that to really call a story “Done” we must be able to test and use the features introduced by the completion of the User Story.  If we don’t get each layer of the application framework in our “slice” then we can’t use the feature.  For example, a login feature is only useful if we have the login form at the user interface layer, some authentication logic at the business rules layer and data layer logic to compare the given username and password with values stored in a credential store.  We need each layer of the cake to complete the story.  If we only have the user interface layer we could enter the username and password but there would be nothing to compare it with.  With this in mind “how” we slice our cake / User Stories is as important as the slicing itself.

Common methods for slicing user stories are:
Slicing by Happy vs. Unhappy Flow
Slicing by Workflow Steps
Slicing by Test Scenarios
Slicing by Acceptance Criteria Rules
Slicing  byData Types or Parameters
Slicing by Operations
Slicing by Roles
See the posts on each method for details on how to slice or size your user stories for completion in a single sprint.