Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

test-second can be kinda boring sometimes.

test-first is more fun.



I find this to be very true, writing the tests at the beginning is exciting because you get to see what your code is going to accomplish. Then filling in the code to pass the tests is exciting because you're working toward a very clear goal with a very clear payout. Best way to work, imho.


Fastest way to work, too, since you figure out in advance specifically what you're trying to accomplish. It helps avoid YAGNI syndrome (http://c2.com/xp/YouArentGonnaNeedIt.html)!


Right! It's almost as fast as writing code a second time after you accidentally rm it into oblivion! Thanks for that YAGNI page, makes a lot of sense.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: