The Gilded Rose Kata is a fairly well known kata that presents the developer with some legacy code and a request to implement a new feature. In one variation of the kata, Randy Coulman briefly covers the "golden master testing" strategy to provide safety while the developer refactors a messy legacy code base in order to add that new feature. This talk expounds on that testing strategy and offers some hypotheses regarding it's appropriate use.
2. Paul Baker @paulbaker3
Husband, Father and Nerd
Hacking on stuff since 1999
Dev-ing for money since 2001
First Ruby gig in 2013
Currently at Capshare.com
WTF Is This Dude
3. Legacy code can really suck
Poorly designed
Bloated
Buggy
Untested or Naively tested
Arthritic Code
7. Not exactly
UnitTests == Dev::GoldStandard
Other testing strategies/ tools provide value
Nothing replaces the feedback you get from those . . . . .
From Therapy To Injury
http://blog.thecodewhisperer.com/permalink/integrated-tests-are-a-scam
But What About The Cost?
Problem Solved! Right….. ?
8.
9. Golden Master/ Guru Checks Output
Just go with it man…
Assumption: Functions As Designed
Don’t CHANGE ANYTHING. But seriously… change everything
It’s really not that crazy… I promise
J. B. Rainsberger http://blog.thecodewhisperer.com/permalink/surviving-legacy-...
There’s A Gem For That
Approvals https://github.com/kytrinyx/approvals
I Know! ANTI-PATTERN!
10. The Gilded Rose Kata
A legacy coding exercise
It’s kind of a thing
Created by Bobby Johnson in 2011
http://iamnotmyself.com/2011/02/13/refactor-this-the-gilded-rose-kata/
Ported to Ruby by Jim Weirich https://github.com/jimweirich/gilded_rose_kata
Commented on by Sandi Metz http://confreaks.tv/videos/railsconf2014-all-the-little-things
and Randy Coulman http://confreaks.tv/videos/railsconf2015-getting-a-handle-on-legacy-code
amongst others…
First Some Background
16. Randy Coulman
http://confreaks.tv/videos/railsconf2015-getting-a-handle-on-legacy-code
http://randycoulman.com//blog/2014/09/30/refactoring-legacy-code/
Lauren Voswinkel @laurenvoswinkel
Jim Weirich https://github.com/jimweirich/gilded_rose_kata
Sandi Metz http://confreaks.tv/videos/railsconf2014-all-the-little-things
Ryan Davis, Steven Books, and the rest of the Capshare Dev Team
Working Effectively with Legacy Code by Michael Feathers
Other blog posts
http://blog.codeclimate.com/blog/2014/02/20/gold-master-testing/
http://blog.thecodewhisperer.com/permalink/surviving-legacy-code-with-golden-master-and-sampling/
http://iamnotmyself.com/2011/02/13/refactor-this-the-gilded-rose-kata/
Sources, Thanks & Inspiration