class: title # Tight Feedback Loops With # TDD and DevOps .col.col-1[ ] .col.col-4.about[ ## Steven Hicks ###
@pepopowitz ###
pepopowitz.github.io ###
steven.hicks@centare.com ] .col.col-1[ ] .col.col-4.about[ ## Tyler Evert ###
@TylerDoesDevOps ###
thefoxgang.com ###
tyler.evert@centare.com ] ??? steve --- class: middle .col.col-4.left-align[ # Steven Hicks ## Rides Bikes ## Climbs Rocks ## Crushez Codez ] .col.col-6[  ] ??? steve --- class: middle .col.col-6[  ] .col.col-4.left-align[ # Tyler Evert ## Travels ## Plays Video Games ## Does the DevOps ] ??? tyler --- class: title # Feedback Loops ??? tyler --- class: loop # What is a feedback loop?  ??? tyler Definition: you make an action, observe the effect, and repeat. --- background-image: url(images/thermostat.jpg) # The Thermostat ??? steve The canonical example of a feedback loop is a thermostat. --- class: loop # The Thermostat  ??? steve The thermostat checks the room temperature. If it is below the desired temperature, it tells the furnace/boiler to... --- class: full-screen-image, meme background-image: url(images/kriskross.jpg) # Warm It Up Kris ??? steve And the furnace says "I'm about to" --- class: loop # The 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 --- class: full-screen-image, meme background-image: url(images/vanilla-ice.jpg) # Stop! ??? steve And the furnace says "Collaborate and listen". --- class: loop # The Thermostat  ??? steve And so this cycle continues until April ... But not all feedback loops are equal. --- class: title # 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. --- class: loop # The bike tuning feedback loop  ??? 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. --- class: loop # The bike tuning feedback loop  ??? 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. --- class: loop # The bike tuning feedback loop  ??? 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. --- class: loop # The bike tuning feedback loop  ??? 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. --- class: loop # The bike tuning feedback loop  ??? 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! --- class: title ## 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. --- class: loop # Tightening the Loop  ??? steve One way is to make the arrows in the loop shorter. --- class: loop # Tightening the Loop .transition[   ] ??? steve In my bike example, it meant eliminating trips to the bike shop or neighbors house. --- class: loop # The Developer-QA feedback 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? --- class: loop # The Developer-QA feedback loop .transition[   ] ??? 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 --- class: full-screen-image, meme background-image: url(images/vanilla-ice.jpg) # Collaborate! ??? steve And Tyler and i have a great way for that to happen. --- class: full-screen-image, meme background-image: url(images/vanilla-ice.jpg) # Test Driven Development! ??? steve --- class: title # For every change to the system, you must first introduce a failing test ??? Tyler --- class: title # Red/Green/Refactor ??? Tyler --- class: full-screen-image, meme background-image: url(images/demo.jpg) # 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 --- class: title ## How does TDD benefit the developer? ??? Tyler --- class: title # Promotes simplicity ??? Tyler Developers will be happy that their code is simpler --- class: title # 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. --- class: title # Reduces the amount of mental clutter ??? steve Grocery list --- class: title ## How does TDD benefit the team? ??? steve --- class: title # Development + Testing + Peer Review ??? steve It is a great opportunity for collaboration amongst team members --- class: title # Documentation of the system ??? steve All of the small, granular test cases serve as documentation of the system --- class: title # Find bugs before they've been written ??? steve Because you are thinking about edge cases as you build it --- class: title ## How does TDD benefit the product? ??? Tyler --- class: title # 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. --- class: title # 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) --- class: fit-image center background-image: url(images/dilbert.jpg) # DevOps ??? Tyler --- class: full-screen-image left background-image: url(images/assemblyline.jpg) # What is it? ## Flow ??? Tyler --- class: full-screen-image light left background-image: url(images/Op-Amp.png) # What is it? ## Feedback ??? Tyler --- class: full-screen-image left background-image: url(images/dojo.jpg) # What is it? ## Continuous Improvement ??? Tyler --- class: full-screen-image, left-align background-image: url(images/startrek.png) # So what is it _really_? ??? Tyler Collaboration Faster feedback Better business decisions --- class: title # So what does this do for us? ??? steve --- class: title # 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. --- class: title # 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. --- class: title # 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. --- class: title loop # The DevOps feedback loop  ??? tyler How is this different from before? We've taken away the shortcuts, and added *customers* --- #
Build
#
Deploy
#
Deliver
??? tyler --- class: title # How Do I Get Started? ??? steve How do I get started? --- class: title ## You're in a QA silo right now, how do you get closer to the dev team? ??? steve --- class: title # Get QA aligned with the dev teams they support in reality ??? steve --- class: title # Provide test cases *ahead* of the development team's progress ??? steve --- class: title ## 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 --- class: title # Go talk to your developers ??? tyler make yourself highly approachable, encourage questions and dialogue --- class: title # 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. --- class: title ## How do I get all that slick automation goodness? ??? steve --- class: title # Encourage developers to start creating automated tests ??? steve so the build server can actually do stuff --- class: title # Grab a CI server and play around ??? steve --- class: title # Start the conversation ??? steve Bring this to your boss/PM/PO talk about the potential gains in investing someone's time --- class: title # Thank you! ## http://bit.ly/tight-feedback-loops .col.col-1[ ] .col.col-4.about[ ## Steven Hicks ###
@pepopowitz ###
pepopowitz.github.io ###
steven.hicks@centare.com ] .col.col-1[ ] .col.col-4.about[ ## Tyler Evert ###
@TylerDoesDevOps ###
thefoxgang.com ###
tyler.evert@centare.com ] ??? steve