Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
62 lines (38 sloc) 5.67 KB
layout title description date author index-image-url index-image-alt keywords categories
post
How to get faster feedback now
How unit tests, continuous integration and continuous delivery with deployment pipeline help get feedback and get better
2016-03-22
Suzie Prince
screenshots/fail-faster-ci/fail-fast-continuous-integration.png
fail fast continuous integration
continuous integration, CI, continuous delivery, fail fast, software development, deployment pipeline
CONTINUOUS-INTEGRATION

We've all experienced that feeling of working really hard on something that you "think" is amazing, only to have someone else give feedback that it’s “not quite right”. I love the way Mark Chang describes it: “in hindsight, with every attempt, my mom taught me what she wanted to see and gave me course corrections.”

Getting course corrections with every attempt is the interesting bit for me, and it’s what I want with everything I do... even this blog post! I want to incrementally and iteratively get to the right place rather than trying to get there in one go and realizing I’m way off. I want fast feedback. The same applies to software. I want to know, quickly, if the thing I built works. But not just if it works, I also want to know if it...

  • works with all the other things I wrote
  • works with all the other things you wrote
  • works when I deploy it
  • solves a customer need
  • makes my business better

There is probably a bunch of other stuff I want to know as well (like does X work better than Y at solving my customer’s needs) but let’s just stick with the above questions to start. The key to answering them is to test the smallest thing possible, as fast as possible, in situations that answer them.

Here is how I answer these questions, quickly:

Does it work at all and work with all the other things I wrote?

My answer to this is self-testing code such as Unit Testing. This process allows you to write the smallest possible piece of code to pass a test to prove whether your code does what you want it to. By running all previous tests that have been written, you also ensure that your new code works with all the old code. Feedback, super fast.

Does it work with all the other things my team wrote?

Here the answer is Continuous Integration, also referred to as CI. Unlike traditional processes where you integrate at the end, CI means that you regularly (daily or more often) get feedback on whether your work integrates with others'. This fast feedback ensures you don’t spend days, weeks, or months making everything work together at the end.

Continuous Integration{: .screenshot .big}

Will it work when I deploy it?

You could just deploy it and see, I suppose. But I assume you want to ensure you're deploying quality code to production. By having self-testing code and doing CI, you will have confidence about individual changes in a development environment. You can also test in different environments to get a better feel for performance in production. However, once you start getting all these different types of tests, the “fast” part of "fast feedback" can slow down. How, then, do I continue to answer all my questions quickly?

Continuous Integration{: .screenshot .big} A deployment pipeline is the answer. A deployment pipeline uses a staged approach to testing and deploying to different environments, allowing you to test the things that are most likely to fail quickly, and get faster feedback from them. In addition, by making the environments at each stage increasingly production-like as they progress through the pipeline, you also get increasing confidence that your code will work in production. You can also parallelize your testing at each stage: by testing things simultaneously, you get faster feedback as well.

Do my code changes solve a customer's needs and improve my business?

There are lots of ways to get feedback from users and customers, and you should start as soon as you can by asking questions, learning about customer needs and conducting usability tests. But if you really want to know if what you have done will work well and meet real-world needs, you will want to actually deliver to the real world regularly by practicing Continuous Delivery (CD) or Continuous Deployment.

Getting feedback from users sooner can be transformative to businesses. Using CD with deployment pipelines can help provide answers to your questions quickly... so you can transform your business.

Finally, there are two most things that also help you get faster feedback:

  • The first is do things frequently. Doing all of these things over and over again might seem counter-intuitive and costly, but frequency reduces difficulty. Frequency means smaller tasks, which are easier to achieve than big ones. Plus, with frequency you get better feedback sooner, and you just simply get better at doing things.

  • The second is automation. Automation will help you do all these things even more quickly and effectively, with less waste and less error. Tools for testings, CI and CD can help automate your processes and get your questions answered faster.

So why not get out there, get feedback, and get faster?

Snap CI © 2017, ThoughtWorks