3 ms·
> As annoying as writing these might be, there is no way I would go without writing tests even for a side toy project. For one, the tests have already saved me
by Handytinge 5y ago
> As annoying as writing these might be, there is no way I would go without writing tests even for a side toy project. For one, the tests have already saved me from obvious bugs in the SQL queries. For another, extensive test coverage is critical for quick iteration. I’ve been able to prototype and refactor this service in place over and over again to add new features because I have enough test coverage.
Is it critical for a toy project (or any project for that matter)?
> The best thing about this setup is that it is simple. There is no Docker involved, no complex local database configuration, nothing. cargo test or git push to a temporary branch and I am good.
I guess it depends on viewpoint. Maybe I'm an outdated dinosaur here, but we wrote code for decades without tests in production, let alone for side projects. Not having tests could sometimes cause failure - true. But it also forced you to examine what you pushed to production.
I do think the project is very cool though.
- ojkelly 5y agoTests can form a normal part of the development process in some languages. You don’t need to go full TDD, but when you language’s tooling and IDE are designed for testing it can speed up your feedback loop. For example when writing in go in vscode, tests often sit in the same category of tooling as storybook and js hot reloadeder do. Being able to update a function and then run it with a set of inputs already defined automatically is really great. It also lets you workshop the API design (of a library) while your developing it. In some other languages I’ve found the tooling so painful to setup, that it’s rarely worth the effort.
- XCSme 5y agoI run a (pretty successful) self-hosted analytics platform[0] and I am no longer writing tests for it. I did have tests at some point, but they were slowing down development too much, whenever something was changed the tests had to be updated, whenever a new feature was added, new tests had to be written. I do plan to create some automated tests, but mostly for the set-up part, so the installation always goes as expected on different environments. [0]: https://www.uxwizz.com/ https://www.uxwizz.com/