3 ms·
If you're starting with a blank slate, what insane amount of scaffolding is required to test? If you had a long-running hobby project that hadn't ever been test
by caymanjim 6y ago
If you're starting with a blank slate, what insane amount of scaffolding is required to test? If you had a long-running hobby project that hadn't ever been tested, it could be daunting to add tests (Working Effectively with Legacy Code is a great book for this, by the way), but getting started with testing on a greenfield project is trivial in most languages. If you're writing tests on code at work, did someone else do all the work setting it up for you?
I can relate to the general sentiment; I have little ideas all the time, and my desire to "do things right" leads me to go off on tangents configuring CI/CD pipelines and other tools, but I enjoy that too, so I don't feel like it's a waste of time. I just might not end up working on the thing I started out wanting to do.
- ancarda 6y agoSpecifically, it was building a filesystem abstraction. The language I was working in didn't have a suitable one I could use. I realized this morning I could have used a mock/test double -- at the time I was thinking I'd need to have some in-memory filesystem so I could later run assertions. I guess I needed to sleep on it. Anyhow, I'm sure I have run into similar issues where I've felt some pressure to pick between getting some code out and getting some good code out. That is more what this post is about. I was using that as a recent example.