DEV Community

Cover image for Anti-Pattern
Senthil Nayagan
Senthil Nayagan

Posted on

Anti-Pattern

What is an anti-pattern?

The term "anti-pattern" was first used in 1995 by a computer programmer, Andrew Koenig, in an article called "Journal of Object-Oriented Programming."

An antipattern is just like a pattern, except that instead of a solution it gives something that looks superficially like a solution but isn't one. - Andrew Koenig

Anti-patterns in software engineering are a commonly used, simple-to-implement solution to recurring issues that is often inefficient and has the potential of being incredibly counterproductive. It demonstrates how to go from a problem to a bad solution. We just call these bad ideas.

It's important to keep in mind that identifying bad practices can be as valuable as identifying good practices.

Although they first seem to be quick and reasonable, anti-patterns typically have adverse effects in the future. We will eventually come to understand that anti-pattern results in more negative outcomes than positive ones.

A well formulated anti-pattern reveals us:

  • Why does the poor solution seem appealing?
  • Why it ends up being bad?
  • What best patterns are available to replace it?

The issue that the anti-pattern is attempting to solve already has a better alternative solution in place that is proven to be effective in contrast to the anti-pattern.

Keep in mind that the same solution act as both a pattern and an anti-pattern depending on the situation.

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay