SlideShare a Scribd company logo
1 of 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!

More Related Content

Viewers also liked

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

Viewers also liked (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 to Exploring design-alternatives-using-tdd

Similar to 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?
 

More from Alexandru Bolboaca

More from 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
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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...
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
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
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

Exploring design-alternatives-using-tdd