Ask HN: When do you guys start writing unit tests?

2 points by notadoctor_ssh ↗ HN
Do you guys follow TDD approach? If you guys do, at what point do you start writing test cases? Any advantages you found by following this approach?

2 comments

[ 11.5 ms ] story [ 18.8 ms ] thread
I typically don't for my personal projects, but if I was going to publish my code or start collaborating in git it would move toward the top of my todo list.

Or if I started weaving together lots of different parts of the project.

Typically for any personal projects I will do it before any large refractors then keep on top of code coverage going forth. I find this approach let’s me move fast until I reach a level of seriousness.

I sometimes use TDD when adding new functionality, I even created a relatively popular YouTube video on the topic. I find it most useful when I’m coding a particularly complicated function, helps me think through the problem better.