SlideShare uma empresa Scribd logo
1 de 26
Lean code
What is Lean?
Lean software
development
Eliminate Waste
Focus on Value
Deliver Fast
Decide Late
Can code be lean?
Introducing
the customer
Fresco plc
Iteration 0
10 minutes to choose a pair, and set up your
dev environment

We are writing a command line tool: accept
stdin, write stdout.

If you need a quick environment in Ruby:

$ git clone git://github.com/chrismdp/checkout-kata.git
$ git checkout lean_code_start
$ bin/checkout
Iteration 1
10 minutes to write a simple checkout scanner
• Apples cost £1, Bananas cost £1.50, Cherries cost £0.75
• Accept each of these words one per line on stdin
• Print the cart total in pence on stdout each time.
• Questions?
Acceptance Test:

• Apples => 100
• Cherries => 175
• Cherries => 250
Iteration 2
10 minutes to add a discount:
• Same input and output as before
• Two lots of Cherries get 20p off.
Acceptance test:
• Apples => 100
• Cherries => 175
• Cherries => 230
Iteration 3
10 minutes to add CSV format:

• Now need to accept the values as comma seperated
• Same prices as Iteration 2
Acceptance test:
• Apples, Cherries, Bananas => 325
• Cherries, Cherries => 130
Iteration 3a
No! Urgent requirement from business! Deadline the same.

• Fresco suppliers notified delay of new API requiring CSV
• Now input back to one per line
• Cherries have now got 30p discount
• Bananas are now Buy One Get One Free
Acceptance test:
• Cherries => 75
• Cherries => 120
• Bananas => 270
• Bananas => 270
Iteration 4
10 minutes to support localisation:
• Fresco suppliers still behind on CSV change
• Cherries are now back to 20p discount
• Should also support the words “Pommes” and “Mele” for
apples.

Acceptance test:
• Cherries => 75
• Pommes => 175
• Cherries => 230
• Bananas => 380
• Bananas => 380
• Apples => 480
Iteration 5
10 minutes to support seperate discounts for different names:
• Be advised CSV change is coming next iteration
• 3 x Pommes is discounted to £2
• 2 x Mela is discounted to £1.50
Acceptance test:
• Mele => 100
• Pommes => 200
• Pommes => 300
• Apples => 400
• Pommes => 400
• Mele => 450
• Cherries => 525
• Cherries => 580
Iteration 5a
10 minutes to support seperate discounts for different names:
• NEW TILLS DEPLOYED YOUR CODE IS BROKEN!
• 3 x Pommes is discounted to £2
• 2 x Mela is discounted to £1
Acceptance test:
• Mele, Pommes, Pommes, Apples, Pommes, Mele, Cherries,
Cherries, Bananas => 680
Iteration 6
10 minutes to work around supplier bug and apply super-
discount:
• Supplier bug: support entry of both CR seperated and CSV
• 2 x Mele is discounted to £1.50
• Buy 4 apples and get another £1 off the bill.
• Buy 5 pieces of Fruit a get a further £2 off the bill.
Acceptance test:
• Mele, Pommes, Pommes, Mele => 250
• Bananas => 200
Acceptance test:
• Mele, Pommes, Pommes, Apples, Mele => 150
Conclusions
Eliminate Waste
Focus on Value
Deliver Fast
Decide Late
“The quality of your software is inversely
proportional to how often you have to say no
             to your customer.”

                         -- Uncle Bob Martin
git clone git://github.com/chrismdp/checkout-kata.git
git checkout lean_code

Mais conteúdo relacionado

Mais procurados

Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldSimon Haslam
 
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법Young D
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConJérôme Petazzoni
 
APIを活用したANA版Society5.0への挑戦
APIを活用したANA版Society5.0への挑戦APIを活用したANA版Society5.0への挑戦
APIを活用したANA版Society5.0への挑戦API Meetup
 
DevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - PrometheusDevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - PrometheusAdam Chen
 
Beginner for install DOSBox-X and PC-98 emulation. 初めてのDOSBox-XインストールとPC-98エ...
Beginner for install DOSBox-X and PC-98 emulation.  初めてのDOSBox-XインストールとPC-98エ...Beginner for install DOSBox-X and PC-98 emulation.  初めてのDOSBox-XインストールとPC-98エ...
Beginner for install DOSBox-X and PC-98 emulation. 初めてのDOSBox-XインストールとPC-98エ...Netwalker lab kapper
 
High Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIOHigh Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIORebekah Rodriguez
 
OSvの概要と実装
OSvの概要と実装OSvの概要と実装
OSvの概要と実装Takuya ASADA
 
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018Netgate
 
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...Raphaël PINSON
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThomas Graf
 
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...Edureka!
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building ToolsAkihiro Suda
 
[오픈소스컨설팅] ARM & OpenStack Community
[오픈소스컨설팅] ARM & OpenStack Community[오픈소스컨설팅] ARM & OpenStack Community
[오픈소스컨설팅] ARM & OpenStack CommunityOpen Source Consulting
 
Go or No-Go: Operability and Contingency Planning at Etsy.com
Go or No-Go: Operability and Contingency Planning at Etsy.comGo or No-Go: Operability and Contingency Planning at Etsy.com
Go or No-Go: Operability and Contingency Planning at Etsy.comJohn Allspaw
 
Git for Excel
Git for ExcelGit for Excel
Git for Excelxlwings
 

Mais procurados (20)

Platform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle WorldPlatform Engineering for the Modern Oracle World
Platform Engineering for the Modern Oracle World
 
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
HAProxy TCP 모드에서 내부 서버로 Source IP 전달 방법
 
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxConAnatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
Anatomy of a Container: Namespaces, cgroups & Some Filesystem Magic - LinuxCon
 
50.000 orange stickies later
50.000 orange stickies later50.000 orange stickies later
50.000 orange stickies later
 
Git vs svn
Git vs svnGit vs svn
Git vs svn
 
APIを活用したANA版Society5.0への挑戦
APIを活用したANA版Society5.0への挑戦APIを活用したANA版Society5.0への挑戦
APIを活用したANA版Society5.0への挑戦
 
DevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - PrometheusDevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
DevOps Taiwan Monitor Tools 大亂鬥 - Prometheus
 
Beginner for install DOSBox-X and PC-98 emulation. 初めてのDOSBox-XインストールとPC-98エ...
Beginner for install DOSBox-X and PC-98 emulation.  初めてのDOSBox-XインストールとPC-98エ...Beginner for install DOSBox-X and PC-98 emulation.  初めてのDOSBox-XインストールとPC-98エ...
Beginner for install DOSBox-X and PC-98 emulation. 初めてのDOSBox-XインストールとPC-98エ...
 
High Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIOHigh Performance Object Storage in 30 Minutes with Supermicro and MinIO
High Performance Object Storage in 30 Minutes with Supermicro and MinIO
 
OSvの概要と実装
OSvの概要と実装OSvの概要と実装
OSvの概要と実装
 
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
Monitoring pfSense 2.4 with SNMP - pfSense Hangout March 2018
 
Nmapの真実(続)
Nmapの真実(続)Nmapの真実(続)
Nmapの真実(続)
 
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
Cfgmgmtcamp 2024 — eBPF-based Security Observability & Runtime Enforcement wi...
 
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RCThe Next Generation Firewall for Red Hat Enterprise Linux 7 RC
The Next Generation Firewall for Red Hat Enterprise Linux 7 RC
 
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...
Nagios Monitoring Tool Tutorial | Server Monitoring with Nagios | DevOps Trai...
 
Comparing Next-Generation Container Image Building Tools
 Comparing Next-Generation Container Image Building Tools Comparing Next-Generation Container Image Building Tools
Comparing Next-Generation Container Image Building Tools
 
[오픈소스컨설팅] ARM & OpenStack Community
[오픈소스컨설팅] ARM & OpenStack Community[오픈소스컨설팅] ARM & OpenStack Community
[오픈소스컨설팅] ARM & OpenStack Community
 
Go or No-Go: Operability and Contingency Planning at Etsy.com
Go or No-Go: Operability and Contingency Planning at Etsy.comGo or No-Go: Operability and Contingency Planning at Etsy.com
Go or No-Go: Operability and Contingency Planning at Etsy.com
 
Git for Excel
Git for ExcelGit for Excel
Git for Excel
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 

Semelhante a Lean code

Lean code kata en PHPMad
Lean code kata  en PHPMadLean code kata  en PHPMad
Lean code kata en PHPMadCodium
 
New e-Discovery Reference Model Pricing
New e-Discovery Reference Model PricingNew e-Discovery Reference Model Pricing
New e-Discovery Reference Model PricingRon Romero
 
Kristin’s Cookie Company Production process and analysis case study
Kristin’s Cookie Company Production process and analysis case studyKristin’s Cookie Company Production process and analysis case study
Kristin’s Cookie Company Production process and analysis case studyArfan Afzal
 
Project six sigma
Project  six sigmaProject  six sigma
Project six sigmaUrooj Iqbal
 
Six sigma on burning brownie
Six sigma on burning brownieSix sigma on burning brownie
Six sigma on burning brownieYamna Rashid
 
Toi uu hoa he thong 30 trieu nguoi dung
Toi uu hoa he thong 30 trieu nguoi dungToi uu hoa he thong 30 trieu nguoi dung
Toi uu hoa he thong 30 trieu nguoi dungIT Expert Club
 
7 email marketing programs to automate silverpop dma14
7 email marketing programs to automate silverpop dma147 email marketing programs to automate silverpop dma14
7 email marketing programs to automate silverpop dma14Silverpop
 
Cmt pos solution presentation
Cmt pos solution presentationCmt pos solution presentation
Cmt pos solution presentationCMT SOLUTION
 
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 KALACJulian Kalac P.Eng
 
App Store Subscriptions - Condensed Edition
App Store Subscriptions - Condensed EditionApp Store Subscriptions - Condensed Edition
App Store Subscriptions - Condensed EditionMark Pavlidis
 

Semelhante a Lean code (16)

Lean code en
Lean code   enLean code   en
Lean code en
 
Lean code kata en PHPMad
Lean code kata  en PHPMadLean code kata  en PHPMad
Lean code kata en PHPMad
 
C2 c finalpresentation
C2 c finalpresentationC2 c finalpresentation
C2 c finalpresentation
 
New e-Discovery Reference Model Pricing
New e-Discovery Reference Model PricingNew e-Discovery Reference Model Pricing
New e-Discovery Reference Model Pricing
 
Kristin’s Cookie Company Production process and analysis case study
Kristin’s Cookie Company Production process and analysis case studyKristin’s Cookie Company Production process and analysis case study
Kristin’s Cookie Company Production process and analysis case study
 
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
 
Proposal Presentation
Proposal PresentationProposal Presentation
Proposal Presentation
 
Toi uu hoa he thong 30 trieu nguoi dung
Toi uu hoa he thong 30 trieu nguoi dungToi uu hoa he thong 30 trieu nguoi dung
Toi uu hoa he thong 30 trieu nguoi dung
 
7 email marketing programs to automate silverpop dma14
7 email marketing programs to automate silverpop dma147 email marketing programs to automate silverpop dma14
7 email marketing programs to automate silverpop dma14
 
Pricing strategies 2017 nz
Pricing strategies 2017 nzPricing strategies 2017 nz
Pricing strategies 2017 nz
 
Hidden Grounds Proposal
Hidden Grounds ProposalHidden Grounds Proposal
Hidden Grounds Proposal
 
Cmt pos solution presentation
Cmt pos solution presentationCmt pos solution presentation
Cmt pos solution presentation
 
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
 
App Store Subscriptions - Condensed Edition
App Store Subscriptions - Condensed EditionApp Store Subscriptions - Condensed Edition
App Store Subscriptions - Condensed Edition
 
Apriori algorithm
Apriori algorithmApriori algorithm
Apriori algorithm
 

Último

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Lean code

  • 8. Can code be lean?
  • 11. Iteration 0 10 minutes to choose a pair, and set up your dev environment We are writing a command line tool: accept stdin, write stdout. If you need a quick environment in Ruby: $ git clone git://github.com/chrismdp/checkout-kata.git $ git checkout lean_code_start $ bin/checkout
  • 12. Iteration 1 10 minutes to write a simple checkout scanner • Apples cost £1, Bananas cost £1.50, Cherries cost £0.75 • Accept each of these words one per line on stdin • Print the cart total in pence on stdout each time. • Questions? Acceptance Test: • Apples => 100 • Cherries => 175 • Cherries => 250
  • 13. Iteration 2 10 minutes to add a discount: • Same input and output as before • Two lots of Cherries get 20p off. Acceptance test: • Apples => 100 • Cherries => 175 • Cherries => 230
  • 14. Iteration 3 10 minutes to add CSV format: • Now need to accept the values as comma seperated • Same prices as Iteration 2 Acceptance test: • Apples, Cherries, Bananas => 325 • Cherries, Cherries => 130
  • 15. Iteration 3a No! Urgent requirement from business! Deadline the same. • Fresco suppliers notified delay of new API requiring CSV • Now input back to one per line • Cherries have now got 30p discount • Bananas are now Buy One Get One Free Acceptance test: • Cherries => 75 • Cherries => 120 • Bananas => 270 • Bananas => 270
  • 16. Iteration 4 10 minutes to support localisation: • Fresco suppliers still behind on CSV change • Cherries are now back to 20p discount • Should also support the words “Pommes” and “Mele” for apples. Acceptance test: • Cherries => 75 • Pommes => 175 • Cherries => 230 • Bananas => 380 • Bananas => 380 • Apples => 480
  • 17. Iteration 5 10 minutes to support seperate discounts for different names: • Be advised CSV change is coming next iteration • 3 x Pommes is discounted to £2 • 2 x Mela is discounted to £1.50 Acceptance test: • Mele => 100 • Pommes => 200 • Pommes => 300 • Apples => 400 • Pommes => 400 • Mele => 450 • Cherries => 525 • Cherries => 580
  • 18. Iteration 5a 10 minutes to support seperate discounts for different names: • NEW TILLS DEPLOYED YOUR CODE IS BROKEN! • 3 x Pommes is discounted to £2 • 2 x Mela is discounted to £1 Acceptance test: • Mele, Pommes, Pommes, Apples, Pommes, Mele, Cherries, Cherries, Bananas => 680
  • 19. Iteration 6 10 minutes to work around supplier bug and apply super- discount: • Supplier bug: support entry of both CR seperated and CSV • 2 x Mele is discounted to £1.50 • Buy 4 apples and get another £1 off the bill. • Buy 5 pieces of Fruit a get a further £2 off the bill. Acceptance test: • Mele, Pommes, Pommes, Mele => 250 • Bananas => 200 Acceptance test: • Mele, Pommes, Pommes, Apples, Mele => 150
  • 25. “The quality of your software is inversely proportional to how often you have to say no to your customer.” -- Uncle Bob Martin