SlideShare a Scribd company logo
1 of 33
Download to read offline
MILAN 20/21.11.2015
Women super code lab: an amazing
opportunity for all the coders to improve
their programming skills in a safe and
thrilling environment.
Manuela Munaretto - XPeppers
MILAN 20/21.11.2015 - Manuela Munaretto
Agenda
25’: welcome and
introduction to the codelab
5’: Pair forming
35’: Session #1
10’: retrospective
35’: Session #2
60’: lunch break
10’: retrospective
5′: Pair forming
45’: Session #3
10’: retrospective
5’: break
35’: final retrospective +
Q&A
MILAN 20/21.11.2015 - Manuela Munaretto
Our tools
★ Prerequisites
★ TDD
★ 4 rules of simple design
★ Pair Programming
MILAN 20/21.11.2015 - Manuela Munaretto
MILAN 20/21.11.2015 - Manuela Munaretto
Prerequites: How
1. Prior knowledge of coding
2. Laptop
3. Development Environment
4. Test Libraries
MILAN 20/21.11.2015 - Manuela Munaretto
Prerequites: Why
★ Improve your skills
★ Intensive practice event
★ Away from the pressures
MILAN 20/21.11.2015 - Manuela Munaretto
MILAN 20/21.11.2015 - Manuela Munaretto
MILAN 20/21.11.2015 - Manuela Munaretto
MILAN 20/21.11.2015 - Manuela Munaretto
Test Driven Development: How
1. Add a little test
2. Run all tests and fail
3. Make a little change
4. Run the tests and succeed
5. Refactor to remove duplication
MILAN 20/21.11.2015 - Manuela Munaretto
Test Driven Development: Why
★ What needs to be done
★ Requirements are nailed down
★ Immediate feedback
★ System design
★ Only the features you wanted
MILAN 20/21.11.2015 - Manuela Munaretto
MILAN 20/21.11.2015 - Manuela Munaretto
4 rules of simple design: How
1. Passes all the tests
2. Expresses every idea that we need to express
3. Contains no duplication
4. Minimal method, classes and modules
MILAN 20/21.11.2015 - Manuela Munaretto
4 rules of simple design: Why
★ High cohesion and loose coupling
★ Compact
★ Modular code
★ Expressing all the important ideas of the system
MILAN 20/21.11.2015 - Manuela Munaretto
MILAN 20/21.11.2015 - Manuela Munaretto
Pair Programming: How
1. Sit side by side in front of the monitor
2. Switch roles often
3. Switch pair daily
4. Appropriate workspace layout
5. Take a break from working together
6. Pair programming is chatting
MILAN 20/21.11.2015 - Manuela Munaretto
Pair Programming: Why
★ It’s funny
★ Less frustration
★ More focused
★ Less bugs
★ Higher quality fighting poor practices
★ Continuous code review
★ Collective code ownership
MILAN 20/21.11.2015 - Manuela Munaretto
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: a kata
Kata is often described as a set sequence of karate
moves organized into a pre-arranged fight against
imaginary opponents.
A system of individual training exercises in karate and
other martial arts.
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Why
The following is a TDD Kata- an exercise in coding,
refactoring and test-first, that you should apply daily.
Try not to read ahead.
Do one task at a time. The trick is to learn to work
incrementally.
Make sure you only test for correct inputs. There is no
need to test for invalid inputs for this kata
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 1
Create a simple String calculator with a method int Add
(string numbers)
1. 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”
2. Start with the simplest test case of an empty string and
move to one and two numbers
3. Remember to solve things as simply as possible so
that you force yourself to write tests you did not think
about
4. Remember to refactor after each passing test
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 2
Allow the Add method to handle an unknown amount of
numbers
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 3
Allow the Add method to handle new lines between
numbers (instead of commas).
1. the following input is ok: “1n2,3” (will equal 6)
2. the following input is NOT ok: “1,n” (not need to
prove it - just clarifying)
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 4
Support different delimiters
1. to change a delimiter, the beginning of the string will
contain a separate line that looks like this: “//
[delimiter]n[numbers…]” for example “//;n1;2” should
return 3 where the default delimiter is ‘;’ .
2. the first line is optional. All existing scenarios should
still be supported
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 5
Calling Add with a negative number will throw an
exception “negatives not allowed” - and the negative that
was passed.
If there are multiple negatives, show all of them in the
exception message
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 6
Numbers bigger than 1000 should be ignored,
so adding 2 + 1001 = 2
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 7
Delimiters can be of any length with the following format:
“//[delimiter]n”
for example:
“//[***]n1***2***3”
should return 6
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 8
Allow multiple delimiters like this:
“//[delim1][delim2]n”
for example
“//[*][%]n1*2%3”
should return 6
MILAN 20/21.11.2015 - Manuela Munaretto
String Calculator: Step 9
Make sure you can also handle multiple delimiters with
length longer than one char
MILAN 20/21.11.2015 - Manuela Munaretto
Resources
Extreme Programming: A gentle introduction
http://www.extremeprogramming.org/
Test-Driven Development: By Example - Kent Beck
http://www.amazon.
it/dp/0321146530/ref=cm_sw_r_tw_dp_5rgrwb1F002NJ
Cunningham & Cunningham, Inc.
http://c2.com/
MILAN 20/21.11.2015 - Manuela Munaretto
Resources
String Calculator
http://osherove.com/tdd-kata-1/
MILAN 20/21.11.2015 - Manuela Munaretto
Leave your feedback on Joind.in!
https://m.joind.in/event/codemotion-milan-2015
MILAN 20/21.11.2015
Manuela Munaretto - @m_munaretto
manuela.munaretto@xpeppers.com
XPeppers

More Related Content

Recently uploaded

introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
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
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
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
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
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
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

Women super code lab

  • 1. MILAN 20/21.11.2015 Women super code lab: an amazing opportunity for all the coders to improve their programming skills in a safe and thrilling environment. Manuela Munaretto - XPeppers
  • 2. MILAN 20/21.11.2015 - Manuela Munaretto Agenda 25’: welcome and introduction to the codelab 5’: Pair forming 35’: Session #1 10’: retrospective 35’: Session #2 60’: lunch break 10’: retrospective 5′: Pair forming 45’: Session #3 10’: retrospective 5’: break 35’: final retrospective + Q&A
  • 3. MILAN 20/21.11.2015 - Manuela Munaretto Our tools ★ Prerequisites ★ TDD ★ 4 rules of simple design ★ Pair Programming
  • 4. MILAN 20/21.11.2015 - Manuela Munaretto
  • 5. MILAN 20/21.11.2015 - Manuela Munaretto Prerequites: How 1. Prior knowledge of coding 2. Laptop 3. Development Environment 4. Test Libraries
  • 6. MILAN 20/21.11.2015 - Manuela Munaretto Prerequites: Why ★ Improve your skills ★ Intensive practice event ★ Away from the pressures
  • 7. MILAN 20/21.11.2015 - Manuela Munaretto
  • 8. MILAN 20/21.11.2015 - Manuela Munaretto
  • 9. MILAN 20/21.11.2015 - Manuela Munaretto
  • 10. MILAN 20/21.11.2015 - Manuela Munaretto Test Driven Development: How 1. Add a little test 2. Run all tests and fail 3. Make a little change 4. Run the tests and succeed 5. Refactor to remove duplication
  • 11. MILAN 20/21.11.2015 - Manuela Munaretto Test Driven Development: Why ★ What needs to be done ★ Requirements are nailed down ★ Immediate feedback ★ System design ★ Only the features you wanted
  • 12. MILAN 20/21.11.2015 - Manuela Munaretto
  • 13. MILAN 20/21.11.2015 - Manuela Munaretto 4 rules of simple design: How 1. Passes all the tests 2. Expresses every idea that we need to express 3. Contains no duplication 4. Minimal method, classes and modules
  • 14. MILAN 20/21.11.2015 - Manuela Munaretto 4 rules of simple design: Why ★ High cohesion and loose coupling ★ Compact ★ Modular code ★ Expressing all the important ideas of the system
  • 15. MILAN 20/21.11.2015 - Manuela Munaretto
  • 16. MILAN 20/21.11.2015 - Manuela Munaretto Pair Programming: How 1. Sit side by side in front of the monitor 2. Switch roles often 3. Switch pair daily 4. Appropriate workspace layout 5. Take a break from working together 6. Pair programming is chatting
  • 17. MILAN 20/21.11.2015 - Manuela Munaretto Pair Programming: Why ★ It’s funny ★ Less frustration ★ More focused ★ Less bugs ★ Higher quality fighting poor practices ★ Continuous code review ★ Collective code ownership
  • 18. MILAN 20/21.11.2015 - Manuela Munaretto
  • 19. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: a kata Kata is often described as a set sequence of karate moves organized into a pre-arranged fight against imaginary opponents. A system of individual training exercises in karate and other martial arts.
  • 20. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Why The following is a TDD Kata- an exercise in coding, refactoring and test-first, that you should apply daily. Try not to read ahead. Do one task at a time. The trick is to learn to work incrementally. Make sure you only test for correct inputs. There is no need to test for invalid inputs for this kata
  • 21. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 1 Create a simple String calculator with a method int Add (string numbers) 1. 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” 2. Start with the simplest test case of an empty string and move to one and two numbers 3. Remember to solve things as simply as possible so that you force yourself to write tests you did not think about 4. Remember to refactor after each passing test
  • 22. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 2 Allow the Add method to handle an unknown amount of numbers
  • 23. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 3 Allow the Add method to handle new lines between numbers (instead of commas). 1. the following input is ok: “1n2,3” (will equal 6) 2. the following input is NOT ok: “1,n” (not need to prove it - just clarifying)
  • 24. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 4 Support different delimiters 1. to change a delimiter, the beginning of the string will contain a separate line that looks like this: “// [delimiter]n[numbers…]” for example “//;n1;2” should return 3 where the default delimiter is ‘;’ . 2. the first line is optional. All existing scenarios should still be supported
  • 25. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 5 Calling Add with a negative number will throw an exception “negatives not allowed” - and the negative that was passed. If there are multiple negatives, show all of them in the exception message
  • 26. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 6 Numbers bigger than 1000 should be ignored, so adding 2 + 1001 = 2
  • 27. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 7 Delimiters can be of any length with the following format: “//[delimiter]n” for example: “//[***]n1***2***3” should return 6
  • 28. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 8 Allow multiple delimiters like this: “//[delim1][delim2]n” for example “//[*][%]n1*2%3” should return 6
  • 29. MILAN 20/21.11.2015 - Manuela Munaretto String Calculator: Step 9 Make sure you can also handle multiple delimiters with length longer than one char
  • 30. MILAN 20/21.11.2015 - Manuela Munaretto Resources Extreme Programming: A gentle introduction http://www.extremeprogramming.org/ Test-Driven Development: By Example - Kent Beck http://www.amazon. it/dp/0321146530/ref=cm_sw_r_tw_dp_5rgrwb1F002NJ Cunningham & Cunningham, Inc. http://c2.com/
  • 31. MILAN 20/21.11.2015 - Manuela Munaretto Resources String Calculator http://osherove.com/tdd-kata-1/
  • 32. MILAN 20/21.11.2015 - Manuela Munaretto Leave your feedback on Joind.in! https://m.joind.in/event/codemotion-milan-2015
  • 33. MILAN 20/21.11.2015 Manuela Munaretto - @m_munaretto manuela.munaretto@xpeppers.com XPeppers