Mirjam Aulbach

Treat yourself - A tale about dog training and test-driven development

What can dog training teach us about writing software? Discover how positive reinforcement and TDD create a powerful feedback loop that leads to cleaner, more reliable code.

Treat yourself - A tale about dog training and test-driven development
#1about 3 minutes

Connecting dog training principles to software testing

The speaker's background as a dog trainer provides a unique perspective on the principles behind test-driven development.

#2about 6 minutes

Applying positive reinforcement and small steps in training

Effective dog training focuses on reinforcing desired behaviors in small, achievable steps, similar to writing user stories and iterating.

#3about 3 minutes

Understanding the red-green-refactor cycle of TDD

TDD is a programmer-driven technique that follows a red-green-refactor cycle, writing a failing test before writing any implementation code.

#4about 4 minutes

How TDD builds a strong foundation of unit tests

TDD primarily generates fast and reliable unit tests, forming the stable base of the testing pyramid essential for agile development.

#5about 6 minutes

Building a dog training simulator with TDD

A practical coding example begins by writing the first failing tests to initialize a `Dog` class and assign it a name in JavaScript.

#6about 7 minutes

Using TDD to implement logic and catch bugs early

The TDD cycle helps catch a logical bug early when implementing rewards, demonstrating its value in preventing errors from reaching users.

#7about 4 minutes

Refactoring implementation and test code with confidence

With a suite of passing tests in place, the implementation and test code can be safely refactored to be more maintainable and less repetitive.

#8about 6 minutes

Simulating the learning process with a counter

A counter is added to track rewarded behaviors, allowing the dog to "learn" a command after a set number of successful repetitions.

#9about 4 minutes

Adopting TDD as a design tool, not just a testing method

TDD should be viewed as a code design strategy that promotes focus and clean architecture, but it's important to apply it pragmatically rather than dogmatically.

Related jobs
Jobs that call for the skills explored in this talk.

test

Milly
Vienna, Austria

Intermediate

test

Milly
Vienna, Austria

Intermediate

Featured Partners

Related Articles

View all articles
CH
Chris Heilmann
WWC24 Talk - Brenda Romero - Stay: Surviving and Thriving in Tech
Brenda Romero discusses her tech career journey, overcoming burnout, and inspiring future game developers at WWC24.Here is what she had to say in the video:Hey everyone! Thanks for joining us!Reflections on a Rough YearLast year, I gave a talk about ...
WWC24 Talk - Brenda Romero - Stay: Surviving and Thriving in Tech
CH
Chris Heilmann
Dev Digest 136 - No JS(on) of mine
News and ArticlesDouglas Crockford is our featured video, so let's talk about evolving JavaScript and all things JSON. Judicious JSON explains all the weird things in it, you can learn why it can be incredibly slow, people wonder what even is a JSON ...
Dev Digest 136 - No JS(on) of mine
CH
Chris Heilmann
Dev Digest 109 -Egg-citing things…
As we are heading into the Easter break, here are some things to spend some time on. There's resources on improving the performance of your code and you hear from the winners of CODE100 Amsterdam what it was like to be on stage. Also, hang tight as t...
Dev Digest 109 -Egg-citing things…

From learning to earning

Jobs that call for the skills explored in this talk.