Hacker News new | ask | show | jobs
by aroundtown 2121 days ago
As one of those developers, the problem I face is learning how and why to write tests. Most of the tutorials I've read on the matter test things that are too trivial and test too often. It also doesn't help that the people I've worked with don't have a clue how to do it either or those that do it think that everybody should just get it and can't be bothered to explain it.
3 comments

I recommend reading The Art of Unit Testing -> https://www.manning.com/books/the-art-of-unit-testing . At least this is the book I learned TDD from more than 10 years ago and the knowledge I gained from the book has proven to be timeless.
I see this problem a lot. TDD is a hard skill to learn. It took me 2 years of continuous practice to really get it, and by year 3 I was only just starting to get decent at it. People who try and do TDD for less than 6 months haven't even left the parking lot yet.

I try and short-cut that steep learning curve by mentoring other developers, but there isn't enough people who have that experience around. I've met lots of programmers, and less than 10% of them have ever even tried TDD, let alone done it enough to gain insight and mentor others.

I completely agree, I feel like I'm in the same boat. I do feel like I'm slowly making progress though - primarily by making small contributions to open source libraries that have tests, which requires updating and/or writing new tests - and then trying to replicate tests like that in my own small libraries.