Pattern
A pattern is a reusable, well-documented solution to a problem that recurs in a particular context, generalized enough to be reapplied across many specific instances of that problem rather than solving it once. Recording a pattern captures not just the solution but the trade-offs behind it, so it can be recognized and reused by others facing the same problem.
In software, the term most often refers to a design pattern — a proven solution to a recurring problem in object-oriented design, at the level of classes and their collaborations — or an architectural pattern, the equivalent at the level of a whole system’s structure. The same underlying idea, a named and reusable solution with known trade-offs, recurs at other scales too, from idioms at the level of a single line of code to anti-patterns, which document a commonly reached-for solution that turns out to cause more problems than it solves.