CoursesGalaxy Courses Subscription Knowledge Hub
Knowledge Hub
Design Patterns

Antipatterns : Learn Software AntiPatterns to avoid and refactor negative solutions

What are AntiPatterns?

AntiPatterns are commonly occurring solutions to problems that create more problem than what they solve. It's a wonderful concept which identifies the solution of problem that generates more problem, tells how to avoid them or to solve if they are already existing.

If you see the software industry - big number of projects fail, get delayed and lot of existing ones require huge amount of rework. These works provide great insight about what were the solutions that repeatedly failed, what can be done to make them work and how to avoid them.

In fact, their repeated use tells that they were thought to fit a good solution but ultimately ended up with providing bad result and creating more problems, instead of benefiting and solving the problem.

AntiPatterns Example

For example Cut and Paste programming may be considered fast solution for many problems in development but in reality it creates more problems than what it solves as many times context and scenario will not be clear for the copied source which we want to use for development.

It tells how not to solve a problem as it may lead to problems, you may be tempted to use it as you see them as repeated solution but actually they are bad practices.

AntiPatterns are bad practices

If they are related to programming - then they are considered bad programming practices, If they are related to design - then they are considered bad design practices. If they are related to architecture - then they are considered bad architecture practices, and if they are related to management - then they are considered bad management practices.

History/Origin of AntiPatterns

An Architect named Christopher Alexander observed designs of several buildings and towns, and discovered that there were many common architectural aspects that were used to solve similar problems. He identified such common solutions and called them patterns.

In 1990's Alexander's idea of patterns was applied to software design and design patterns were first documented in the book.

Design patterns book Elements Of Reusable Object-Oriented Software By Eric Gamma, Richard Helm, Ralph Johnson, John Vissides. These authors are commonly known as "Gang Of Four". Authors of this book identified several patterns that were present in different software systems and named them.

Lot of design patterns came for reusable design. It is wonderful to have more and more literature on design patterns but that requires better evaluation too. If not evaluated well then their solution may not work for different scenarios or for future requirement.

In 1996, there was a presentation by Michael Akroyd - "AntiPatterns: Vaccinations against Object Misuse". His presentation emphasized harmful software constructs found out in multiple software projects.

The similar work was done by multiple people - Fred Brooks, Bruce Webster, James Coplien and Andrew Koenig on providing software guidance based on identifying dysfunctional behavior and refactoring a solution.

Actually there is contribution from lot many people as it was next obvious step from design pattern. It is important that solutions are evaluated for different scenarios and their inappropriate behavior is documented and obviously the appropriate solution is suggested for their inappropriate behavior.

Why study AntiPatterns

Provides understanding of variety of common solutions, existing problems and way of correction.

AntiPatterns are commonly occurring solutions to problems that create more problem than what they solve. They have been found out from already existing solutions in software industry. This provides great insight of real applications, what are the common solutions which create negative consequences. So it gives idea of what can go wrong with solutions which were thought a good fit for a problem. This helps us to avoid the solutions which can create more problems. AntiPatterns also tell us how the existing problem can be corrected, so the existing solution can be addressed appropriately.

Well informed about Bad practices

It is always good to know the best practices, so that they can be used for better design, coding, documentation, architecture, communication and management of project.

Similarly it will be good to be well informed about bad practices, so that it can be always avoided and corrected for better solution. Clarity of problem is well known to all, so can be easily communicated and will be addressed by all stakeholders - developer, architect, management.

Common Vocabulary

AntiPatterns provide a common vocabulary that can be used easily by development, architecture and management for project. A developer/architect or manager can just use the AntiPatterns common terminology to avoid the full detail of AntiPatterns. They can use the AntiPattern name when they have to do the documentation. They can mention it when they have to explain about existing problem and available solution. This makes sure that all have better communication tool for understanding of problem and solution.

Better understanding in organization

There are problems which may at one level but have to be addressed by another level. There may be problem in development but has to be addressed by architect or Manager.

Similarly manager may have some problem to address but actually it will be addressed in development or architecture area. Good understanding of AntiPatterns makes sure that there is more awareness about problem and solution to all stakeholder of project in organization. So everyone - developer, architect and manager can focus together on problem and solution, and working together will take the project towards success.

Classification of AntiPatterns

We can classify AntiPattern in 3 categories-
Development AntiPatterns
Architecture AntiPatterns
Management AntiPatterns

AntiPatterns Classification

There are others too like Configuration Management, Organization but AntiPatterns enthusiast are mainly focused in these three only.

The Catalog of AntiPatterns - Software Development

This is the catalog of Development AntiPattern. Here the names in blue are Mini-AntiPattern.

Catalog of AntiPatterns - Software Development

There are many more but these patterns are widely identified.

The Catalog of AntiPatterns - Software Architecture

This is the catalog of Architecture AntiPattern. Here the names in blue are Mini-AntiPattern.

Catalog of AntiPatterns - Software Architecture

There are many more but these patterns are widely identified.

The Catalog of AntiPatterns - Project Management

This is the catalog of Management AntiPattern. Here the names in blue are Mini-AntiPattern.

Catalog of AntiPatterns - Project Management

There are many more but these patterns are widely identified.

Suresh Kumar Srivastava is founder of online learning site and author of popular books "C In Depth", "Data Structures Through C In Depth". He has 18+ years experience in industry and worked on architecture and design of multiple products. This article is from his course on AntiPattern.

Yearly Subscription

AntiPatterns Development

make and Makefile




Knowledge Hub

Design Patterns

Tech Articles

About Us


Contact Us


CourseGalaxy is focused on transformation of Engineering graduate to Software Engineer to fill the gap between education and industry and provide the training on specific problems of industry to enhance the skills of Engineers in industry to do their job appropriately.

Learn From Us

2018 CourseGalaxy