May 20, 2026
In 2009, inside a dim conference room at 300 S Riverside, a small group of engineers gathered for a peer-led technical session that would leave a lasting impression on my career. The speaker was my longtime colleague, Nick Petrovits, who was presenting on a concept popularized by the Carnegie Mellon Software Engineering Institute: the theory of "Throw-Away Code."
The core of Nick’s argument was that the first iteration of any technical asset—be it architecture, source code, test suites, or documentation—should never be considered the final product. While many of us intuitively understood that initial versions are often flawed, framing the "scrap and rebuild" approach as a deliberate, planned practice felt revolutionary.
During the Q&A, Nick posed a fundamental question to the room: "When you have the opportunity to rebuild from scratch, how many of you change something foundational?"
Every hand in the room went up. We all recognized the value of the "second try," yet we were quickly grounded by a harsh reality. When I asked how we could possibly convince stakeholders to pay for us to "build it twice," the room fell silent. At that time, the economics simply didn't work. A senior engineer spending a week on a prototype only to discard it represented a significant financial write-off that no budget meeting could justify. The theory was sound, but the business case was non-existent.
Fast forward nearly two decades to the present day. In a recent discussion, a peer asked me a blunt question: "Do you actually use all the AI-generated code you produce?"
The answer is a resounding no. In fact, I have found myself unintentionally practicing the very "throw-away" philosophy Nick championed in 2009. I frequently prompt a model to generate a complex block of code, and while that is processing, I am already refining the prompt to run a better version elsewhere. I often discard the majority of the initial output.
However, the reason for discarding this code has shifted. It isn't necessarily because the code is "bad," but because the cost of reaching a superior version has fundamentally changed:
The true power of AI in the 2026 engineering landscape isn't about replacing the engineer or achieving "perfect" code on the first attempt. Its greatest value lies in de-risking the pursuit of excellence.
By lowering the cost of failure to near zero, these tools allow us to explore multiple architectural paths and "throw away" the good to find the great. We are no longer burdened by the sunk-cost fallacy of manual labor. In essence, we aren't just generating code; we are inventing time.