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

One way to look at it is that optimising for testing is optimising for correctness



Not always. The GP post is more insightful than it might appear. A lot of reasoning used for arguing in favor of adding more unit tests is circular. "Good code is unit testable, so unit testable code is good."

Very often, optimizing certain kinds of code for unit testing makes it significantly more complicated, with none of that complexity helping you in the actual program. This is especially true for "end user" code, such as controllers.


I agree with what you said about "end user" code actually. I guess I am really arguing in favour of testing, not specifically unit-testing.




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

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

Search: