Hacker News new | past | comments | ask | show | jobs | submit login

Completely agree. Even though I am quite new to coding, I was shocked to see how much more time I spend on debugging a piece of code than actually writing it. The ratio is closer to 3:1 and sometimes even higher. Writing tests has brought that down to roughly 1:1 (varies from project to project).

I still don't do as extensive testing as I want to (primarily because I am lazy) but I have seen the shift in the way I think about solving a problem. Writing tests forces you to assign structure to your code (in my case I put it down on paper). It helps you think in terms of "pipes" as in what is going in and what comes out.

But, I think a lot also depends on the nature of the project. Parsers and frameworks may need thorough tests while simple apps may do without many. And for some people, it may be too much of an overhead at times.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: