in reply to Re: Test Driven Development example + design question
in thread Test Driven Development example + design question

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

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