+ - 0:00:00
Notes for current slide

steve

Notes for next slide

steve

Tight Feedback Loops With

TDD and DevOps

Steven Hicks

@pepopowitz

pepopowitz.github.io

steven.hicks@centare.com

Tyler Evert

@TylerDoesDevOps

thefoxgang.com

tyler.evert@centare.com

steve

Steven Hicks

Rides Bikes

Climbs Rocks

Crushez Codez

Me

steve

Me

Tyler Evert

Travels

Plays Video Games

Does the DevOps

tyler

Feedback Loops

tyler

What is a feedback loop?

Feedback Loop

tyler

Definition: you make an action, observe the effect, and repeat.

The Thermostat

steve

The canonical example of a feedback loop is a thermostat.

The Thermostat

Thermostat

steve

The thermostat checks the room temperature.

If it is below the desired temperature, it tells the furnace/boiler to...

Warm It Up Kris

steve

And the furnace says "I'm about to"

The Thermostat

Thermostat

steve

The thermostat checks the temperature again, and the loop continues

Until the temperature is a perfect 67 degrees, when it tells the furnace/boiler to stop

Stop!

steve

And the furnace says "Collaborate and listen".

The Thermostat

Thermostat

steve

And so this cycle continues until April

...

But not all feedback loops are equal.

The bike-tuning feedback loop

steve

I am a bike guy.

When your bike starts clicking when you pedal, it often means you need to adjust your derailleurs.

The bike tuning feedback loop

derailleur

steve

And this is a derailleur.

Maybe you don't recognize it by name, but you probably recognize it as the mechanical thingy

that changes the gears on your bike when you click a button on the handlebars.

The bike tuning feedback loop

Thermostat

steve

To tune the derailleurs on your bike, there is a feedback loop.

You turn a screw a quarter turn, and then you ride the bike 20 feet to see if everything is lined up.

The bike tuning feedback loop

Bad

steve

Bad

Here's a way to make that feedback loop awful.

The problem is, I don't see the results of this for days.

And if I get it back and find that it still doesn't shift well, I have to take it back to the shop again.

This is a loose, slow feedback loop.

The bike tuning feedback loop

Better

steve

Better

We can make this a little better.

It turns out my neighbor knows bikes, and he knows which screw to turn 1/4 turn.

Here, I see the results of each tuning in a much shorter time.

But I still have to take my bike over to my neighbors house each cycle through the loop.

The bike tuning feedback loop

Best!

steve

Best!

But we can make this even better!

I can learn a new skill - in this case, bike repair

And now, I get to see the results of each tuning almost instantly!

So how do I get better feedback?

So how do I get better feedback?

By tightening the loop.

steve

The tighter the loop, the quicker the feedback/your ability to react

There are a couple of ways to do this.

Tightening the Loop

Bad!

steve

One way is to make the arrows in the loop shorter.

Tightening the Loop

Bad! Best!

steve

In my bike example, it meant eliminating trips to the bike shop or neighbors house.

The Developer-QA feedback loop

Dev-QA Loop

Tyler

So let's take a look at a feedback loop we experience daily.

This is the loop between developers and QA.

There are a lot of stops along that loop.

A lot of opportunities for that loop to get bigger, and slower.

Tyler and I want to help you make that loop smaller, instead.

...

Here's our first suggestion.

What if we told you there was a shortcut on this loop?

The Developer-QA feedback loop

Dev-QA Loop Dev-QA Loop (shortcut)

Tyler

What if we told you there was a way to get changes to the developer,

without having to go through half of this loop?

Our good friend Rob has some advice for us

Collaborate!

steve

And Tyler and i have a great way for that to happen.

Test Driven Development!

steve

For every change to the system, you must first introduce a failing test

Tyler

Red/Green/Refactor

Tyler

Demo

Alright we're gonna build a calculator!!! Pull up VS, take turns driving keyboard, have test and code alongside each other

Test cases/implementation direction Division has weird edge cases Tester writes the test name at the beginning Later on QE writes the test themselves Run with NCrunch or VS2017, show Code Coverage for 'slower' feedback Go for 3-5 iterations, have QE suggest edges, have dev suggest edges

How does TDD benefit the developer?

Tyler

Promotes simplicity

Tyler

Developers will be happy that their code is simpler

Tightens the developer's feedback loop

Tyler

I don't have to re-launch the app every time I make a change,

and step through 7 steps to get to the issue I'm fixing.

Reduces the amount of mental clutter

steve

Grocery list

How does TDD benefit the team?

steve

Development + Testing + Peer Review

steve

It is a great opportunity for collaboration amongst team members

Documentation of the system

steve

All of the small, granular test cases serve as documentation of the system

Find bugs before they've been written

steve

Because you are thinking about edge cases

as you build it

How does TDD benefit the product?

Tyler

Puts you in the customer's shoes

Tyler

Any time you make a change, you are looking at it from the perspective of the user of your system.

Promotes maintainability

Tyler

Which leads to better quality

And fewer regression bugs

...

You can still write bad code with TDD

But it leads you toward writing better code

(you make it harder on yourself by not writing clean code)

DevOps

Tyler

What is it?

Flow

Tyler

What is it?

Feedback

Tyler

What is it?

Continuous Improvement

Tyler

So what is it really?

Tyler

Collaboration Faster feedback Better business decisions

So what does this do for us?

steve

No more big scary deployments

steve They are instead done in small batches, easy to handle, less change shocking the system. Also forces you to do them routinely, which forces you to streamline the process, which in turns means not doing them at midnight on Christmas.

Lots of experiments - small, rapid improvements

steve Example: turbotax running experiments during tax season. Throw a thousand good/bad/ugly ideas and scientifically find the million-dollar ones.

Every software feature is an experiment until you've obtained feedback on it in production

steve

The users are the ones who actually buy our products, so they get to truly say what is high-quality. Prove that by getting feedback from them, not just from others in our company.

The DevOps feedback loop

DevOps Loop

tyler

How is this different from before? We've taken away the shortcuts, and added customers

tyler

How Do I Get Started?

steve

How do I get started?

You're in a QA silo right now, how do you get closer to the dev team?

steve

Get QA aligned with the dev teams they support in reality

steve

Provide test cases ahead of the development team's progress

steve

Are you in with the dev team, but all the testing is done after code-freeze/at the end of the sprint/next sprint?

tyler

Go talk to your developers

tyler

make yourself highly approachable, encourage questions and dialogue

Developers are sensitive crybabies

tyler

Even though we know it's wrong, it still hurts when our code isn't working.

Be gentle with the bug reports!

Also, TDD is hard - you can't just tell them to start doing it.

How do I get all that slick automation goodness?

steve

Encourage developers to start creating automated tests

steve

so the build server can actually do stuff

Grab a CI server and play around

steve

Start the conversation

steve

Bring this to your boss/PM/PO

talk about the potential gains in investing someone's time

Thank you!

http://bit.ly/tight-feedback-loops

Steven Hicks

@pepopowitz

pepopowitz.github.io

steven.hicks@centare.com

Tyler Evert

@TylerDoesDevOps

thefoxgang.com

tyler.evert@centare.com

steve

Steven Hicks

Rides Bikes

Climbs Rocks

Crushez Codez

Me

steve

Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow