Re:Ask HN: Do you write tests before the implementation?
by MichaelMoser123 on Thursday November 14, 2019 @02:42AM
(#21533570)
Thanks, an interesting perspective. Do you plan to go with this approach for your other projects as well?
Re:Ask HN: Do you write tests before the implementation?
by de_watcher on Friday November 15, 2019 @05:38AM
(#21543817)
More fun is when you get an API documentation and no access to the actual system. You develop the whole thing and then fly out to their site, you've got 3 days to get your software and hardware certified by them, and the certification costs a fortune.
Re:Ask HN: Do you write tests before the implementation?
by notadoctor_ssh on Thursday November 14, 2019 @06:19AM
(#21534546)
I am planning to do this for my hobby projects. I think it will help me write better code and also learn a few things. For professional projects, I think the time I will try to add stuff but it relies on my manager's approval.
While doing this I also found one more benefit, at least for my use case. The backend for user login was simple when I started, but it started growing in a few weeks. Writing test cases saved me from manually logging in with each use case, testing some functionality, then logging out and repeating with other use cases.
Not sure if it is a practical benefit or not, but writing test cases initially also helped me rewrite the way I was configuring Redis for a custom module so that the module can be tested better.
My only issue is that it takes time, and selling higher-ups this was kind of difficult.