Exploring design-alternatives-using-tdd

100 %
0 %
Information about Exploring design-alternatives-using-tdd
Technology

Published on June 9, 2013

Author: alexboly

Source: slideshare.net

Description

Exploring alternatives is part of the design process.
TDD is a way to do incremental design, or design while you write code.
So can we use TDD to explore design alternatives?

Turns out, I've seen a lot of design exploration during the 30+ code retreats I facilitated and attended. While I don't have a definite proof, it seems that TDD could be used for this purpose.

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 givingform to artifacts thatsolve problems.”Karl Ulrichhttp://www.ulrichbook.org/

Designis...Conceiving and giving form to artifacts thatsolve problemswithin constraints.The primary constraint for software is need forquick change.

GeneralDesignProcess

ExploringDesignAlternativesSource: 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

Whats this got to do with TDD?

TDDis...A way of doing incremental design(design while writing code)

IncrementalDesignDefine examples of inputs – outputsImplementparticular casesExtract abstractionsaka generalize solutionaka design

Design is creation of artifacts that solve problemsSoftware design is the creation of classes,methods etc. that solve a problemExploring design alternatives is part of the designprocessOne way to explore an alternative is to build itTDD is a method to design software while writingcode

How about using TDD as way to explore designalternatives?

Turns out, Ive seen a lot of exploration with TDD

Coderetreat● One day● 6 sessions, 45● Pair program, TDD● Delete code, changepair after session● Use constraintsCode Retreat #1 in EuropeAttended / facilitated: ~30 code retreats

Inoticedatcoderetreatsthat...How you start and the constraints you set maychange the final design.

How to start?

Vary:numberofdesignentitiesTDD As If you meant it → 0 entities...n entities

Startfromexistingentities● Must have a certain class● Cant modify a certain class

Use different constraints

Constraints● Pure functions● Dont use data structures● Use only events to communicate betweenobjects

Paradigm● Only OOP● Only Functional Programming

ConclusionTDD can be used to explore design alternatives.

Thankyou!Alexandru BolboacaCoach and Trainer at MozaicWorksContact me:@alexbolyalex.bolboaca@mozaicworks.comRemote pair with meCome at code and beer!

Add a comment

Related presentations

Related pages

I T.A.K.E. Unconference | Innovation Technology Awareness ...

Aki participates to I TAKE unconference to learn more about himself, ... Exploring design alternatives using TDD . Summary
Read more

z2013 Session Incubation · lscc/socrates-uk Wiki · GitHub

z2013 Session Incubation. Chris Jeffery edited this page May 30, 2014 · 1 revision Pages 66. Home; Arrivals; Arriving by motorbike or bicycle; ...
Read more