Although, I haven’t explicitly done test-first programming, it appears as though it could be a great way to remove the trepidation. I do, however, often work on problem sets for school which come with pre-written tests, and I find myself mildly anxious before I run those tests on my code. Perhaps, the problem here is that I have internalized that code is “done” when the last line is written, as opposed to the test-first paradigm where “done” necessitates passing all the tests.
How do you feel in that space between completing your last line of code and running your first test?
This reply is extremely late, but I’m annoyed at myself for not having responded at the time, so I’ll do it now in case anyone runs across this at some point in the future:
I guess I feel a little trepidation or edge-of-my-seat feeling when I first run a test (I have surprisingly often ended up crossing my fingers), but I try to write tests in a nice modular way, so that I’m never writing more than ~5-10 lines of code before I can test again. I feel a lot more trepidation when I break this pattern, and have a big chunk of new code that hasn’t been tested at all yet.
Although, I haven’t explicitly done test-first programming, it appears as though it could be a great way to remove the trepidation. I do, however, often work on problem sets for school which come with pre-written tests, and I find myself mildly anxious before I run those tests on my code. Perhaps, the problem here is that I have internalized that code is “done” when the last line is written, as opposed to the test-first paradigm where “done” necessitates passing all the tests.
How do you feel in that space between completing your last line of code and running your first test?
This reply is extremely late, but I’m annoyed at myself for not having responded at the time, so I’ll do it now in case anyone runs across this at some point in the future:
I guess I feel a little trepidation or edge-of-my-seat feeling when I first run a test (I have surprisingly often ended up crossing my fingers), but I try to write tests in a nice modular way, so that I’m never writing more than ~5-10 lines of code before I can test again. I feel a lot more trepidation when I break this pattern, and have a big chunk of new code that hasn’t been tested at all yet.