SlideShare a Scribd company logo
1 of 10
Download to read offline
Software
Craftsmanship
Alicante
Software
Craftsmanship
Alicante
Who we are
What we like
Why do we care?
You are a software developer
You like agile, programming
Make community. Join us!
Software
Craftsmanship
Alicante
Meetup http://meetup.com/Software-Craftsmanship-Alicante/
Twitter @AlicanteSwCraft
Slack http://softwarecraftsmanship.slack.com/messages/alicante/
Slides http://slideshare.net/AlicanteSwCraft
Github https://github.com/alicanteswcraft
Enrique Barbeito García
@enriquebarbeito
Kata String Calculator
Practicing TDD
Software
Craftsmanship
Alicante
@enriquebarbeito
Test-Driven Development in a nutshell
Software Craftsmanship Alicante
Test-Driven Development in a nutshell (1/2)
Code Katas
Kata String Calculator
Show me the code
Key concepts
❏ XP practice stated in 2003.
❏ TDD = TFD + Refactoring
❏ TDD != testing, so it is most about software design
❏ Does not replace architecture or design
❏ It is also a development process with a repetitive cycle.
Repeat with me: red-green-refactor! All-Code-Is-Guilty.jpg
@enriquebarbeito
Test-Driven Development in a nutshell
Software Craftsmanship Alicante
Test-Driven Development in a nutshell (2/2)
Code Katas
Kata String Calculator
Show me the code
Key rules when doing TDD
❏ Ensure isolated specs
❏ Arrange. Act. Assert
❏ One verification per test/spec
❏ Write only one spec at a time
❏ Do not lose the green during a refactor step
❏ No debugging (neither output logging) TDD cycle
@enriquebarbeito
Code Katas
Software Craftsmanship Alicante
Test-Driven Development in a nutshell
Code Katas
Kata String Calculator
Show me the code
❏ Code exercise which helps you to hone your skills
through practice and repetition
❏ Simple problem, easy to practice, every day
❏ Experiment with solutions
❏ Focus on
❏ the process of writing the code
❏ naming test cases
❏ the red-green-refactor cyclekata.gif
@enriquebarbeito
Kata String Calculator
Software Craftsmanship Alicante
Test-Driven Development in a nutshell
Code Katas
Kata String Calculator
Show me the code
int Add(string numbers)
❏ The method can take 0, 1 or 2 numbers, and will return their sum (for an empty
string it will return 0) for example "" or "1" or "1,2"
❏ Allow the Add method to handle an unknown amount of numbers
❏ Allow the Add method to handle new lines between numbers (instead of commas).
❏ Support different delimiters.
❏ Calling Add with a negative number will throw an exception.
@enriquebarbeito
Show me the code
Software Craftsmanship Alicante
Test-Driven Development in a nutshell
Code Katas
Kata String Calculator
Show me the code
Demo
Enrique Barbeito García
@enriquebarbeito
FIN. Thanks!
Questions?
@AlicanteSwCraft
Please, follow!
Please, Join us!

More Related Content

Similar to Kata String Calculator

Big code refactoring with agility
Big code refactoring with agilityBig code refactoring with agility
Big code refactoring with agilityLuca Merolla
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at JetC4Media
 
London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010Skills Matter
 
Tales of modernizing trello's web stack
Tales of modernizing trello's web stackTales of modernizing trello's web stack
Tales of modernizing trello's web stackVincent Kok
 
Data structures Lecture no. 4
Data structures Lecture no. 4Data structures Lecture no. 4
Data structures Lecture no. 4AzharIqbal710687
 
TDC 2020 - Implementing a Mini-Language
TDC 2020 - Implementing a Mini-LanguageTDC 2020 - Implementing a Mini-Language
TDC 2020 - Implementing a Mini-LanguageLuciano Sabença
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!mold
 
Contest Tips and Tricks
Contest Tips and TricksContest Tips and Tricks
Contest Tips and Tricksmbuzdalov
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review ProcessDr. Syed Hassan Amin
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfMMRF2
 
Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Peter Gfader
 
How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality codeHayden Bleasel
 
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...apidays
 
Using F# to change the way we work
Using F# to change the way we workUsing F# to change the way we work
Using F# to change the way we workJon Harrop
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)Puneet narula
 

Similar to Kata String Calculator (20)

Big code refactoring with agility
Big code refactoring with agilityBig code refactoring with agility
Big code refactoring with agility
 
Microservices Chaos Testing at Jet
Microservices Chaos Testing at JetMicroservices Chaos Testing at Jet
Microservices Chaos Testing at Jet
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010London F-Sharp User Group : Don Syme on F# - 09/09/2010
London F-Sharp User Group : Don Syme on F# - 09/09/2010
 
Tales of modernizing trello's web stack
Tales of modernizing trello's web stackTales of modernizing trello's web stack
Tales of modernizing trello's web stack
 
Data structures Lecture no. 4
Data structures Lecture no. 4Data structures Lecture no. 4
Data structures Lecture no. 4
 
TDC 2020 - Implementing a Mini-Language
TDC 2020 - Implementing a Mini-LanguageTDC 2020 - Implementing a Mini-Language
TDC 2020 - Implementing a Mini-Language
 
scratch-3-tutorial.pdf
scratch-3-tutorial.pdfscratch-3-tutorial.pdf
scratch-3-tutorial.pdf
 
Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!Catalyst - refactor large apps with it and have fun!
Catalyst - refactor large apps with it and have fun!
 
Contest Tips and Tricks
Contest Tips and TricksContest Tips and Tricks
Contest Tips and Tricks
 
Improving Code Quality Through Effective Review Process
Improving Code Quality Through Effective  Review ProcessImproving Code Quality Through Effective  Review Process
Improving Code Quality Through Effective Review Process
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity Achieving Technical Excellence in Your Software Teams - from Devternity
Achieving Technical Excellence in Your Software Teams - from Devternity
 
Week 1
Week 1Week 1
Week 1
 
How to write good quality code
How to write good quality codeHow to write good quality code
How to write good quality code
 
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...APIdays Paris 2019 - Maintain & Evolve a Public  GraphQL API by Aurélien Davi...
APIdays Paris 2019 - Maintain & Evolve a Public GraphQL API by Aurélien Davi...
 
Algorithm.pdf
Algorithm.pdfAlgorithm.pdf
Algorithm.pdf
 
Using F# to change the way we work
Using F# to change the way we workUsing F# to change the way we work
Using F# to change the way we work
 
Tech talks#6: Code Refactoring
Tech talks#6: Code RefactoringTech talks#6: Code Refactoring
Tech talks#6: Code Refactoring
 
Csc 130 class 2 problem analysis and flow charts(2)
Csc 130 class 2   problem analysis and flow charts(2)Csc 130 class 2   problem analysis and flow charts(2)
Csc 130 class 2 problem analysis and flow charts(2)
 

Recently uploaded

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Recently uploaded (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

Kata String Calculator

  • 2. Software Craftsmanship Alicante Who we are What we like Why do we care? You are a software developer You like agile, programming Make community. Join us!
  • 3. Software Craftsmanship Alicante Meetup http://meetup.com/Software-Craftsmanship-Alicante/ Twitter @AlicanteSwCraft Slack http://softwarecraftsmanship.slack.com/messages/alicante/ Slides http://slideshare.net/AlicanteSwCraft Github https://github.com/alicanteswcraft
  • 4. Enrique Barbeito García @enriquebarbeito Kata String Calculator Practicing TDD Software Craftsmanship Alicante
  • 5. @enriquebarbeito Test-Driven Development in a nutshell Software Craftsmanship Alicante Test-Driven Development in a nutshell (1/2) Code Katas Kata String Calculator Show me the code Key concepts ❏ XP practice stated in 2003. ❏ TDD = TFD + Refactoring ❏ TDD != testing, so it is most about software design ❏ Does not replace architecture or design ❏ It is also a development process with a repetitive cycle. Repeat with me: red-green-refactor! All-Code-Is-Guilty.jpg
  • 6. @enriquebarbeito Test-Driven Development in a nutshell Software Craftsmanship Alicante Test-Driven Development in a nutshell (2/2) Code Katas Kata String Calculator Show me the code Key rules when doing TDD ❏ Ensure isolated specs ❏ Arrange. Act. Assert ❏ One verification per test/spec ❏ Write only one spec at a time ❏ Do not lose the green during a refactor step ❏ No debugging (neither output logging) TDD cycle
  • 7. @enriquebarbeito Code Katas Software Craftsmanship Alicante Test-Driven Development in a nutshell Code Katas Kata String Calculator Show me the code ❏ Code exercise which helps you to hone your skills through practice and repetition ❏ Simple problem, easy to practice, every day ❏ Experiment with solutions ❏ Focus on ❏ the process of writing the code ❏ naming test cases ❏ the red-green-refactor cyclekata.gif
  • 8. @enriquebarbeito Kata String Calculator Software Craftsmanship Alicante Test-Driven Development in a nutshell Code Katas Kata String Calculator Show me the code int Add(string numbers) ❏ The method can take 0, 1 or 2 numbers, and will return their sum (for an empty string it will return 0) for example "" or "1" or "1,2" ❏ Allow the Add method to handle an unknown amount of numbers ❏ Allow the Add method to handle new lines between numbers (instead of commas). ❏ Support different delimiters. ❏ Calling Add with a negative number will throw an exception.
  • 9. @enriquebarbeito Show me the code Software Craftsmanship Alicante Test-Driven Development in a nutshell Code Katas Kata String Calculator Show me the code Demo
  • 10. Enrique Barbeito García @enriquebarbeito FIN. Thanks! Questions? @AlicanteSwCraft Please, follow! Please, Join us!