At work, there's this particular wonderful project I'm working on where I've been stuck in the design phase (due to external resource constraints) for some time. Since it looks like forward progress will be made in the next day or two, I decided to work all day on actually implementing the first set of changes that I want to make so they'll be ready to test when those resources become available.
Even though I've been planning this for months, and consequently have a document two pages long (in tiny type) full of detailed changes I wanted to make, now that I have the chance to turn them into code, I could not make it go. Grr.
My Muse wanted nothing to do with separating the two state machines, or fixing the parser. No. It wanted to micro-optimize the code. Because if you're going to program, obviously you should optimize, then debug, and only then make sure the code does what you want. Right? :-/
On the other hand, I did eliminate 150-250 bytes and 3 branches from the per-connection path, and 40 bytes and 1 branch from the per-packet code, at the same time as I fixed 4 bugs. So there is an upside.