# Rule of Three

*noun*

say it: **“ROOL uv THREE”** **/rul əv θri/**

The advice to wait for the third copy of a solution before pulling out its shared shape: once is code, twice is a coincidence, three times is a pattern.

## What is the **rule of three**?

The **rule of three** says to wait for the third copy of a solution before pulling out its shared shape: two copies don't yet show which parts really vary, and three usually do. Three near-identical importers are the moment to write their shared steps once.

## In a sentence

- “Following the **rule of three**, the team waited for the third importer, then wrote the shared steps once.”

Level: Journeyman · [More Software Development terms at this level](https://www.ask-codey.com/glossary?category=software-development&level=3)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/rule-of-three
