Comment

Comment by mbreedlove

I think the biggest problem with TDD is that there are two types of code, trivial and non-trivial.

I think testing trivial code is a waste of time and does nothing but improve coverage numbers.

When you think about a non-trivial problem to write tests, you don't always know what the final code will look like. Maybe you forget an edge case or some small detail in the requirements that will cause you to restructure the code and approach the problem in a different way. In which case, you now need to re-write your tests. You might as well just write tests around the final version.

parent mbreedlove 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton