Write code to be read first, and tested second. Tests may promote better structure, but prioritise readable code with more {mock,patch}ing.
Related Posts
Over a sufficiently long time horizon, all code you write is legacy code.
It's really satisfying to use a profiler for the first time on a project. I always find a big performance win with only a small code change.
It's never the code that I expected to be slow, however!
I'm experimenting with live-evaluating tests in my programming language project.
It's relatively fiddly to hook up a UI for this, but it saves a precious keystroke to run the tests! I'm hoping that it results in more, better tests due to the convenience.