3 ms·
I think you can have the best of both worlds. I tend to do exploratory programming to make a "rough draft", and I've found TDD in this context to be rather stu
by mhartl 19y ago
I think you can have the best of both worlds. I tend to do exploratory programming to make a "rough draft", and I've found TDD in this context to be rather stultifying. But, once you've scoped out the project, TDD is great for the process of rewriting/revision.
N.B. I'm currently experimenting with Behavior Driven Development using Rspec. It looks like it may be flexible enough to be used even for exploratory programming, especially since it adds tests for pending features to the usual pass/fail dichotomy.
- davidw 19y agoTests are obviously an important part of software development. The first thing I wrote once I got Hecl running was a simple test suite. However... I got it running first - I played around, I tried a few things, then I sat down and wrote the code that defined how it should be. When adding new features, sometimes I know exactly what should happen, so I'll write a test. Other times, I don't know how it should work, and need to experiment some, to see how different things would work out in practice. In those cases writing tests first is a waste of time.