Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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
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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://979339]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-12-25 07:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (159 votes), past polls