SlideShare a Scribd company logo
CODING KATA WORKSHOP
Seattle Software Craftsmanship Meetup
25May2017
TONIGHT’S MENU
• Code Katas
• Test-Driven Development
• Pair Programming
• Tonight’s Kata
• Session 1
• Session 2
• Session 3
CODE KATAS
WHAT IS A KATA?
WHY PRACTICE?
TONIGHT’S MENU
• Code Katas
• Test-Driven Development
• Pair Programming
• Tonight’s Kata
• Session 1
• Session 2
• Session 3
TEST-DRIVEN DEVELOPMENT
THREE RULES OF TDD
1. You are not allowed to write any production code unless
it is to make a failing unit test pass.
2. You are not allowed to write any more of a unit test than
is sufficient to fail; and compilation failures are failures.
3. You are not allowed to write any more production code
than is sufficient to pass the one failing unit test.
http://bit.ly/3RulesTDD
RED -> GREEN ->
REFACTOR
Create a
unit test that
fails
Write
production
code that
makes it pass
Clean up the
mess you
just made
TRANSFORMATION
PRIORITY PREMISE
• ({}–>nil) no code at all->code that employs nil
• (nil->constant)
• (constant->constant+) a simple constant to a
more complex constant
• (constant->scalar) replacing a constant with a
variable or an argument
• (statement->statements) adding more
unconditional statements.
• (unconditional->if) splitting the execution path
• (scalar->array)
• (array->container)
• (statement->recursion)
• (if->while)
• (expression->function) replacing an expression
with a function or algorithm
• (variable->assignment) replacing the value of a
variable.
“As the tests get more specific, the code
gets more generic.”
http://bit.ly/TPPremise
STRUCTURING YOUR
TESTS
Arrange
Act
Assert
STRUCTURING YOUR
TESTS
Arrange
Act
Assert
Act
Assert
Act
Assert
STRUCTURING YOUR
TESTS
Arrange
Act
Assert
Act
Assert
Act
Assert
STRUCTURING YOUR
TESTS
Given
When
Then
SINGLE LINE ASSERTS?
TESTS ARE CODE TOO
4 RULES OF SIMPLE DESIGN
http://bit.ly/4SimpleDesignRules
Kent Beck / Martin Fowler / J.B. Rainsberger / Corey Haines
Has no more code than necessary
Minimizes duplication
Communicates intent
Passes all tests
TONIGHT’S MENU
• Code Katas
• Test-Driven Development
• Pair Programming
• Tonight’s Kata
• Session 1
• Session 2
• Session 3
PAIR PROGRAMMING
PAIR PROGRAMMING IS NOT…
Credit:Anthony Sciamanna http://bit.ly/pingpongpair
ROLES OF PAIR PROGRAMMING
TONIGHT’S MENU
• Code Katas
• Test-Driven Development
• Pair Programming
• Tonight’s Kata
• Session 1
• Session 2
• Session 3
TONIGHT’S KATA
BUILDING A PIZZA
Pizzas
Small $9
Medium $15
Large $18
Toppings
Cheese, Onions, Bell Pepper 10% of Pizza Price
Pepperoni, Sausage, Ham 18% of Pizza Price
Roasted Garlic, SundriedTomato 32% of Pizza Price
Requirements
Start a new pizza
Add toppings to the pizza
Get the current price of the pizza
Get a description of the pizza: “Small pizza with pepperoni, sausage and cheese.”
Credit: ShayneVacher
SESSION 1
SESSION 2
SESSION 3

More Related Content

PPTX
Rails automatic test driven development
PDF
TDD on android. Why and How? (Coding Serbia 2019)
PDF
Can you TDD Rails?
PPTX
Test Driven Development on Android (Kotlin Kenya)
PDF
End-to-end performance testing, profiling, and analysis at Redis
PPTX
IaC? VSTS to the rescue! Abbreviations explained
PPTX
Ansible, Idempotency, and Jenkins
PDF
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing
Rails automatic test driven development
TDD on android. Why and How? (Coding Serbia 2019)
Can you TDD Rails?
Test Driven Development on Android (Kotlin Kenya)
End-to-end performance testing, profiling, and analysis at Redis
IaC? VSTS to the rescue! Abbreviations explained
Ansible, Idempotency, and Jenkins
Sencha Roadshow 2017: Best Practices for Implementing Continuous Web App Testing

What's hot (20)

PPT
Quality over Continuous Delivery
PDF
Wax on, wax off
PDF
Zero to Test Driven Infrastructure
PPTX
Unit Testing talk
PPTX
The Key Components of Adopting CI The OpenStack Way
PDF
PDF
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
PPTX
When Tools Attack
PPTX
Coding Standard And Code Review
PDF
Devops, Secops, Opsec, DevSec *ops *.* ?
PPTX
Trunk Based Development in the Enterprise - Its Relevance and Economics
PDF
What is this agile thing anyway
PPTX
Cucumber Tool
PPTX
Cypress test techniques cucumber bdd framework,tdd,api tests course
PPTX
How to Supercharge your PHP Web API
PPTX
Effective Code Review (Or How To Alienate Your Coworkers)
PPTX
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
PPTX
Episode 13 - Advanced Apex Triggers
PPTX
DevOps & Security: Here & Now
PPTX
API Test Automation Using Karate (Anil Kumar Moka)
Quality over Continuous Delivery
Wax on, wax off
Zero to Test Driven Infrastructure
Unit Testing talk
The Key Components of Adopting CI The OpenStack Way
Олександр Хотемський:”Serverless архітектура та її застосування в автоматизац...
When Tools Attack
Coding Standard And Code Review
Devops, Secops, Opsec, DevSec *ops *.* ?
Trunk Based Development in the Enterprise - Its Relevance and Economics
What is this agile thing anyway
Cucumber Tool
Cypress test techniques cucumber bdd framework,tdd,api tests course
How to Supercharge your PHP Web API
Effective Code Review (Or How To Alienate Your Coworkers)
Jonathon Wright - Intelligent Performance Cognitive Learning (AIOps)
Episode 13 - Advanced Apex Triggers
DevOps & Security: Here & Now
API Test Automation Using Karate (Anil Kumar Moka)
Ad

Similar to Craftsmanship Workshop: Coding Kata (20)

KEY
Test Driven Development
PDF
Awesome Test Automation Made Simple w/ Dave Haeffner
PDF
Test-Driven Development Reference Card
PDF
TDD and Related Techniques for Non Developers (2012)
PPTX
Pair programming and introduction to TDD
PPTX
Continuous Delivery - Automate & Build Better Software with Travis CI
PDF
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
PDF
Test box bdd
PDF
Unit Testing in JavaScript
PPTX
Level Up Your Salesforce Unit Testing
PDF
PPTX
Understanding TDD - theory, practice, techniques and tips.
PPT
TDD In Practice
PDF
Agile2013 - Integration testing in enterprises using TaaS - via Case Study
PPTX
DSpace 7 - Creating High-Quality Software: Update to Development Practices
PDF
Restructuring rails
PPTX
Lean-Agile Development with SharePoint - Bill Ayers
PDF
Continuous Testing
PPTX
TDD and the Legacy Code Black Hole
KEY
TDD refresher
Test Driven Development
Awesome Test Automation Made Simple w/ Dave Haeffner
Test-Driven Development Reference Card
TDD and Related Techniques for Non Developers (2012)
Pair programming and introduction to TDD
Continuous Delivery - Automate & Build Better Software with Travis CI
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Test box bdd
Unit Testing in JavaScript
Level Up Your Salesforce Unit Testing
Understanding TDD - theory, practice, techniques and tips.
TDD In Practice
Agile2013 - Integration testing in enterprises using TaaS - via Case Study
DSpace 7 - Creating High-Quality Software: Update to Development Practices
Restructuring rails
Lean-Agile Development with SharePoint - Bill Ayers
Continuous Testing
TDD and the Legacy Code Black Hole
TDD refresher
Ad

Recently uploaded (20)

PDF
top salesforce developer skills in 2025.pdf
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Nekopoi APK 2025 free lastest update
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Digital Strategies for Manufacturing Companies
PPTX
Essential Infomation Tech presentation.pptx
PDF
medical staffing services at VALiNTRY
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
ai tools demonstartion for schools and inter college
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
AI in Product Development-omnex systems
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
top salesforce developer skills in 2025.pdf
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Nekopoi APK 2025 free lastest update
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Odoo POS Development Services by CandidRoot Solutions
Digital Strategies for Manufacturing Companies
Essential Infomation Tech presentation.pptx
medical staffing services at VALiNTRY
Design an Analysis of Algorithms II-SECS-1021-03
VVF-Customer-Presentation2025-Ver1.9.pptx
CHAPTER 2 - PM Management and IT Context
ai tools demonstartion for schools and inter college
wealthsignaloriginal-com-DS-text-... (1).pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Softaken Excel to vCard Converter Software.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
AI in Product Development-omnex systems
How Creative Agencies Leverage Project Management Software.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx

Craftsmanship Workshop: Coding Kata