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

This was obvious to me as soon as I wrote my first unit tests. I was all about uncle Bob's philosophy till I realized it doesn't work and discourages creativity and problem solving. Now I remove most old unit tests as they are a liability. They break while the code they supposedly test works perfectly. Maintaining them is a waste of time. I do have some unit tests for specific algorithms written in functional languages. They can be helpful but are no substitute for proper testing that actually catches bugs, whatever way that's achieved. In software, people love fashion. Unit tests were and are to some extent fashion. Like microservices and other ideas that only apply to the top 0.1% of companies, unit testing is generally useless in apps. There is some use when used with specific algorithms where the inputs and outputs are always constant and known. Libraries, programming languages, etc. But for apps, they are mainly a liability.


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

Search: