Throwaway code is a feature
Two months into building solo, my most productive habit is one that would have gotten me a stern code review comment at any point in the last decade: I write code specifically to delete it.
Software culture inherited a deep instinct from the era when code was expensive: code is an asset, deletion is waste. We invented a whole vocabulary of guilt around it — "we'll have to rewrite this later" said in the same tone as "we'll have to repaint the hull." That instinct made sense when a working feature represented weeks of human attention. It is now, for a growing class of code, exactly backwards.
The economics, plainly
When generation is cheap and understanding is expensive, the asset isn't the code — it's what the code taught you. A prototype's entire job is to convert uncertainty into knowledge: does the API paginate sanely, does the latency budget survive translation, does the workflow feel right at real data volumes. Once the knowledge is extracted, the code has been spent, like a lab sample. Keeping it around isn't thrift. It's letting the experiment contaminate the production line.
I now run three or four disposable experiments a week. Each lives in a directory literally named throwaway/, and the name is load-bearing — it's a contract with my future self that nothing in there needs tests, error handling, or dignity. The freedom this buys is hard to overstate. Code written without the burden of a future is fast to write and, more importantly, honest: it answers only the question asked.
The three-question rule
Discipline matters more, not less, when code is cheap — otherwise you drown in half-alive experiments. Mine is a rule of three questions:
- Before writing: what single question does this prototype answer? If I can't phrase it in one sentence, I'm not prototyping, I'm procrastinating with extra steps.
- After running: what did I learn? The answer goes in a running
NOTES.md— five lines, dated. The notes file is the real deliverable; it outlives every prototype. - Before keeping anything: would I write this line the same way for production? If yes, it's allowed to migrate — retyped, not copied. Retyping sounds ceremonial but it's a filter: your hands refuse to retype the shortcuts your eyes were happy to skim.
The prototype is a lab sample. The notebook is the asset.
Where the instinct still holds
None of this applies to interfaces — schemas, APIs, file formats, anything users or other systems grow roots into. Those are still expensive because they're expensive to change, not to write, and no model fixes that. My split is roughly: interfaces get designed like it's 2015, slowly and with fear; everything behind them gets treated as replaceable tissue. The art is in drawing that line, and I'd argue it's becoming the senior-engineer skill: knowing which 10% of the system deserves permanence, and granting the other 90% a cheerful, guilt-free mortality.
Delete more. It's not waste. It's exhaust from an engine that's finally running at full speed.