← Back to team overview

launchpad-dev team mailing list archive

Re: doctest size, refactoring, moving corner cases to unittests, etc

 

On Thu, Feb 11, 2010 at 4:16 PM, Barry Warsaw <barry@xxxxxxxxxxxxx> wrote:
> On Feb 11, 2010, at 09:37 AM, Bjorn Tillenius wrote:
...
>>That said, documentation can actually be useful for the one writing it.
>>This should not be under-estimated.  Explaining how things work, and
>>most importantly explaining why things work the way they do, forces you
>>to think about how easy things are to understand. If you have trouble
>>explaining it, maybe your design is not so good. I know that I have
>>realised this a few times, and I'm sure others would as well, if they
>>made the effort.
>
> I wholeheartedly agree.  In fact, sometimes it's best to write the
> documentation first.  The nice thing is that with TDD and doctests, you're
> writing the tests first at the same time. :)
>

Just to be clear, I think TDD means "write one small test, run it,
watch it fail, make it pass, refactor if necessary, repeat". Is that
what you mean by TDD?

(I'm not saying one thing is better than another thing, just want to
get clear on terms).

jml



Follow ups

References