Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Test Driven Development example + design question

by chromatic (Archbishop)
on Jul 01, 2012 at 21:58 UTC ( #979339=note: print w/replies, xml ) Need Help??

in reply to Test Driven Development example + design question

I've not found that the approach matters as much as:

  • Are you working in small steps?
  • Are you verifying your design and implementation with coherent and well-designed tests?
  • Are you refactoring rigorously as you discover a natural design for your system?

In general I prefer the bottom-up approach as it requires less scaffolding to build a comprehensive test suite, but neither approach is sufficiently better over the other as to matter, in my experience.

  • Comment on Re: Test Driven Development example + design question

Replies are listed 'Best First'.
Re^2: Test Driven Development example + design question
by mascip (Pilgrim) on Jul 01, 2012 at 23:37 UTC

    I like this answer, thank you !

    Theory is good, interesting, important. But now i need to practice and assimilate.
    I will try this way of "delegating responsibilities", through an attribute that consumes the Role. I might take this little project as an experiment, finish it with one design, and then try to rebuild it with another design. Nice Lego game =o)

    Finally i think i understood what bottom-up or top-down means. "Bottom up" is building little subroutines (or classes) that we might use, and then build more complex subroutines (or classes) from them. "Top down" is writing the final script (or the most complex subroutine/class) first, and from there we know which "smaller elements" to build, to make it work.
    I'm ashamed it took me so long to understand :D

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://979339]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2018-01-17 04:21 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (196 votes). Check out past polls.