A pattern (design pattern) in software development, is a repetitive architectural solution to a common problem, which often arises within a design context.
Typically, a pattern is not a complete template that can be directly converted to code. Rather, it is just a fragment of the design, which can be used as a sample for creating similar constructions on different program areas.
Object-oriented patterns show the relationships and interactions between classes or objects, without defining which end classes or application objects will be used.
"Low-level" patterns, which take into account the specifics of a particular programming language, are called idioms. These are good design solutions specific to a particular language or software platform, and therefore are not universal.
At the highest level, there are architectural patterns that cover the architecture of the entire software system.
Algorithms are also inherently computing templates, because they solve developmental problems.
In comparison with fully independent design, patterns have several advantages. The main benefit of using templates is to reduce development complexity by ready-made abstractions that solve a whole class of problems.
Although a slight change in code under a well-known pattern can simplify the understanding of code, according to Steve McConnell two difficulties can be associated with the use of templates.