Jump to text
On this page
Copy and source
Published source confirmed at last check

Source changed 2026-11-26 21:07:53 UTC · snapshot created 2026-11-26 21:08:36 UTC · last check 2026-11-29 22:55:15 UTC

CMP.11:8 - Common Anti-Patterns and How to Avoid Them

Tempting moveFailureUseful repair
Generalize from a slow implementationAnother algorithm may avoid its work.Prove a requirement for every admitted transcript or procedure.
Count distinct inputs or check only pairs with a common choiceSeveral inputs may share an output, and different pairs may rely on different outputs.Test whether the whole group can accept one answer. Use counting when the required outputs really are distinct.
Supply an inconsistent adversaryNo admitted input could produce its replies.Retain a nonempty compatible input family.
Fix randomness, then choose a different hard input for each seedThis can miss a successful randomized algorithm.Use one prior input distribution or a valid coupled argument.
Ignore input-dependent preprocessing or stronger accessThe algorithm already acquired the supposedly missing information.Charge or expose that resource and restate the model.