Ask HN: Do you experience a crippling fear of “writing low quality software”?
For some time, I just assumed it was something like burnout; I write code at work and don't wish to do it at home. But even when I do have a day off and I feel like writing something... I rarely get anything done.
However, yesterday, in my spare time, I started working on a small program. I had an idea that I wanted to explore, but very quickly I ran into some trouble writing unit tests for it. Eventually, I got overwhelmed with two unacceptable options:
1) Write this thing without tests.
2) Build an -insane- amount of scaffolding to make tests possible.
A whole day of struggling to do TDD and I have nothing to show for it. It has really ruined my mood, and I realize now how often that has happened when writing software. In a way, "ignorance is bliss" -- had I never learnt about software correctness, I'd be producing more. Though I fear it would be 'lower quality' in some way.
Has anyone else felt this? The solution can't be to abandon tests, static analysis, and so on. I did initially think perhaps tests should only be written when a bug is discovered - i.e. reproduce the bug with a failing test, then fix the software. That particular function's rewrite/repair can be guided by static analysis.
I guess so long as the code is written to be reasonably testable, that may work?
Even though I want to write good code, the pressure I put on myself to produce good work seems to drain my soul.