SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Development
Challenge
Lean Code Kata
Oriol del Barrio
Lean Code
Objective: Acquiring and improve coding skills
by Chris Parsons (@chrismdp)
Javier Gamarra (@nhpatt) - http://nhpatt.com/slides/a%20LEAN-CODE%20experience/
#slide2
Lean Code
What is Lean? What is the Lean Software
Development?
Lean Code
• Remove waste
• Focus on deliver maximum value
• Deliver quickly
• Take decisions as later as possible
Lean Code
Apart of Lean code, have also in mind:
• Code Quality
• Product Quality
• Testing
• Automatisation
Let's start!
Iteration 0
10 minutes to choose a pair and setup the
development environment
Write a terminal application, accepts an input and
print the result in the screen
Customer Presentation
A supermarket called KWIK-E-MART
Iteration 1
10 minutes to write an easy cash register
Acceptance Test
• 'apple' cost 1€, 'banana' cost
1.5€ and 'cherry' cost 0,75€
• we should accept this words for
every input line (stdin)
• Print de total in cents in the
stdout every time
• apple -> 100
• cherry -> 175
• cherry -> 250
Iteration 2
10 minutes to add a discount
Acceptance Test
• Same inputs as before
• After two cherries you
will save 20 cents
• apple -> 100
• cherry -> 175
• cherry -> 230
Iteration 3
10 minutes to allow to read CSV format
Acceptance Test
• Accept values separed
by commas
• Same prices as
Iteration 2
• apple, cherry,
banana -> 325
• cherry, cherry -> 130
Iteration 3a
Stop! New urgent requirements. Same delivery date
Acceptance Test
• KWIK-E-MART shops have been notified to a
delay in the CSV format feature
• The input format is again one product per line
• Cherries have a 30 cents discount
• Bananas have the discount: 'buy two and one is
free'
• cherry -> 75
• cherry -> 120
• banana -> 270
• banana -> 270
Iteration 4
10 minutes to add location
Acceptance Test
• KWIK-E-MART shops stills notified regarding
the delay in the CSV format feature
• Cherrys discount is again 20 cents
• We should allow 'manzana' and 'apfel' for
apples
• cherry -> 75
• manzana -> 175
• cherry -> 230
• banana -> 380
• banana -> 380
• apple -> 480
Iteration 5
10 minutes to add discounts by name
Acceptance Test
• CSV format feature should be
delivered in the next sprint
• 3 x manzana: we will discount 1€
• 2 x apfel: we will discount 0.5€
• apfel -> 100
• manzana -> 200
• manzana -> 300
• apple -> 400
• manzana -> 400
• apfel -> 450
• cherry -> 525
• cherry -> 580
Iteration 5a
10 minutes to add descounts by name
Acceptance Test
• NEW CHANGE!
• 3 x manzana: we will
discount 1€
• 2 x apfel: we will discount 1€
• apfel -> 100
• manzana -> 200
• manzana -> 300
• apple -> 400
• manzana -> 400
• apfel -> 400
• cherry -> 475
• cherry -> 530
• banana -> 680
Iteration 6
10 minutes to deliver CSV format and allow super-discounts
Acceptance Test
• Allow to use inline and CSV input
format
• 2 x apfel: we will discount 1.5€
• By 4 apples and save another euro
• By 5 fruits and save 2 euros
• apfel, manzana,
manzana, apfel -> 250
• banana -> 200
• apfel, manzana,
manzana, apple,
apfel -> 150
Conclusions
• Remove waste: just do what is requested not anymore
trying to predict the future. YAGNI+KISS
• Focus on deliver maximum value: focus on customer
needs and on tasks with the most impact on business
• Deliver quickly: release fast, ask frequently for
feedback and show real work in progress. Time To
Market
• Take decisions as later as possible: but for the few
ones to take try to do it consistent and flexible: open to
changes and refactor, for the rest just use emerging
design + SOLID
Lean Code
• Gojko Adzic - http://gojko.net/2011/05/26/sc2011-lean-code-
solution-in-awk/
• Chris Parsons - https://github.com/chrismdp/checkout-kata
• Javier Gamarra - https://github.com/nhpatt/Checkout
Solutions
Thank you!
"The quality of your software is inversely proportional to how
often you have to say no to your customer."
-- Uncle Bob Martin

Mais conteúdo relacionado

Mais procurados

Optimize NetSuite Order Management with OzLINK
Optimize NetSuite Order Management with OzLINKOptimize NetSuite Order Management with OzLINK
Optimize NetSuite Order Management with OzLINK
Oz Development
 
Optimize UPS WorldShip Pick Pack Ship
Optimize UPS WorldShip Pick Pack ShipOptimize UPS WorldShip Pick Pack Ship
Optimize UPS WorldShip Pick Pack Ship
Oz Development
 

Mais procurados (6)

2014 Equipment Training Schedule 3M-Combi
2014 Equipment Training Schedule   3M-Combi2014 Equipment Training Schedule   3M-Combi
2014 Equipment Training Schedule 3M-Combi
 
OzLINK Advanced Shipping for Acumatica
OzLINK Advanced Shipping for AcumaticaOzLINK Advanced Shipping for Acumatica
OzLINK Advanced Shipping for Acumatica
 
WCA eCommerce Workshop 4: Introduction to Amazon FBA
WCA eCommerce Workshop 4: Introduction to Amazon FBAWCA eCommerce Workshop 4: Introduction to Amazon FBA
WCA eCommerce Workshop 4: Introduction to Amazon FBA
 
Optimize NetSuite Order Management with OzLINK
Optimize NetSuite Order Management with OzLINKOptimize NetSuite Order Management with OzLINK
Optimize NetSuite Order Management with OzLINK
 
Automatically Sync Inventory Across Multiple eCommerce Channels With Bizelo
Automatically Sync Inventory Across Multiple eCommerce Channels With BizeloAutomatically Sync Inventory Across Multiple eCommerce Channels With Bizelo
Automatically Sync Inventory Across Multiple eCommerce Channels With Bizelo
 
Optimize UPS WorldShip Pick Pack Ship
Optimize UPS WorldShip Pick Pack ShipOptimize UPS WorldShip Pick Pack Ship
Optimize UPS WorldShip Pick Pack Ship
 

Semelhante a Lean code en

Make me a sandwich, Tienda
Make me a sandwich, TiendaMake me a sandwich, Tienda
Make me a sandwich, Tienda
polakluk
 
289158090_Classic_Pen_Company_Case__1_.pptx.pdf
289158090_Classic_Pen_Company_Case__1_.pptx.pdf289158090_Classic_Pen_Company_Case__1_.pptx.pdf
289158090_Classic_Pen_Company_Case__1_.pptx.pdf
luxasuhi
 
Metrics Suck...Converting the Warehouse from a Cost Center to a Profit Center
Metrics Suck...Converting the Warehouse from a Cost Center to a Profit CenterMetrics Suck...Converting the Warehouse from a Cost Center to a Profit Center
Metrics Suck...Converting the Warehouse from a Cost Center to a Profit Center
Integrated Systems Design - ISD
 

Semelhante a Lean code en (20)

Lean code kata en PHPMad
Lean code kata  en PHPMadLean code kata  en PHPMad
Lean code kata en PHPMad
 
Project six sigma
Project  six sigmaProject  six sigma
Project six sigma
 
Six sigma on burning brownie
Six sigma on burning brownieSix sigma on burning brownie
Six sigma on burning brownie
 
Prinecomi lectureppt ch08
Prinecomi lectureppt ch08Prinecomi lectureppt ch08
Prinecomi lectureppt ch08
 
Lean Supply Chain Management--by JULIAN KALAC
Lean Supply Chain Management--by JULIAN KALACLean Supply Chain Management--by JULIAN KALAC
Lean Supply Chain Management--by JULIAN KALAC
 
ROI for Warehouse Management System: The Business Case for a WMS
ROI for Warehouse Management System: The Business Case for a WMSROI for Warehouse Management System: The Business Case for a WMS
ROI for Warehouse Management System: The Business Case for a WMS
 
Error Proofing.ppt
Error Proofing.pptError Proofing.ppt
Error Proofing.ppt
 
Agile games
Agile gamesAgile games
Agile games
 
Comparison PulseCAP10 Fuel level sensor v.s other brand sensor
Comparison PulseCAP10 Fuel level sensor v.s other brand sensorComparison PulseCAP10 Fuel level sensor v.s other brand sensor
Comparison PulseCAP10 Fuel level sensor v.s other brand sensor
 
Usac 2018 -ilscm - scaan model
Usac   2018 -ilscm - scaan modelUsac   2018 -ilscm - scaan model
Usac 2018 -ilscm - scaan model
 
Sage Inventory Advisor for Sage 100
Sage Inventory Advisor for Sage 100Sage Inventory Advisor for Sage 100
Sage Inventory Advisor for Sage 100
 
Make me a sandwich, Tienda
Make me a sandwich, TiendaMake me a sandwich, Tienda
Make me a sandwich, Tienda
 
Lean Professional Deliverables - Week 3 of 6
Lean Professional Deliverables - Week 3 of 6Lean Professional Deliverables - Week 3 of 6
Lean Professional Deliverables - Week 3 of 6
 
289158090_Classic_Pen_Company_Case__1_.pptx.pdf
289158090_Classic_Pen_Company_Case__1_.pptx.pdf289158090_Classic_Pen_Company_Case__1_.pptx.pdf
289158090_Classic_Pen_Company_Case__1_.pptx.pdf
 
Metrics Suck...Converting the Warehouse from a Cost Center to a Profit Center
Metrics Suck...Converting the Warehouse from a Cost Center to a Profit CenterMetrics Suck...Converting the Warehouse from a Cost Center to a Profit Center
Metrics Suck...Converting the Warehouse from a Cost Center to a Profit Center
 
Line balancing
Line balancingLine balancing
Line balancing
 
Lean six sigma 3d
Lean six sigma 3dLean six sigma 3d
Lean six sigma 3d
 
NAPA Digital Vehicle Inspection Program
NAPA Digital Vehicle Inspection ProgramNAPA Digital Vehicle Inspection Program
NAPA Digital Vehicle Inspection Program
 
St presentation the complete cash management solution - new
St presentation   the complete cash management solution - newSt presentation   the complete cash management solution - new
St presentation the complete cash management solution - new
 
What Food Manufacturers Need to Know about Measuring OEE - London Consulting ...
What Food Manufacturers Need to Know about Measuring OEE - London Consulting ...What Food Manufacturers Need to Know about Measuring OEE - London Consulting ...
What Food Manufacturers Need to Know about Measuring OEE - London Consulting ...
 

Mais de Oriol del Barrio

Mais de Oriol del Barrio (7)

CAS2019 porque los developers recelan de agile
CAS2019 porque los developers recelan de agileCAS2019 porque los developers recelan de agile
CAS2019 porque los developers recelan de agile
 
Make agile fun again
Make agile fun againMake agile fun again
Make agile fun again
 
Make agile fun again
Make agile fun againMake agile fun again
Make agile fun again
 
Coding dojo - Kata The Cube
Coding dojo - Kata The CubeCoding dojo - Kata The Cube
Coding dojo - Kata The Cube
 
Diseño emergente
Diseño emergenteDiseño emergente
Diseño emergente
 
Coding dojo
Coding dojoCoding dojo
Coding dojo
 
Coding dojo
Coding dojoCoding dojo
Coding dojo
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

Lean code en

  • 2. Lean Code Objective: Acquiring and improve coding skills by Chris Parsons (@chrismdp) Javier Gamarra (@nhpatt) - http://nhpatt.com/slides/a%20LEAN-CODE%20experience/ #slide2
  • 3. Lean Code What is Lean? What is the Lean Software Development?
  • 4. Lean Code • Remove waste • Focus on deliver maximum value • Deliver quickly • Take decisions as later as possible
  • 5. Lean Code Apart of Lean code, have also in mind: • Code Quality • Product Quality • Testing • Automatisation
  • 7. Iteration 0 10 minutes to choose a pair and setup the development environment Write a terminal application, accepts an input and print the result in the screen
  • 9. Iteration 1 10 minutes to write an easy cash register Acceptance Test • 'apple' cost 1€, 'banana' cost 1.5€ and 'cherry' cost 0,75€ • we should accept this words for every input line (stdin) • Print de total in cents in the stdout every time • apple -> 100 • cherry -> 175 • cherry -> 250
  • 10. Iteration 2 10 minutes to add a discount Acceptance Test • Same inputs as before • After two cherries you will save 20 cents • apple -> 100 • cherry -> 175 • cherry -> 230
  • 11. Iteration 3 10 minutes to allow to read CSV format Acceptance Test • Accept values separed by commas • Same prices as Iteration 2 • apple, cherry, banana -> 325 • cherry, cherry -> 130
  • 12. Iteration 3a Stop! New urgent requirements. Same delivery date Acceptance Test • KWIK-E-MART shops have been notified to a delay in the CSV format feature • The input format is again one product per line • Cherries have a 30 cents discount • Bananas have the discount: 'buy two and one is free' • cherry -> 75 • cherry -> 120 • banana -> 270 • banana -> 270
  • 13. Iteration 4 10 minutes to add location Acceptance Test • KWIK-E-MART shops stills notified regarding the delay in the CSV format feature • Cherrys discount is again 20 cents • We should allow 'manzana' and 'apfel' for apples • cherry -> 75 • manzana -> 175 • cherry -> 230 • banana -> 380 • banana -> 380 • apple -> 480
  • 14. Iteration 5 10 minutes to add discounts by name Acceptance Test • CSV format feature should be delivered in the next sprint • 3 x manzana: we will discount 1€ • 2 x apfel: we will discount 0.5€ • apfel -> 100 • manzana -> 200 • manzana -> 300 • apple -> 400 • manzana -> 400 • apfel -> 450 • cherry -> 525 • cherry -> 580
  • 15. Iteration 5a 10 minutes to add descounts by name Acceptance Test • NEW CHANGE! • 3 x manzana: we will discount 1€ • 2 x apfel: we will discount 1€ • apfel -> 100 • manzana -> 200 • manzana -> 300 • apple -> 400 • manzana -> 400 • apfel -> 400 • cherry -> 475 • cherry -> 530 • banana -> 680
  • 16. Iteration 6 10 minutes to deliver CSV format and allow super-discounts Acceptance Test • Allow to use inline and CSV input format • 2 x apfel: we will discount 1.5€ • By 4 apples and save another euro • By 5 fruits and save 2 euros • apfel, manzana, manzana, apfel -> 250 • banana -> 200 • apfel, manzana, manzana, apple, apfel -> 150
  • 18. • Remove waste: just do what is requested not anymore trying to predict the future. YAGNI+KISS • Focus on deliver maximum value: focus on customer needs and on tasks with the most impact on business • Deliver quickly: release fast, ask frequently for feedback and show real work in progress. Time To Market • Take decisions as later as possible: but for the few ones to take try to do it consistent and flexible: open to changes and refactor, for the rest just use emerging design + SOLID Lean Code
  • 19. • Gojko Adzic - http://gojko.net/2011/05/26/sc2011-lean-code- solution-in-awk/ • Chris Parsons - https://github.com/chrismdp/checkout-kata • Javier Gamarra - https://github.com/nhpatt/Checkout Solutions
  • 21. "The quality of your software is inversely proportional to how often you have to say no to your customer." -- Uncle Bob Martin