wordfor

Ches·ter·ton's fence

/ˈtʃɛs.tər.tənz ˌfɛns/ (CHES-ter-tunz fens) noun

Programmer folklore

  1. Do not remove something until you understand why it was put there. The 'useless' sleep(50) turned out to work around a vendor API rate limit.

Origin

After G. K. Chesterton, who described a reformer and a fence across a road in The Thing (1929).

In practice

Read the blame, the commit message and the linked ticket before deleting odd code. If the reason holds, write it in a comment.

Say to your AI

Before removing this check, use the git history to find out why it was added, and tell me whether that reason still applies.

In plain words

  • remove code we don't understand
  • why is this here
  • this check looks pointless, delete it

See also technical debt load-bearing cargo cult programming

Find similar words