Boilerplate
Noun · Development
Definitions
Sections of code that are repeated in multiple places with little or no variation, typically required by the language, framework, or convention but adding no unique logic. Also: a template project used as a starting point.
In plain English: Repetitive, standard code that you have to write even though it's the same every time — like the headers and footers of a legal document.
The term originates from the printing industry, where 'boilerplate' was text cast in metal plates for reuse across newspapers. In legal contracts, boilerplate clauses are standard terms copied between agreements — same concept of reusable, unchanging text.
Example: 'Create-React-App was great boilerplate in 2018. Now most teams use Vite or Next.js templates instead.'
Source: etymology / template usage
Etymology
- 1890s
- Newspaper syndicates distribute pre-set text on steel 'boiler plates' — local papers couldn't edit them, so the term came to mean standard, reusable text
- 1970s
- Programmers adopt 'boilerplate' for repetitive code that must be included but carries no unique logic
- 2010s
- Project generators (create-react-app, yeoman) and templates reduce boilerplate, though debates about how much is too much never end
Origin Story
Steel plates, newspaper syndicates, and code you copy-paste
In the early days of American newspapers, syndicated content was distributed to small-town papers as pre-set metal printing plates. These plates resembled the thick steel sheets used to build **boilers**, so printers called them "boilerplate." The content was generic, reusable, and couldn't be edited — you took it as-is.
Lawyers adopted the term for standardized contract clauses that appear in every agreement without modification. Programmers inherited it from there: **boilerplate code** is the repetitive, structural code required to get a project running before you write anything interesting. Think `public static void main(String[] args)` in Java, or the import/export ceremony in many frameworks.
The term carries a mild negative connotation — boilerplate is necessary but tedious, the bureaucratic overhead of getting to the good stuff. Modern tools like project scaffolders, code generators, and framework CLIs exist largely to automate boilerplate generation, proving that the annoyance is universal.
Coined by: Newspaper printing industry
Context: American newspaper syndication, 1890s; programming adoption, 1960s
Fun fact: The Go programming language was explicitly designed to minimize boilerplate. Its creators at Google were frustrated by the ceremony required in C++ and Java. Ironically, Go's error handling (`if err != nil`) is now considered boilerplate itself.