SlideShare a Scribd company logo
Coding Dojo
Golden Master Technique
Approval Tests
­Gilded Rose Kata­
@AlinPandichi
Coding Dojo
Expectations?
Coding Dojo Mindset
●  We are here to learn
●  Safe place outside of work
●  Need to slow down
●  Focus on doing it right
●  Non­competitive, collaborative, fun 
environment
Practice session
●  One laptop with a functional dev. env. is 
connected to a projector
●  Two developers pair program on the 
laptop. The others are watching the code 
changes.
●  Every 7 minutes, one developer leaves 
the laptop and the next one from the 
room takes his place. 
Golden master technique
1. Find the way the system delivers its 
outputs
2. Find a way to capture the output of 
the system without changing the 
production code
3. Generate enough random inputs and 
persist the tuple input/output
Golden master technique
4. Write a system test to check the SUT 
against the previously persisted data
5. Commit the test
6. Check test behaviour and coverage
Outcome: we will have a basic safety net 
composed of system tests.
Approval Tests
ApprovalTests is an open source 
assertion/verification library to aid 
unit testing
http://approvaltests.sourceforge.net
Gilded Rose Kata
● All items have a SellIn value which 
denotes the number of days we have 
to sell the item
● All items have a Quality value which 
denotes how valuable the item is
● At the end of each day our system 
lowers both values for every item
Gilded Rose Kata
● Once the sell by date has passed, 
Quality degrades twice as fast
● The Quality of an item is never negative
● "Aged Brie" actually increases in 
Quality the older it gets
Gilded Rose Kata
● The Quality of an item is never more 
than 50
● "Sulfuras", being a legendary item, 
never has to be sold or decreases in 
Quality
Gilded Rose Kata
● "Backstage passes", like aged brie, 
increases in Quality as it's SellIn value 
approaches; Quality increases by 2 
when there are 10 days or less and by 
3 when there are 5 days or less but 
Quality drops to 0 after the concert
Gilded Rose Kata
New requirement:
● “Conjured” items degrade in Quality 
twice as fast as normal items
Practice time!
Retrospective
●  What did you learn today?
●  What happened as expected?
●  What surprised you?
●  What do you plan to use at work?
Resources
● https://github.com/apandichi/GildedRos
e­Refactoring­Kata
● http://blog.adrianbolboaca.ro/2014/05/
golden­master/
● http://approvaltests.com/
● http://approvaltests.sourceforge.net
Thank you!

More Related Content

What's hot (8)

PDF
Python in 15 minutes
Rodolfo Carvalho
 
PDF
Day1 - TDD (Lecture SS 2015)
wolframkriesing
 
PDF
Deliberate Practice (2014)
Peter Kofler
 
PPTX
Linux Variability Anomalies: What Causes Them and How do They get Fixed?
sarah_nadi
 
PDF
Quick Intro to Clean Coding
Ecommerce Solution Provider SysIQ
 
PDF
Coding Dojo: Baby Steps (2014)
Peter Kofler
 
PPTX
The TKP Intentional Method of Teaching Kids to Program
Lynn Langit
 
PPTX
Is your code ready for testing?
Ralph Ligtenberg
 
Python in 15 minutes
Rodolfo Carvalho
 
Day1 - TDD (Lecture SS 2015)
wolframkriesing
 
Deliberate Practice (2014)
Peter Kofler
 
Linux Variability Anomalies: What Causes Them and How do They get Fixed?
sarah_nadi
 
Quick Intro to Clean Coding
Ecommerce Solution Provider SysIQ
 
Coding Dojo: Baby Steps (2014)
Peter Kofler
 
The TKP Intentional Method of Teaching Kids to Program
Lynn Langit
 
Is your code ready for testing?
Ralph Ligtenberg
 

More from Alin Pandichi (13)

PDF
[Codecamp] The sorry state of frontend code
Alin Pandichi
 
PDF
Unit Testing your React / Redux app (@BucharestJS)
Alin Pandichi
 
ODP
Coding Dojo - The learning remote control
Alin Pandichi
 
PDF
The sorry state of frontend code [a talk @ Softbinator]
Alin Pandichi
 
PDF
Behavior driven development - a recap (@ Symfony Bucharest Meetup)
Alin Pandichi
 
PDF
The sorry state of frontend code
Alin Pandichi
 
ODP
How to unit test your React/Redux app
Alin Pandichi
 
PDF
Covariance and contravariance. Say what?! (Agile Talks #22)
Alin Pandichi
 
PDF
Coding Dojo - Berlin Clock - TDD
Alin Pandichi
 
ODP
Coding Dojo - Refactoring Tennis Kata
Alin Pandichi
 
PDF
Avatar.js
Alin Pandichi
 
PDF
Software development - the java perspective
Alin Pandichi
 
PDF
Java 8 - Lambdas and much more
Alin Pandichi
 
[Codecamp] The sorry state of frontend code
Alin Pandichi
 
Unit Testing your React / Redux app (@BucharestJS)
Alin Pandichi
 
Coding Dojo - The learning remote control
Alin Pandichi
 
The sorry state of frontend code [a talk @ Softbinator]
Alin Pandichi
 
Behavior driven development - a recap (@ Symfony Bucharest Meetup)
Alin Pandichi
 
The sorry state of frontend code
Alin Pandichi
 
How to unit test your React/Redux app
Alin Pandichi
 
Covariance and contravariance. Say what?! (Agile Talks #22)
Alin Pandichi
 
Coding Dojo - Berlin Clock - TDD
Alin Pandichi
 
Coding Dojo - Refactoring Tennis Kata
Alin Pandichi
 
Avatar.js
Alin Pandichi
 
Software development - the java perspective
Alin Pandichi
 
Java 8 - Lambdas and much more
Alin Pandichi
 
Ad

Recently uploaded (20)

PDF
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
PDF
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PPTX
Machine Learning Benefits Across Industries
SynapseIndia
 
PDF
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
PDF
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
PDF
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
PPTX
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
PDF
Market Insight : ETH Dominance Returns
CIFDAQ
 
PDF
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
PDF
How a Code Plagiarism Checker Protects Originality in Programming
Code Quiry
 
PDF
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
PPTX
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
PDF
Julia Furst Morgado The Lazy Guide to Kubernetes with EKS Auto Mode + Karpenter
AWS Chicago
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PDF
CIFDAQ Market Insight for 14th July 2025
CIFDAQ
 
PPTX
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Upskill to Agentic Automation 2025 - Kickoff Meeting
DianaGray10
 
Meetup Kickoff & Welcome - Rohit Yadav, CSIUG Chairman
ShapeBlue
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
Machine Learning Benefits Across Industries
SynapseIndia
 
Shuen Mei Parth Sharma Boost Productivity, Innovation and Efficiency wit...
AWS Chicago
 
OpenInfra ID 2025 - Are Containers Dying? Rethinking Isolation with MicroVMs.pdf
Muhammad Yuga Nugraha
 
HR agent at Mediq: Lessons learned on Agent Builder & Maestro by Tacstone Tec...
UiPathCommunity
 
UI5Con 2025 - Get to Know Your UI5 Tooling
Wouter Lemaire
 
Market Insight : ETH Dominance Returns
CIFDAQ
 
UiPath vs Other Automation Tools Meeting Presentation.pdf
Tracy Dixon
 
How a Code Plagiarism Checker Protects Originality in Programming
Code Quiry
 
Novus-Safe Pro: Brochure-What is Novus Safe Pro?.pdf
Novus Hi-Tech
 
Earn Agentblazer Status with Slack Community Patna.pptx
SanjeetMishra29
 
Julia Furst Morgado The Lazy Guide to Kubernetes with EKS Auto Mode + Karpenter
AWS Chicago
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
CIFDAQ Market Insight for 14th July 2025
CIFDAQ
 
UI5Con 2025 - Beyond UI5 Controls with the Rise of Web Components
Wouter Lemaire
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Human-centred design in online workplace learning and relationship to engagem...
Tracy Tang
 
Ad

Coding Dojo - Golden Master Technique - Approval Tests - Gilded Rose Kata-