My workflow is :
Step one: write down a bunch of nonsense, massive block comments of old code in case the new code is worse, and cludges in one massive file.
Step two: rewrite the whole thing: breaking it down into classes so it's readable and maintainable ...
Step 3: come back later and wonder where the hell anything is. Go to step 1