Hacker News new | ask | show | jobs
by pydry 1552 days ago
>It's _so_ much more effort to do tests before code.

It is?

For me, tests are (or should be) a programmatic representation of the spec. I usually find it's easier to write the spec before the tests and the tests before the code.

I worry about tests written after code, actually, coz they have a greater tendency to be aligned to the behavior of the code rather than the spec.