lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Fri, Jul 27, 2012 at 9:11 AM, Petri Häkkinen <> wrote:
> Yeah, the biggest problem with test driven development for me is that writing test code is dead boring :) Even if it would make me 2x productive (which I really doubt) I probably couldn't never force myself to use it.

roughly same here, writing tests for working code feels like punishment!

OTOH, the cool part of TDD is that you start by writing code that
already uses the code you haven't written yet!  to me that's like
skipping the hard part and going right to the goal  :-)  of course,
then the tests fail and you have to face reality and write real
code... but then you have very good requirements (make the tests run!)

the difficult part for me is not to get carried and code too much
beyond what's needed for the tests... then i have to go back and write
tests for the part that i just wrote in a coding spurt; back to the
punishment feeling :-(

in the end, i usually manage to do a reasonable TDD flow; but unit
tests still seem far too much work just for the sake of it.  writing
mock code so that i don't use code that i have already written... ¿?
yeah, i know, reduce coupling, focalize test scope... i should do it,
but... but...