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

Personally I have found that structuring my code so that I am able to write unit tests has been far more useful than any unit tests themselves. For your code to be testable it requires a certain structure and decoupling of dependencies that was not natural to me at all when I first starting doing projects. Now that I know that I might one day want to write a suite of tests with full coverage, I write my code much differently.



I agree — I think testable code is generally just better code because it requires the decoupling of dependencies.




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

Search: