AI WebLink

Blog/Published 2026-08-24

DeepSeek: prove it, then implement — empty and timeout first

Ask for invariants and failing cases before any function body, so the draft cannot “run” on a false premise.

“Write a parser” will still get you code, and it will pass the happy path in your head. Incidents live in empty strings, timeouts, and half-frames.

I split the chat. Round one bans a function body: input set, invariants, at least three failing cases. Round two may implement, and must cite those cases first.

Accepting round one

Copy the cases into a note. If round two misses one, the implementation failed — not the cases.

  1. Empty, whitespace-only, and oversized must appear.
  2. Failing cases are “input → expected error,” not “handle it well.”
  3. If it starts coding, stop it and restate the ban.

Round two belongs in an editor

Paste into Cursor or your IDE and run the real cases. “I considered the edges” in chat does not count.

Company logs still follow policy. Cheap tokens are not a permit.

Related reviews

Related tutorials

DeepSeek: prove it, then implement — empty and timeout first | AI WebLink