Site Tools


swe:prototype

Table of Contents

Prototype

Prototype is a preliminary version of a system built to explore design, validate an assumption, or demonstrate feasibility. It is intentionally incomplete and not intended for production. The goal is reducing uncertainty before committing to a full implementation.

Throwaway prototypes are built quickly and discarded after answering a question. Evolutionary prototypes are refined iteratively into the final product. The risk with evolutionary prototypes is that speed-built code accumulates technical debt, and “we'll clean it up later” never happens, leaving a production system built on prototype foundations.

Stakeholders often mistake polished prototypes for finished products and demand shipping them. Make prototypes obviously provisional: rough UIs, hardcoded data, visible TODOs. Related concept: Spike solution from Extreme programming.

This example shows a throwaway prototype with obvious markers (DEMO label, TODO comments, mock data) to signal it's not production code.

// Throwaway prototype: obviously unfinished
function DemoCheckout() {
  // TODO: Replace with real API
  const mockCart = [
    { id: 1, name: "Widget", price: 10 },
    { id: 2, name: "Gadget", price: 20 }
  ];
  const total = mockCart.reduce((sum, item) => sum + item.price, 0);
  return <div>DEMO Total: ${total} [NOT REAL]</div>;
}
swe/prototype.md · Last modified: by 127.0.0.1