SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
TDD in Python

PyDayBo
Facoltà di Ingegneria
Università di Bologna
18 marzo 2010

Roberto Bettazzoni
roberto@bettazzoni.it
Test Driven Development

Agile practice
Prerequisites
●

Code refactoring

●

Incremental design

●

Test First Programming

●

Unit Test
Code Refactoring

“In software engineering, ‘refactoring’ source code
means improving it without changing its overall
results.”
Wikipedia: refactoring
Incremental Design

“Invest in the design of the system every day.”
Kent Beck, Extreme Programming Explained 2nd Ed. 2004
Test First Programming

“Write a failing automated test before changing any
code.”
Kent Beck, Extreme Programming Explained 2 nd Ed. 2004
Unit Test

White box test at code level
Test-Driven Development

Test First Programming
+ Code Refactoring
+ Incremental design
+ very short iterations (minutes)
The T.D.D. process
Add a test
Run tests
see new failure

Refactor

Write some code

Run tests
see all pass
DEMO
The legacy

expenses.py
Python script used by the employees when they
are abroad to collect the expenses
Expenses.py examples
> expenses.py reset
> expenses.py list
> expenses.py put lunch 28.00
> expenses.py put gasoline 50
> expenses.py put lunch 23.50
> expenses.py put hotel
85
> expenses.py get lunch
51.50
> expenses.py get lunch hotel
136.50
> expenses.py get
186.50
User Story

As an employee
I want to use my expenese program via web
so I can collect the expenses with a device
that does not support Python
Idea
Tasks
●

Create a web server

●

Create the HTML page (ask Peter)

●

Read the HTTP parameters

●

Test the legacy

●

●

Refactor the legacy to connect to the HTML
commands
Build the damn thing!
Agile Manifesto
We are uncovering better ways of developing
software by doing it and helping others do it.
Through this work we have come to value:
Individuals and interactions over processes and tools
Working software over comprehensive documentation
Customer collaboration over contract negotiation
Responding to change over following a plan
That is, while there is value in the items on
the right, we value the items on the left more.
License agreement
●

●

At least part of the material used in this presentation has been
licensed as Creative Common, non-commercial, share-alike
content (http://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.en)
from Roberto Bettazzoni.
As per the license agreement you are entitled to do whatever
you like to the material as far as is not contradicting basic
principle of the license. On top of that Roberto Bettazzoni kindly
asks you to return any change you will make to this material, for
validation and sharing purposes.

Mais conteúdo relacionado

Mais procurados

Let's Git Together! - Hacktoberfest 2020
Let's Git Together! - Hacktoberfest 2020Let's Git Together! - Hacktoberfest 2020
Let's Git Together! - Hacktoberfest 2020EqraKhattak
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberAlex Mikitenko
 
Introduction to GraphQL with Ruby
Introduction to GraphQL with RubyIntroduction to GraphQL with Ruby
Introduction to GraphQL with RubyYen-Nan Lin
 
Angular Vienna - Use React tools for better Angular apps
Angular Vienna - Use React tools for better Angular appsAngular Vienna - Use React tools for better Angular apps
Angular Vienna - Use React tools for better Angular appsMartin Hochel
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecGiulio De Donato
 
Standing out as a new grad candidate
Standing out as a new grad candidateStanding out as a new grad candidate
Standing out as a new grad candidateSashko Stubailo
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)Evan Lin
 
Source Control with Git & GitHub
 Source Control with Git & GitHub Source Control with Git & GitHub
Source Control with Git & GitHubRonny Orbach
 
Flutter beers and pizza
Flutter beers and pizzaFlutter beers and pizza
Flutter beers and pizzaJon Durán
 
Polymorphic meetup - can you teach your po to push cucumber gherkins to git
Polymorphic meetup - can you teach your po to push cucumber gherkins to gitPolymorphic meetup - can you teach your po to push cucumber gherkins to git
Polymorphic meetup - can you teach your po to push cucumber gherkins to gitArnaud Georgin
 
What's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie LermanWhat's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie LermanJulie Lerman
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkAgile Testing Alliance
 
Git workflows (Basics)
Git workflows (Basics)Git workflows (Basics)
Git workflows (Basics)Roman Kuba
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for BeginnersRick Umali
 
Working process and git branch strategy
Working process and git branch strategyWorking process and git branch strategy
Working process and git branch strategyKan-Han (John) Lu
 
Cool .NET tools, techniques and libraries
Cool .NET tools, techniques and librariesCool .NET tools, techniques and libraries
Cool .NET tools, techniques and librariesGreg Sohl
 

Mais procurados (20)

Let's Git Together! - Hacktoberfest 2020
Let's Git Together! - Hacktoberfest 2020Let's Git Together! - Hacktoberfest 2020
Let's Git Together! - Hacktoberfest 2020
 
Php test fest
Php test festPhp test fest
Php test fest
 
Testing stage. being ahead business with cucumber
Testing stage. being ahead business with cucumberTesting stage. being ahead business with cucumber
Testing stage. being ahead business with cucumber
 
Introduction to GraphQL with Ruby
Introduction to GraphQL with RubyIntroduction to GraphQL with Ruby
Introduction to GraphQL with Ruby
 
Angular Vienna - Use React tools for better Angular apps
Angular Vienna - Use React tools for better Angular appsAngular Vienna - Use React tools for better Angular apps
Angular Vienna - Use React tools for better Angular apps
 
Brad wood -_whats_a_pull_request
Brad wood -_whats_a_pull_requestBrad wood -_whats_a_pull_request
Brad wood -_whats_a_pull_request
 
It's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspecIt's all about behaviour, also in php - phpspec
It's all about behaviour, also in php - phpspec
 
Standing out as a new grad candidate
Standing out as a new grad candidateStanding out as a new grad candidate
Standing out as a new grad candidate
 
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)iTHome Gopher Day 2017: What can Golang do?  (Using project 52 as examples)
iTHome Gopher Day 2017: What can Golang do? (Using project 52 as examples)
 
Source Control with Git & GitHub
 Source Control with Git & GitHub Source Control with Git & GitHub
Source Control with Git & GitHub
 
Freelance web development
Freelance web developmentFreelance web development
Freelance web development
 
Flutter beers and pizza
Flutter beers and pizzaFlutter beers and pizza
Flutter beers and pizza
 
Polymorphic meetup - can you teach your po to push cucumber gherkins to git
Polymorphic meetup - can you teach your po to push cucumber gherkins to gitPolymorphic meetup - can you teach your po to push cucumber gherkins to git
Polymorphic meetup - can you teach your po to push cucumber gherkins to git
 
What's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie LermanWhat's New in Entity Framework 4, by Julie Lerman
What's New in Entity Framework 4, by Julie Lerman
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot Framework
 
Henge
HengeHenge
Henge
 
Git workflows (Basics)
Git workflows (Basics)Git workflows (Basics)
Git workflows (Basics)
 
Git for Beginners
Git for BeginnersGit for Beginners
Git for Beginners
 
Working process and git branch strategy
Working process and git branch strategyWorking process and git branch strategy
Working process and git branch strategy
 
Cool .NET tools, techniques and libraries
Cool .NET tools, techniques and librariesCool .NET tools, techniques and libraries
Cool .NET tools, techniques and libraries
 

Semelhante a Presentation TDD in Python

Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCryptoBitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCryptoOpti Network
 
An Ultimate Guide To Hire Python Developer
An Ultimate Guide To Hire Python DeveloperAn Ultimate Guide To Hire Python Developer
An Ultimate Guide To Hire Python DeveloperRishiVardhaniM
 
Github 101 An Adventurer's Guide To Open Source
Github 101   An Adventurer's Guide To Open SourceGithub 101   An Adventurer's Guide To Open Source
Github 101 An Adventurer's Guide To Open SourcePrachitibhukan
 
How to contribute to open source
How to contribute to open sourceHow to contribute to open source
How to contribute to open sourceAlbert Wong
 
Guide To Hiring Dedicated Python Developers In India.pdf
Guide To Hiring Dedicated Python Developers In India.pdfGuide To Hiring Dedicated Python Developers In India.pdf
Guide To Hiring Dedicated Python Developers In India.pdfAIS Technolabs Pvt Ltd
 
Contributing to Upstream Open Source Projects
Contributing to Upstream Open Source ProjectsContributing to Upstream Open Source Projects
Contributing to Upstream Open Source ProjectsScott Garman
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...VincitOy
 
How To Become An Excellent Software Engineer, by Lee Bob Black
How To Become An Excellent Software Engineer, by Lee Bob BlackHow To Become An Excellent Software Engineer, by Lee Bob Black
How To Become An Excellent Software Engineer, by Lee Bob BlackSkilledUp
 
GitHub Copilot.pptx
GitHub Copilot.pptxGitHub Copilot.pptx
GitHub Copilot.pptxLuis Beltran
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github ActionsKnoldus Inc.
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github ActionsKnoldus Inc.
 
GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!Orangescrum
 
Technical Seminar Series: GIT Pull Requests Best Practices
Technical Seminar Series:  GIT Pull Requests Best PracticesTechnical Seminar Series:  GIT Pull Requests Best Practices
Technical Seminar Series: GIT Pull Requests Best PracticesSingsys Pte Ltd
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016Søren Lund
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHubDSCVSSUT
 

Semelhante a Presentation TDD in Python (20)

Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCryptoBitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
Bitcoin Development 2019 Starter Guide - No Skill | ProvenCrypto
 
Advance workshop on git
Advance workshop on gitAdvance workshop on git
Advance workshop on git
 
An Ultimate Guide To Hire Python Developer
An Ultimate Guide To Hire Python DeveloperAn Ultimate Guide To Hire Python Developer
An Ultimate Guide To Hire Python Developer
 
Github 101 An Adventurer's Guide To Open Source
Github 101   An Adventurer's Guide To Open SourceGithub 101   An Adventurer's Guide To Open Source
Github 101 An Adventurer's Guide To Open Source
 
Git tech
Git techGit tech
Git tech
 
What is github.
What is github.What is github.
What is github.
 
How to contribute to open source
How to contribute to open sourceHow to contribute to open source
How to contribute to open source
 
DevOps Workshop Part 1
DevOps Workshop Part 1DevOps Workshop Part 1
DevOps Workshop Part 1
 
Guide To Hiring Dedicated Python Developers In India.pdf
Guide To Hiring Dedicated Python Developers In India.pdfGuide To Hiring Dedicated Python Developers In India.pdf
Guide To Hiring Dedicated Python Developers In India.pdf
 
Contributing to Upstream Open Source Projects
Contributing to Upstream Open Source ProjectsContributing to Upstream Open Source Projects
Contributing to Upstream Open Source Projects
 
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
Improving Code Quality In Medical Software Through Code Reviews - Vincit Teat...
 
How To Become An Excellent Software Engineer, by Lee Bob Black
How To Become An Excellent Software Engineer, by Lee Bob BlackHow To Become An Excellent Software Engineer, by Lee Bob Black
How To Become An Excellent Software Engineer, by Lee Bob Black
 
GitHub Copilot.pptx
GitHub Copilot.pptxGitHub Copilot.pptx
GitHub Copilot.pptx
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github Actions
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github Actions
 
GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!
 
Get Git with It! A Developer's Workshop.pptx
Get Git with It! A Developer's Workshop.pptxGet Git with It! A Developer's Workshop.pptx
Get Git with It! A Developer's Workshop.pptx
 
Technical Seminar Series: GIT Pull Requests Best Practices
Technical Seminar Series:  GIT Pull Requests Best PracticesTechnical Seminar Series:  GIT Pull Requests Best Practices
Technical Seminar Series: GIT Pull Requests Best Practices
 
Documenting code yapceu2016
Documenting code yapceu2016Documenting code yapceu2016
Documenting code yapceu2016
 
Workshop on Git and GitHub
Workshop on Git and GitHubWorkshop on Git and GitHub
Workshop on Git and GitHub
 

Mais de Roberto Bettazzoni

Giornat Mondiale della Retrospettiva 2020 - Riassunto Meetup Remoto
Giornat Mondiale della Retrospettiva 2020 - Riassunto Meetup RemotoGiornat Mondiale della Retrospettiva 2020 - Riassunto Meetup Remoto
Giornat Mondiale della Retrospettiva 2020 - Riassunto Meetup RemotoRoberto Bettazzoni
 
Complexity indicators: estimation precision and test types
Complexity indicators: estimation precision and test typesComplexity indicators: estimation precision and test types
Complexity indicators: estimation precision and test typesRoberto Bettazzoni
 
Why you need to change your way of working
Why you need to change your way of workingWhy you need to change your way of working
Why you need to change your way of workingRoberto Bettazzoni
 
TDD Dojo - Test Driven Development Coding Dojo
TDD Dojo - Test Driven Development Coding DojoTDD Dojo - Test Driven Development Coding Dojo
TDD Dojo - Test Driven Development Coding DojoRoberto Bettazzoni
 
Presentation of agile engineering practices
Presentation of agile engineering practicesPresentation of agile engineering practices
Presentation of agile engineering practicesRoberto Bettazzoni
 
Cynefin Lego Game Agenda (versione 2.0 in Italiano)
Cynefin Lego Game Agenda (versione 2.0 in Italiano) Cynefin Lego Game Agenda (versione 2.0 in Italiano)
Cynefin Lego Game Agenda (versione 2.0 in Italiano) Roberto Bettazzoni
 
Pair programming and pair training
Pair programming and pair trainingPair programming and pair training
Pair programming and pair trainingRoberto Bettazzoni
 
Presentazione eXtreme Programming
Presentazione eXtreme ProgrammingPresentazione eXtreme Programming
Presentazione eXtreme ProgrammingRoberto Bettazzoni
 
Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...
Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...
Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...Roberto Bettazzoni
 
Una fugace occhiata al Test Driven Development (2006)
Una fugace occhiata al Test Driven Development  (2006)Una fugace occhiata al Test Driven Development  (2006)
Una fugace occhiata al Test Driven Development (2006)Roberto Bettazzoni
 
Programmazione android per esseri umani
Programmazione android per esseri umaniProgrammazione android per esseri umani
Programmazione android per esseri umaniRoberto Bettazzoni
 
Useful Lean Tools: Value Stream Mapping and Kanban
Useful Lean Tools: Value Stream Mapping and KanbanUseful Lean Tools: Value Stream Mapping and Kanban
Useful Lean Tools: Value Stream Mapping and KanbanRoberto Bettazzoni
 

Mais de Roberto Bettazzoni (17)

Giornat Mondiale della Retrospettiva 2020 - Riassunto Meetup Remoto
Giornat Mondiale della Retrospettiva 2020 - Riassunto Meetup RemotoGiornat Mondiale della Retrospettiva 2020 - Riassunto Meetup Remoto
Giornat Mondiale della Retrospettiva 2020 - Riassunto Meetup Remoto
 
Complexity indicators: estimation precision and test types
Complexity indicators: estimation precision and test typesComplexity indicators: estimation precision and test types
Complexity indicators: estimation precision and test types
 
Why you need to change your way of working
Why you need to change your way of workingWhy you need to change your way of working
Why you need to change your way of working
 
TDD Dojo - Test Driven Development Coding Dojo
TDD Dojo - Test Driven Development Coding DojoTDD Dojo - Test Driven Development Coding Dojo
TDD Dojo - Test Driven Development Coding Dojo
 
Presentation of agile engineering practices
Presentation of agile engineering practicesPresentation of agile engineering practices
Presentation of agile engineering practices
 
Unit test in a nutshell
Unit test in a nutshellUnit test in a nutshell
Unit test in a nutshell
 
Cynefin Lego Game Agenda (versione 2.0 in Italiano)
Cynefin Lego Game Agenda (versione 2.0 in Italiano) Cynefin Lego Game Agenda (versione 2.0 in Italiano)
Cynefin Lego Game Agenda (versione 2.0 in Italiano)
 
Pair programming and pair training
Pair programming and pair trainingPair programming and pair training
Pair programming and pair training
 
Presentazione eXtreme Programming
Presentazione eXtreme ProgrammingPresentazione eXtreme Programming
Presentazione eXtreme Programming
 
Agile e Open Source
Agile e Open SourceAgile e Open Source
Agile e Open Source
 
Esempio di code kata
Esempio di code kataEsempio di code kata
Esempio di code kata
 
Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...
Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...
Introduzione alle metodologie e pratiche Agili ... ma l'agile c'entra qualcos...
 
Una fugace occhiata al Test Driven Development (2006)
Una fugace occhiata al Test Driven Development  (2006)Una fugace occhiata al Test Driven Development  (2006)
Una fugace occhiata al Test Driven Development (2006)
 
Scrum in a nutshell
Scrum in a nutshellScrum in a nutshell
Scrum in a nutshell
 
The BDD live show (ITA)
The BDD live show (ITA)The BDD live show (ITA)
The BDD live show (ITA)
 
Programmazione android per esseri umani
Programmazione android per esseri umaniProgrammazione android per esseri umani
Programmazione android per esseri umani
 
Useful Lean Tools: Value Stream Mapping and Kanban
Useful Lean Tools: Value Stream Mapping and KanbanUseful Lean Tools: Value Stream Mapping and Kanban
Useful Lean Tools: Value Stream Mapping and Kanban
 

Último

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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
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
 
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
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 

Último (20)

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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
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...
 
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
 
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
 
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...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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...
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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)
 
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
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 

Presentation TDD in Python

  • 1. TDD in Python PyDayBo Facoltà di Ingegneria Università di Bologna 18 marzo 2010 Roberto Bettazzoni roberto@bettazzoni.it
  • 4. Code Refactoring “In software engineering, ‘refactoring’ source code means improving it without changing its overall results.” Wikipedia: refactoring
  • 5. Incremental Design “Invest in the design of the system every day.” Kent Beck, Extreme Programming Explained 2nd Ed. 2004
  • 6. Test First Programming “Write a failing automated test before changing any code.” Kent Beck, Extreme Programming Explained 2 nd Ed. 2004
  • 7. Unit Test White box test at code level
  • 8. Test-Driven Development Test First Programming + Code Refactoring + Incremental design + very short iterations (minutes)
  • 9. The T.D.D. process Add a test Run tests see new failure Refactor Write some code Run tests see all pass
  • 10. DEMO
  • 11. The legacy expenses.py Python script used by the employees when they are abroad to collect the expenses
  • 12. Expenses.py examples > expenses.py reset > expenses.py list > expenses.py put lunch 28.00 > expenses.py put gasoline 50 > expenses.py put lunch 23.50 > expenses.py put hotel 85 > expenses.py get lunch 51.50 > expenses.py get lunch hotel 136.50 > expenses.py get 186.50
  • 13. User Story As an employee I want to use my expenese program via web so I can collect the expenses with a device that does not support Python
  • 14. Idea
  • 15. Tasks ● Create a web server ● Create the HTML page (ask Peter) ● Read the HTTP parameters ● Test the legacy ● ● Refactor the legacy to connect to the HTML commands Build the damn thing!
  • 16. Agile Manifesto We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more.
  • 17. License agreement ● ● At least part of the material used in this presentation has been licensed as Creative Common, non-commercial, share-alike content (http://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.en) from Roberto Bettazzoni. As per the license agreement you are entitled to do whatever you like to the material as far as is not contradicting basic principle of the license. On top of that Roberto Bettazzoni kindly asks you to return any change you will make to this material, for validation and sharing purposes.