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 - @m_munaretto
manuela.munaretto@xpeppers.com
XPeppers
MILAN 20/21.11.2015 - Manuela Munaretto
Leave your feedback on Joind.in!
https://m.joind.in/event/codemotion-milan-2015

More Related Content

Viewers also liked

Viewers also liked (9)

Fun %40 work
Fun %40 workFun %40 work
Fun %40 work
 
Kertech Inc Slide Show
Kertech Inc Slide ShowKertech Inc Slide Show
Kertech Inc Slide Show
 
Clientelismo y Desarrollo Social
Clientelismo y Desarrollo SocialClientelismo y Desarrollo Social
Clientelismo y Desarrollo Social
 
Material design
Material designMaterial design
Material design
 
GlennForSale
GlennForSaleGlennForSale
GlennForSale
 
VMware: Windows 7 y Windows Xp en un sola maquina virtual.
VMware: Windows 7 y Windows Xp en un sola maquina virtual. VMware: Windows 7 y Windows Xp en un sola maquina virtual.
VMware: Windows 7 y Windows Xp en un sola maquina virtual.
 
Challenges in the field of intercultural education; perspectives in theory an...
Challenges in the field of intercultural education; perspectives in theory an...Challenges in the field of intercultural education; perspectives in theory an...
Challenges in the field of intercultural education; perspectives in theory an...
 
tipos de distribuciones
tipos de distribuciones tipos de distribuciones
tipos de distribuciones
 
Piscinile Desjoyaux - o istorie de familie
Piscinile Desjoyaux - o istorie de familiePiscinile Desjoyaux - o istorie de familie
Piscinile Desjoyaux - o istorie de familie
 

More from Codemotion

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Codemotion
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyCodemotion
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaCodemotion
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserCodemotion
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Codemotion
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Codemotion
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Codemotion
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 - Codemotion
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Codemotion
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Codemotion
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Codemotion
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Codemotion
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Codemotion
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Codemotion
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Codemotion
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...Codemotion
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Codemotion
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Codemotion
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Codemotion
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Codemotion
 

More from Codemotion (20)

Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
 
Pompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending storyPompili - From hero to_zero: The FatalNoise neverending story
Pompili - From hero to_zero: The FatalNoise neverending story
 
Pastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storiaPastore - Commodore 65 - La storia
Pastore - Commodore 65 - La storia
 
Pennisi - Essere Richard Altwasser
Pennisi - Essere Richard AltwasserPennisi - Essere Richard Altwasser
Pennisi - Essere Richard Altwasser
 
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
 
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
 
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
 
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 - Francesco Baldassarri  - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
 
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
 
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
 
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
 
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
 
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
 
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
 
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
 
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
 
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
 
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
 
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
 
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
 

Recently uploaded

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Manuela Munaretto, Gabriele Lana, Filippo Liverani - Women super code lab – Improve your skills with TDD Pair Programming code session | Codemotion Milan 2015

  • 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 - @m_munaretto manuela.munaretto@xpeppers.com XPeppers
  • 33. MILAN 20/21.11.2015 - Manuela Munaretto Leave your feedback on Joind.in! https://m.joind.in/event/codemotion-milan-2015