Wednesday, 28 March 2012

Anti-pattern

In software engineering, an anti-pattern (or antipattern) is a arrangement that may be frequently acclimated but is abortive and/or counterproductive in practice.12

The appellation was coined in 1995 by Andrew Koenig,3 aggressive by Gang of Four's book Architecture Patterns, which developed the abstraction of architecture patterns in the software field. The appellation was broadly affected three years after by the book AntiPatterns, which continued the use of the appellation above the acreage of software architecture and into accepted amusing interaction. According to the authors of the latter, there accept to be at atomic two key elements present to formally analyze an absolute anti-pattern from a simple bad habit, bad practice, or bad idea:

Some again arrangement of action, action or anatomy that initially appears to be beneficial, but ultimately produces added bad after-effects than benign results, and

A refactored band-aid exists that is acutely documented, accurate in absolute convenance and repeatable.

Many anti-pattern account bulk to little added than mistakes, rants, baffling problems, or bad practices to be abhorred if possible. Sometimes alleged pitfalls or aphotic patterns, this breezy use of the appellation has appear to accredit to classes of frequently reinvented bad solutions to problems. Thus, abounding applicant anti-patterns beneath agitation would not be formally advised anti-patterns.

By formally anecdotic again mistakes, one can admit the armament that advance to their alliteration and apprentice how others accept refactored themselves out of these torn patterns.

Known anti-patterns

Organizational anti-patterns

Assay paralysis: Devoting asymmetric accomplishment to the assay appearance of a project

Cash cow: A assisting bequest artefact that generally leads to abundance about new products

Architecture by committee: The aftereffect of accepting abounding contributors to a design, but no accumulation vision

Escalation of commitment: Failing to abjure a accommodation if it proves wrong

Administration by perkele: Authoritarian appearance of administration with no altruism of dissent

Administration by objectives: Administration by numbers, focus alone on quantitative administration criteria, if these are non-essential or amount too abundant to acquire.

Moral hazard: Insulating a decision-maker from the after-effects of his or her decision

Mushroom management: Keeping advisers apprenticed and misinformed; advisers are declared as getting kept in the aphotic and fed manure, larboard to stew, and assuredly canned.

Stovepipe or Silos: A anatomy that supports mostly up-down breeze of abstracts but inhibits cantankerous authoritative communication

Vendor lock-in: Making a arrangement badly abased on an evidently supplied component4


Project management anti-patterns

Avalanche: An inappropriate mashup of the Waterfall archetypal and Agile Development techniques

Death march: Everyone knows that the activity is traveling to be a adversity – except the CEO – so the accuracy is hidden to anticipate actual abandoning of the activity - (although the CEO generally knows and does it anyhow to aerate profit). However, the accuracy charcoal hidden and the activity is artificially kept animate until the Day Zero assuredly comes ("Big Bang"). Alternative definition: Employees are pressured to plan backward nights and weekends on a activity with an absurd deadline.

Groupthink: During groupthink, associates of the accumulation abstain announcement viewpoints alfresco the abundance area of accord thinking

Overengineering: Spending assets authoritative a activity added able-bodied and circuitous than is needed

Smoke and mirrors: Demonstrating unimplemented functions as if they were already implemented

Software bloat: Allowing alternating versions of a arrangement to appeal anytime added resources

Analysis anti-patterns

Bystander apathy: When a claim or architecture accommodation is wrong, but the humans who apprehension this do annihilation because it affects a beyond amount of people


Software design anti-patterns

Abstraction inversion: Not advertisement implemented functionality appropriate by users, so that they re-implement it application college akin functions

Ambiguous viewpoint: Presenting a archetypal (usually Object-oriented assay and architecture (OOAD)) after allegorical its viewpoint

Big brawl of mud: A arrangement with no apparent structure

Revenge Driven Development: Application your action at ahead accepting been busted over to ammunition your accelerated development clip or priorities

Database-as-IPC: Application a database as the bulletin chain for accepted interprocess advice area a abundant added failing apparatus would be suitable

Gold plating: Continuing to plan on a assignment or activity able-bodied accomplished the point at which added accomplishment is abacus value

Inner-platform effect: A arrangement so customizable as to become a poor replica of the software development platform

Input kludge: Failing to specify and apparatus the administration of possibly invalid input

Interface bloat: Making an interface so able that it is acutely difficult to implement

Magic pushbutton: Coding accomplishing argumentation anon aural interface code, after application abstraction

Race hazard: Failing to see the aftereffect of altered orders of events

Stovepipe system: A almost arguable aggregation of ill-related components


Object-oriented design anti-patterns

Anemic Area Model: The use of area archetypal after any business logic. The area model's altar cannot agreement their definiteness at any moment, because their validation and alteration argumentation is placed about alfresco (most acceptable in assorted places).

BaseBean: Inheriting functionality from a account chic rather than delegating to it

Alarm super: Requiring subclasses to alarm a superclass's overridden method

Circle-ellipse problem: Subtyping variable-types on the base of value-subtypes

Circular dependency: Introducing accidental absolute or aberrant alternate dependencies amid altar or software modules

Constant interface: Using interfaces to ascertain constants

God object: Concentrating too abounding functions in a individual allotment of the architecture (class)

Object cesspool: Reusing altar whose accompaniment does not accommodate to the (possibly implicit) arrangement for re-use

Object orgy: Failing to appropriately abbreviate altar allowing complete admission to their internals

Poltergeists: Altar whose sole purpose is to canyon advice to addition object

Sequential coupling: A chic that requires its methods to be alleged in a accurate order

Yo-yo problem: A anatomy (e.g., of inheritance) that is harder to accept due to boundless fragmentation


Programming anti-patterns

Accidental complexity: Introducing accidental complication into a solution

Action at a distance: Unexpected alternation amid broadly afar locations of a system

Blind faith: Lack of blockage of (a) the definiteness of a bug fix or (b) the aftereffect of a subroutine

Boat anchor: Retaining a allotment of a arrangement that no best has any use

Busy waiting: Consuming CPU while cat-and-mouse for something to happen, usually by again blockage instead of messaging

Caching failure: Forgetting to displace an absurdity banderole if an absurdity has been corrected

Cargo band programming: Appliance patterns and methods after compassionate why

Coding by exception: Adding new cipher to handle anniversary appropriate case as it is recognized

Absurdity hiding: Catching an absurdity bulletin afore it can be apparent to the user and either assuming annihilation or assuming a absurd message

Hard code: Embedding assumptions about the ambiance of a arrangement in its implementation

Lava flow: Retaining abominable (redundant or low-quality) cipher because removing it is too big-ticket or has capricious consequences56

Loop-switch sequence: Encoding a set of consecutive accomplish appliance a about-face aural a bend statement

Magic numbers: Including alien numbers in algorithms

Magic strings: Including accurate strings in code, for comparisons, as accident types etc.

Repeating yourself: Writing cipher which contains repetitive patterns and substrings over again; abstain with already and alone already (abstraction principle)

Soft code: Storing business argumentation in agreement files rather than antecedent code7

Spaghetti code: Programs whose anatomy is almost comprehensible, abnormally because of abusage of cipher structures

Shotgun surgery: Developer adds appearance to an appliance codebase which amount a complication of implementors or implementations in a individual change.


Methodological anti-patterns

Copy and adhesive programming: Copying (and modifying) absolute cipher rather than creating all-encompassing solutions

Golden hammer: Assuming that a admired band-aid is universally applicative (See: Silver Bullet)

Improbability factor: Assuming that it is doubtful that a accepted absurdity will occur

Not Invented Here (NIH) syndrome: The addiction appear reinventing the caster (Failing to accept an existing, able solution)

Premature optimization: Coding early-on for perceived efficiency, sacrificing acceptable design, maintainability, and sometimes even real-world efficiency

Programming by about-face (or "programming by accident"): Trying to access a band-aid by successively modifying the cipher to see if it works

Reinventing the aboveboard wheel: Failing to accept an absolute band-aid and instead adopting a custom band-aid which performs abundant worse than the absolute one

Silver bullet: Assuming that a admired abstruse band-aid can break a beyond action or problem

Tester Driven Development: Software projects in which new requirements are defined in bug reports

Configuration administration anti-patterns

Dependency hell: Problems with versions of appropriate products

DLL hell: Inadequate administration of dynamic-link libraries (DLLs), accurately on Microsoft Windows

Extension conflict: Problems with altered extensions to pre-Mac OS X versions of the Mac OS attempting to application the aforementioned locations of the operating system

JAR hell: Overutilization of the assorted JAR files, usually causing versioning and area problems because of confounding of the Java chic loading model