Skip to content
0:00 / 0:00

#tdd#refactoring#kotlin

What does it mean to be Guided by Tests?

Pairing with Duncan

4.5K subscribers • 15 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Duncan McGregor, co-author of Java to Kotlin
  • Linked in the descriptiondmcg/gilded-rose-tdd

Intermediate. Assumes working knowledge.

536 views3 years ago1 recommendation

Tools and practiceSoftware designTestingRefactoring and legacy codeKotlin

Duncan McGregor demonstrates how test-driven development and refactoring improve code structure using the Gilded Rose refactoring kata in Kotlin.

My co-author Nat Pryce wrote a brilliant book with Steve Freeman called Growing Object Oriented Software, Guided By Tests. As well as using the tests to guide new features, if we take notice when things are hard to test we can often find refactorings that will improve existing code. In this, Part 51 of an exploration of where a Test Driven Development implementation of the Gilded Rose stock control system might take us in Kotlin, we find that making a minor change to support pricing breaks a lot of tests. Refactoring to expose functionality to those tests results in better structured code and simpler and more communicative tests. You can see the whole series as a playlist youtube.com/playlist?list=PL1ssMPpyqociJNwykAOB9_KEZVW7BW7m2 and the code on GitHub github.com/dmcg/gilded-rose-tdd If you like this, you’ll probably like the book Java to Kotlin, A Refactoring Guidebook java-to-kotlin.dev.

Why it's here

1 person recommends this

What people say. Recommended as a practical demonstration of test-driven development and refactoring in Kotlin.

u/dmcgin r/Kotlin • Recommends

What does it mean to be Guided by Tests?