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

I've written software test first, and I've written it cowboy. Writing the tests first leaves me with better architecture and fewer defects.

Maybe you do better with the cowboy hat on, I don't.




IMHO, it all depends on how complex your task is and how experienced you are in solving that particular task class. Even the most ardent proponents of TDD suggest that you do spikes (write some throwaway code) in order to see what design is applicable to your problem.

On the other hand, if your task is relatively straightforward, you can anticipate the required API and start with tests first.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: