[rspec-users] Mocks? Really?

Zach Dennis zach.dennis at gmail.com
Mon Dec 31 13:10:29 EST 2007

On Dec 31, 2007 12:53 PM, Rick DeNatale <rick.denatale at gmail.com> wrote:

> On Dec 30, 2007 10:09 PM, Francis Hwang <sera at fhwang.net> wrote:
> > On Dec 30, 2007, at 9:38 PM, Jay Levitt wrote:
> >
> > >>> Incidentally, how well-tested was that code base? 200 lines of copy-
> > >> and-paste smells like untested code to me.
> > >
> > > 15-20 years ago, unit tests were not a widespread industry practice :)
> > >   This code's in a procedural language that really, really doesn't do
> > > unit tests well.  I've been trying, too.  Almost wrote a pre-
> > > processor,
> > > till I thought about the maintenance nightmare that'd cause.
> >
> > Right, that's why I ask. I think working with languages, tools, and
> > frameworks that are easier to test is a great advantage to how we all
> > worked 10 or more years ago ... I suspect part of that luxury
> > translates in being able to actually design _less_, since the cost of
> > fixing our design mistakes in the future goes down significantly.
> I don't think of it as designing less. (B/T)DD means designing
> incrementally.  I read recently something where someone made a
> distinction between invention and discovery.  Rather than sitting down
> 'ahead of time' and inventing a design, you can discover the design as
> you go.

I don't think it is "designing less" either. It's designing better and doing
it smarter, knowing that you'll never fully comprehend the domain of your
problem upfront, so you discover it, iteratively. As you discover more about
the domain the design of your program changes (during refactoring) to
support a domain model to which it is representing.

This is a concept from Domain Driven Design.

It Francis is referring to doing less upfront design to try to master it all
from the outset, then I agree that less of that is better. But that is
entirely different then just doing less design.

Zach Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/rspec-users/attachments/20071231/bde7b0d9/attachment.html 

More information about the rspec-users mailing list