One thing I did on MojoShader at the start, when I was feeling around in the blind dark, was commit to stopping everything and refactoring instead of slapping a FIXME on problem code and moving on.
Honestly, it's the best tech decision I ever made.
Normally the mentality at the start of things is all Minimum Viable
Product; just get it working at all and ship it and then clean it up
neverlater.
But especially for MojoShader, where I was learning of new, unexpected requirements constantly as I stumbled around the Shader Model 3 bytecode spec, being prepared to throw things out and rebuild them instead of kludging around it was absolutely the right thing to do.
My suspicion is that, over the project's lifespan, this probably saved me time, in never having to untangle technical debt months and years later.
My unspoken goal was to have zero FIXME comments in the source. One was allowed to show up, as documentation and to let individual units of work hit revision control, but the next commit was required to deal with it before any more forward progress was allowed.
(Later, I started using "FIXME" to say "this is an unknown in the
spec I'll have to experiment with neverlater" and not "this
code is incomplete or buggy"...I confess this is weasel talk, but I let
it slide.)
As I started building an HLSL compiler into the project, I stopped working with this philosophy. It was too enormous an effort, too many moving parts, and too much to learn on-the-fly. In all honestly, slamming down code and making progress is fun and refactoring is boring fuckwork.
And then forgot I stopped working with this philosophy when I abandoned the project for several years.
When I went to copy/paste this as a foundation for the SDL Shading Language compiler, I discovered that this was a giant mistake on my part. There's a lot of technical debt to deal with on something I just intended to simply slot in and go.
I threw a lot of it out and started over, to be honest. Learn from my mistakes.