SlideShare una empresa de Scribd logo
1 de 30
ExploringDesignAlternativesusingTDD
How do you design software?
Waystodesignsoftware
● Sketch a diagram (hopefully not UML)
● Think about the problem
● Write code (prototype)
● Review with other people, or work together
Why do we design software?
WhyDesignSoftware?
What is design?
Designis...
“Conceiving and giving
form to artifacts that
solve problems.”
Karl Ulrich
http://www.ulrichbook.org/
Designis...
Conceiving and giving form to artifacts that
solve problems
within constraints.
The primary constraint for software is need for
quick change.
GeneralDesignProcess
ExploringDesignAlternatives
Source: Apollo Paul Paredes
Software design:
What are the artifacts?
OOPArtifacts
● Classes
– List of methods
● Methods
– Names
– Parameter lists
● Collaboration between objects => contracts
Do you explore design alternatives?
How?
ExploringDesignAlternatives
● On paper
● By writing code
What's this got to do with TDD?
TDDis...
A way of doing incremental design
(design while writing code)
IncrementalDesign
Define examples of inputs – outputs
Implement
particular cases
Extract abstractions
aka generalize solution
aka design
Design is creation of artifacts that solve problems
Software design is the creation of classes,
methods etc. that solve a problem
Exploring design alternatives is part of the design
process
One way to explore an alternative is to build it
TDD is a method to design software while writing
code
How about using TDD as way to explore design
alternatives?
Turns out, I've seen a lot of exploration with TDD
Coderetreat
● One day
● 6 sessions, 45'
● Pair program, TDD
● Delete code, change
pair after session
● Use constraints
Code Retreat #1 in Europe
Attended / facilitated: ~30 code retreats
Inoticedatcoderetreatsthat...
How you start and the constraints you set may
change the final design.
How to start?
Vary:numberofdesignentities
TDD As If you meant it → 0 entities
.
.
.
n entities
Startfromexistingentities
● Must have a certain class
● Can't modify a certain class
Use different constraints
Constraints
● Pure functions
● Don't use data structures
● Use only events to communicate between
objects
Paradigm
● Only OOP
● Only Functional Programming
Conclusion
TDD can be used to explore design alternatives.
Thankyou!
Alexandru Bolboaca
Coach and Trainer at MozaicWorks
Contact me:
@alexboly
alex.bolboaca@mozaicworks.com
Remote pair with me
Come at code and beer!

Más contenido relacionado

Destacado

Micro Procesadores
Micro ProcesadoresMicro Procesadores
Micro Procesadores
lautaro
 
eビジネスは必要か
eビジネスは必要かeビジネスは必要か
eビジネスは必要か
uchidakatsuya
 

Destacado (20)

Volvo my10 c30
Volvo my10 c30Volvo my10 c30
Volvo my10 c30
 
Micro Procesadores
Micro ProcesadoresMicro Procesadores
Micro Procesadores
 
Selva
SelvaSelva
Selva
 
10102010 basic hazard management
10102010 basic hazard management10102010 basic hazard management
10102010 basic hazard management
 
King arthur presentazione
King arthur presentazioneKing arthur presentazione
King arthur presentazione
 
Fortune 100 Procurement Practices: What every company needs to know about pro...
Fortune 100 Procurement Practices: What every company needs to know about pro...Fortune 100 Procurement Practices: What every company needs to know about pro...
Fortune 100 Procurement Practices: What every company needs to know about pro...
 
Challenges And Opportunities With Bio And Nanotech
Challenges And Opportunities With Bio  And NanotechChallenges And Opportunities With Bio  And Nanotech
Challenges And Opportunities With Bio And Nanotech
 
Memo148 השירות הצבאי בישראל שפר inss
Memo148 השירות הצבאי בישראל שפר inssMemo148 השירות הצבאי בישראל שפר inss
Memo148 השירות הצבאי בישראל שפר inss
 
21st century innovation
21st century innovation21st century innovation
21st century innovation
 
AYN RAND Translations
AYN RAND TranslationsAYN RAND Translations
AYN RAND Translations
 
0910 s010 new flood screen protection
0910 s010 new flood screen protection0910 s010 new flood screen protection
0910 s010 new flood screen protection
 
eビジネスは必要か
eビジネスは必要かeビジネスは必要か
eビジネスは必要か
 
The fray ALBA GALINDO
The fray ALBA GALINDOThe fray ALBA GALINDO
The fray ALBA GALINDO
 
XHR2 Wonder Land
XHR2 Wonder LandXHR2 Wonder Land
XHR2 Wonder Land
 
Appplied art in tsunami coastal early warning system and preparedness
Appplied art in tsunami coastal early warning system and preparednessAppplied art in tsunami coastal early warning system and preparedness
Appplied art in tsunami coastal early warning system and preparedness
 
2010 Chevy HHR in El Paso, TX
2010 Chevy HHR in El Paso, TX2010 Chevy HHR in El Paso, TX
2010 Chevy HHR in El Paso, TX
 
Tamara's Glastonbury
Tamara's GlastonburyTamara's Glastonbury
Tamara's Glastonbury
 
Sustainability. Michael Fullan
Sustainability. Michael FullanSustainability. Michael Fullan
Sustainability. Michael Fullan
 
Indicator of universal wage in post 2015 millennium development goals (MDGs) ...
Indicator of universal wage in post 2015 millennium development goals (MDGs) ...Indicator of universal wage in post 2015 millennium development goals (MDGs) ...
Indicator of universal wage in post 2015 millennium development goals (MDGs) ...
 
Technology transfer versus environment leadership
Technology transfer versus environment leadershipTechnology transfer versus environment leadership
Technology transfer versus environment leadership
 

Similar a Exploring design-alternatives-using-tdd

Similar a Exploring design-alternatives-using-tdd (20)

Software Engineering Primer
Software Engineering PrimerSoftware Engineering Primer
Software Engineering Primer
 
Agile work practices and tools
Agile work practices and toolsAgile work practices and tools
Agile work practices and tools
 
TDD - Seriously, try it! - Opensouthcode
TDD - Seriously, try it! - OpensouthcodeTDD - Seriously, try it! - Opensouthcode
TDD - Seriously, try it! - Opensouthcode
 
The Role of IT Architect in Startup Company
The Role of IT Architect in Startup CompanyThe Role of IT Architect in Startup Company
The Role of IT Architect in Startup Company
 
The role of an IT architect in startups
The role of an IT architect in startupsThe role of an IT architect in startups
The role of an IT architect in startups
 
Pair programming
Pair programmingPair programming
Pair programming
 
TDD in Python With Pytest
TDD in Python With PytestTDD in Python With Pytest
TDD in Python With Pytest
 
Design Engineering With Swift
Design Engineering With SwiftDesign Engineering With Swift
Design Engineering With Swift
 
Lessons learned with Bdd: a tutorial
Lessons learned with Bdd: a tutorialLessons learned with Bdd: a tutorial
Lessons learned with Bdd: a tutorial
 
Better java with design
Better java with designBetter java with design
Better java with design
 
Xlab #2: wzorce projektowe
Xlab #2: wzorce projektoweXlab #2: wzorce projektowe
Xlab #2: wzorce projektowe
 
Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i...
Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i...Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i...
Day 2 (Lecture 5): A Practitioner's Perspective on Building Machine Product i...
 
U3 l4 using simple commands
U3 l4 using simple commandsU3 l4 using simple commands
U3 l4 using simple commands
 
Kickstarting career as an Android developer.pdf
Kickstarting career as an Android developer.pdfKickstarting career as an Android developer.pdf
Kickstarting career as an Android developer.pdf
 
Thinking visually for Software Testing Webinar Slides
Thinking visually for Software Testing Webinar SlidesThinking visually for Software Testing Webinar Slides
Thinking visually for Software Testing Webinar Slides
 
Cepstrum Placement Talk 2022.pptx
Cepstrum Placement Talk 2022.pptxCepstrum Placement Talk 2022.pptx
Cepstrum Placement Talk 2022.pptx
 
Agile Development: Key to smart software development
Agile Development: Key to smart software developmentAgile Development: Key to smart software development
Agile Development: Key to smart software development
 
Clean code - Getting your R&D on board
Clean code - Getting your R&D on boardClean code - Getting your R&D on board
Clean code - Getting your R&D on board
 
Software Craftmanship - Cours Polytech
Software Craftmanship - Cours PolytechSoftware Craftmanship - Cours Polytech
Software Craftmanship - Cours Polytech
 
What is OUR Culture?
What is OUR Culture?What is OUR Culture?
What is OUR Culture?
 

Más de Alexandru Bolboaca

Más de Alexandru Bolboaca (20)

Refactor legacy code through pure functions
Refactor legacy code through pure functionsRefactor legacy code through pure functions
Refactor legacy code through pure functions
 
Design Without Types
Design Without TypesDesign Without Types
Design Without Types
 
Thinking in Functions
Thinking in FunctionsThinking in Functions
Thinking in Functions
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
What is good software design? And why it matters?
What is good software design? And why it matters?What is good software design? And why it matters?
What is good software design? And why it matters?
 
Functional programming in C++
Functional programming in C++Functional programming in C++
Functional programming in C++
 
Agile Technical Leadership
Agile Technical LeadershipAgile Technical Leadership
Agile Technical Leadership
 
TDD As If You Meant It
TDD As If You Meant ItTDD As If You Meant It
TDD As If You Meant It
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
 
Hidden loops
Hidden loopsHidden loops
Hidden loops
 
Removing structural duplication
Removing structural duplicationRemoving structural duplication
Removing structural duplication
 
Continuous delivery
Continuous deliveryContinuous delivery
Continuous delivery
 
Why You Should Start Using Docker
Why You Should Start Using DockerWhy You Should Start Using Docker
Why You Should Start Using Docker
 
Pyramid of-developer-skills
Pyramid of-developer-skillsPyramid of-developer-skills
Pyramid of-developer-skills
 
Applied craftsmanship
Applied craftsmanshipApplied craftsmanship
Applied craftsmanship
 
Pyramid of-developer-skills
Pyramid of-developer-skillsPyramid of-developer-skills
Pyramid of-developer-skills
 
Stay focused
Stay focusedStay focused
Stay focused
 
Kanban intro
Kanban introKanban intro
Kanban intro
 
Unit testing-patterns
Unit testing-patternsUnit testing-patterns
Unit testing-patterns
 
Incremental design, simply explained
Incremental design, simply explainedIncremental design, simply explained
Incremental design, simply explained
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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 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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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)
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
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...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

Exploring design-alternatives-using-tdd