Anti-pattern

From LordMattWiki

Jump to: navigation, search
This article started life at the wikipedia but has been branched for our use here. It may or maynot contain any original materia and you are directed to the wikipedia for the original.
This is page has an elephant in the room. It uses two or more sets of jargon to cover one set of topics. Jargon unification details: This page has become a mess with the push for categories and the push for short by design entries tripping over each other.

Anti-patterns, also referred to as pitfalls, are classes of commonly-reinvented bad solutions to problems. They are studied, as a category, in order that they may be avoided in the future, and that instances of them may be recognized when investigating non-working systems.

The term originates in computer science, apparently inspired by the Gang of Four's Design Patterns book, which laid out examples of good programming practice. The authors termed these good methods "design patterns", by analogy with the term as used in architecture. "Anti-patterns", as described in the book by Brown, Malveau, McCormick and Mowbray, are a natural counterpart, though not mentioned in the original Design Patterns book. Part of good programming practice is the avoidance of anti-patterns.

The concept is readily applied to engineering in general, and also applies outside engineering, in any human endeavour. Although the term is not commonly used outside engineering, the concept is quite universal.

The final irony is the AntiPattern-AniPattern whereby the quest for a "deffinitive" leads to endless debate of the "is this a subset of that" nature. The result is caused by the Design by commitee anti-pattern but the final "war" will never end. As far as The Elephant Hunt is concerned any Anti-Pattern that is common or self explanitory will do. Remember KISS.

Contents

[edit] Some recognised software development anti-patterns

For a more comprehensive, alphabetical list, see Category:Anti-patterns.

[edit] Project management anti-patterns

  • Smoke and mirrors: Demonstrating how unimplemented functions will appear
  • Software bloat: Allowing successive versions of a system to demand ever more resources

[edit] Design anti-patterns

[edit] Object-oriented design anti-patterns

AKA OOD Abuse.

[edit] Programming anti-patterns

  • Accidental complexity: Introducing unnecessary complexity into a solution
  • Action at a distance: Unexpected interaction between widely separated parts of a system
  • Accumulate and fire: Setting parameters for subroutines in a collection of global variables
  • Blind faith: Lack of checking of (a) the correctness of a bug fix or (b) the result of a subroutine
  • Boat anchor: Retaining a part of a system that no longer has any use
  • Busy spin: Consuming CPU while waiting for something to happen, usually by repeated checking instead of proper messaging
  • Caching failure: Forgetting to reset an error flag when an error has been corrected
  • Category:Code momentum: Over-constraining part of a system by repeatedly assuming things about it in other parts
  • Category:Coding by exception: Adding new code to handle each special case as it is recognised
  • Double-checked locking: Checking, before locking, if this is necessary in a way which may fail with e.g. modern hardware or compilers.
  • Category:Hard code: Embedding assumptions about the environment of a system at many points in its implementation
  • Lava flow: Retaining undesirable (redundant or low-quality) code because removing it is too expensive or has unpredictable consequences
  • Category:Magic numbers: Including unexplained numbers in algorithms
  • Category:Packratting: Consuming excess memory by keeping dynamically allocated objects alive for longer than they are needed
  • Category:Spaghetti code: Systems whose structure is barely comprehensible, especially because of misuse of code structures
  • Category:Superboolean logic: unnecessary comparison or abstraction of boolean arithmetic

[edit] Methodological anti-patterns

[edit] Configuration management anti-patterns

[edit] Some organisational anti-patterns

[edit] See also

[edit] External links

Personal tools