Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
Development
Challenge
Lean Code Kata
Oriol del Barrio
Lean Code
Objective: Acquiring and improve coding skills
by Chris Parsons (@chrismdp)
Javier Gamarra (@nhpatt) - http://nh...
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 inp...
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' c...
Iteration 2
10 minutes to add a discount
Acceptance Test
• Same inputs as before
• After two cherries you
will save 20 cen...
Iteration 3
10 minutes to allow to read CSV format
Acceptance Test
• Accept values separed
by commas
• Same prices as
Iter...
Iteration 3a
Stop! New urgent requirements. Same delivery date
Acceptance Test
• KWIK-E-MART shops have been notified to a
...
Iteration 4
10 minutes to add location
Acceptance Test
• KWIK-E-MART shops stills notified regarding
the delay in the CSV f...
Iteration 5
10 minutes to add discounts by name
Acceptance Test
• CSV format feature should be
delivered in the next sprin...
Iteration 5a
10 minutes to add descounts by name
Acceptance Test
• NEW CHANGE!
• 3 x manzana: we will
discount 1€
• 2 x ap...
Iteration 6
10 minutes to deliver CSV format and allow super-discounts
Acceptance Test
• Allow to use inline and CSV input...
Conclusions
• Remove waste: just do what is requested not anymore
trying to predict the future. YAGNI+KISS
• Focus on deliver maximum ...
• Gojko Adzic - http://gojko.net/2011/05/26/sc2011-lean-code-
solution-in-awk/
• Chris Parsons - https://github.com/chrism...
Thank you!
"The quality of your software is inversely proportional to how
often you have to say no to your customer."
-- Uncle Bob Ma...
Próxima SlideShare
Cargando en…5
×

Lean code en

364 visualizaciones

Publicado el

Lean Code Kata

Publicado en: Tecnología
  • Sé el primero en comentar

Lean code en

  1. 1. Development Challenge Lean Code Kata Oriol del Barrio
  2. 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. 3. Lean Code What is Lean? What is the Lean Software Development?
  4. 4. Lean Code • Remove waste • Focus on deliver maximum value • Deliver quickly • Take decisions as later as possible
  5. 5. Lean Code Apart of Lean code, have also in mind: • Code Quality • Product Quality • Testing • Automatisation
  6. 6. Let's start!
  7. 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
  8. 8. Customer Presentation A supermarket called KWIK-E-MART
  9. 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. 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. 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. 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. 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. 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. 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. 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
  17. 17. Conclusions
  18. 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. 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
  20. 20. Thank you!
  21. 21. "The quality of your software is inversely proportional to how often you have to say no to your customer." -- Uncle Bob Martin

×