AlgoViz

Coding with an AI assistant: spec → generate → verify

medium 14 min

An AI assistant writes code fast, but it stops when the code looks done, not when it is done.

Verify generated code against its spec

Read it, run it, change a line and run it again.

Loading editor…

The function below is the kind of code an assistant produces: tidy, plausible, and wrong at the edges. The spec-driven checks find the bugs.