SlideShare a Scribd company logo
Luis Rovirosa
luisrovirosa
Lean Code Kata
23rd January 2019
About me
Lean Software Development
Eliminate waste
Amplify learning
Decide as late as
possible
Deliver as fast as
possible
Empower the team
Build integrity in
See the whole
Client presentation
A supermarket called: KWIK-E-MART
Iteration 0 - Setup
1. Choose a partner
2. Download the base setup from
https://github.com/CodiumTeam/php-kata-bootstrap
3. Setup the development environment
4. Write a terminal application that accepts input and print
the result in the screen
Iteration 1 - Start selling
1. Write a simple checkout cash register
2. We sell 3 products: “apple”, “banana” and “cherry”
3. We should accept one of these words per line
4. apple costs 1 €, banana 1,5 € and cherry 0,75 €
5. You should print the total in cents after each product
Acceptance test:
apple -> 100
banana -> 250
cherry -> 325
Iteration 2 - Cherry discount
1. We sell the same products with the same prices
2. You get a discount of 0.20 € when buying two cherries
Acceptance test:
cherry -> 75
cherry -> 130
cherry -> 205
cherry -> 260
Iteration 3 - CSV
1. Same prices and discounts as before
2. We can receive the shopping list from CSV
Acceptance test:
apple,banana,cherry,cherry -> 380
Iteration 3a - 2x1 bananas
1. Now you get a discount of 0.30 € when buying two cherries
2. Special offer for bananas: “Buy one and get one free”
Acceptance test:
cherry -> 75
cherry -> 120
banana -> 270
banana -> 270
Iteration 4 - More apples
1. Cherry discount returns to 0.20 €
2. We should support “manzana”, “apfel” and “apple”
Acceptance test:
cherry -> 75
manzana -> 175
cherry -> 230
banana -> 380
banana -> 380
apfel -> 480
Iteration 5 - Different apple prices
1. Beware: CSV format feature should be delivered in the
next iteration
2. You get a discount of 1 € for every 3 “manzana”
3. You get a discount of 0.5 € for every 2 “apfel”
Acceptance test:
apfel -> 100 manzana -> 400
manzana -> 200 apfel -> 450
manzana -> 300 cherry -> 525
apple -> 400 cherry -> 580
Iteration 5a - Different apple prices
1. You get a discount of 1 € for every 3 “manzana”
2. You get a discount of 1 € for every 2 “apfel”
Acceptance test:
apfel -> 100 manzana -> 400
manzana -> 200 apfel -> 400
manzana -> 300 cherry -> 475
apple -> 400 cherry -> 530
Iteration 6 - CSV + discounts
1. We can receive the shopping list from CSV
2. You get a discount of 1.5 € for every 2 “apfel”
3. You get a discount of 1 € for every 4 “apple”
4. You save 2 € every 5 fruits
Acceptance test 1: Acceptance test 2:
apfel -> 100 apfel,manzana,manzana,apple,apfel -> 150
manzana -> 200
manzana -> 300
apfel -> 250
banana -> 200
What have you learnt?
What did you enjoy the most?
What would you change?
Retrospective
https://es.slideshare.net/
chrismdp/lean-code
References
Codium solution
github.com/CodiumTeam/lean-code-kata
Thank you
Luis Rovirosa
luisrovirosa

More Related Content

PDF
Lean code en
ZIP
Lean code
PPTX
Lec.1 Key Concepts in Economics.pptx
PPT
NWA prezentācija angļu val.
PDF
Lecture 2_Inventory Management_EOQ_EPQ.pdf
PDF
Desarrollando a velocidad de crucero - CAS 2018
PDF
Kata de TDD by Jordi Anguela
PDF
Learned lessons in real world projects by Jordi Anguela at Mallorca Software ...
Lean code en
Lean code
Lec.1 Key Concepts in Economics.pptx
NWA prezentācija angļu val.
Lecture 2_Inventory Management_EOQ_EPQ.pdf
Desarrollando a velocidad de crucero - CAS 2018
Kata de TDD by Jordi Anguela
Learned lessons in real world projects by Jordi Anguela at Mallorca Software ...

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
1. Introduction to Computer Programming.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
A comparative analysis of optical character recognition models for extracting...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
Teaching material agriculture food technology
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
cuic standard and advanced reporting.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Weekly Chronicles - August'25-Week II
1. Introduction to Computer Programming.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
A comparative analysis of optical character recognition models for extracting...
20250228 LYD VKU AI Blended-Learning.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
Teaching material agriculture food technology
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Ad
Ad

Lean code kata en PHPMad

  • 1. Luis Rovirosa luisrovirosa Lean Code Kata 23rd January 2019
  • 3. Lean Software Development Eliminate waste Amplify learning Decide as late as possible Deliver as fast as possible Empower the team Build integrity in See the whole
  • 4. Client presentation A supermarket called: KWIK-E-MART
  • 5. Iteration 0 - Setup 1. Choose a partner 2. Download the base setup from https://github.com/CodiumTeam/php-kata-bootstrap 3. Setup the development environment 4. Write a terminal application that accepts input and print the result in the screen
  • 6. Iteration 1 - Start selling 1. Write a simple checkout cash register 2. We sell 3 products: “apple”, “banana” and “cherry” 3. We should accept one of these words per line 4. apple costs 1 €, banana 1,5 € and cherry 0,75 € 5. You should print the total in cents after each product Acceptance test: apple -> 100 banana -> 250 cherry -> 325
  • 7. Iteration 2 - Cherry discount 1. We sell the same products with the same prices 2. You get a discount of 0.20 € when buying two cherries Acceptance test: cherry -> 75 cherry -> 130 cherry -> 205 cherry -> 260
  • 8. Iteration 3 - CSV 1. Same prices and discounts as before 2. We can receive the shopping list from CSV Acceptance test: apple,banana,cherry,cherry -> 380
  • 9. Iteration 3a - 2x1 bananas 1. Now you get a discount of 0.30 € when buying two cherries 2. Special offer for bananas: “Buy one and get one free” Acceptance test: cherry -> 75 cherry -> 120 banana -> 270 banana -> 270
  • 10. Iteration 4 - More apples 1. Cherry discount returns to 0.20 € 2. We should support “manzana”, “apfel” and “apple” Acceptance test: cherry -> 75 manzana -> 175 cherry -> 230 banana -> 380 banana -> 380 apfel -> 480
  • 11. Iteration 5 - Different apple prices 1. Beware: CSV format feature should be delivered in the next iteration 2. You get a discount of 1 € for every 3 “manzana” 3. You get a discount of 0.5 € for every 2 “apfel” Acceptance test: apfel -> 100 manzana -> 400 manzana -> 200 apfel -> 450 manzana -> 300 cherry -> 525 apple -> 400 cherry -> 580
  • 12. Iteration 5a - Different apple prices 1. You get a discount of 1 € for every 3 “manzana” 2. You get a discount of 1 € for every 2 “apfel” Acceptance test: apfel -> 100 manzana -> 400 manzana -> 200 apfel -> 400 manzana -> 300 cherry -> 475 apple -> 400 cherry -> 530
  • 13. Iteration 6 - CSV + discounts 1. We can receive the shopping list from CSV 2. You get a discount of 1.5 € for every 2 “apfel” 3. You get a discount of 1 € for every 4 “apple” 4. You save 2 € every 5 fruits Acceptance test 1: Acceptance test 2: apfel -> 100 apfel,manzana,manzana,apple,apfel -> 150 manzana -> 200 manzana -> 300 apfel -> 250 banana -> 200
  • 14. What have you learnt? What did you enjoy the most? What would you change? Retrospective