Top "Anti-patterns" questions

A programming anti-pattern is a commonly used solution to a specific programming problem, often claiming being an actual design pattern.

Why is "element.innerHTML+=" bad code?

I have been told not to append stuff using element.innerHTML += ... like this: var str = "<div>hello world&…

javascript html innerhtml anti-patterns
Unit testing Anti-patterns catalogue

anti-pattern : there must be at least two key elements present to formally distinguish an actual anti-pattern from a simple bad …

unit-testing tdd anti-patterns
C# Antipatterns

To cut a long story short: I find the Java antipatterns an indispensable resource. For beginners as much as for …

c# anti-patterns
Error codes within exception vs exceptions hierarchy

Do you think it is ok to use error codes within exception to specify error type? Please take a look …

java exception anti-patterns error-code
Is ServiceLocator an anti-pattern?

Recently I've read Mark Seemann's article about Service Locator anti-pattern. Author points out two main reasons why ServiceLocator is an …

design-patterns dependency-injection anti-patterns service-locator
Singleton in go

How does one implement the Singleton design pattern in the go programming language?

design-patterns go singleton anti-patterns
What to do about a 11000 lines C++ source file?

So we have this huge (is 11000 lines huge?) mainmodule.cpp source file in our project and every time I have …

c++ version-control maintenance anti-patterns
Are subversion externals an antipattern?

Subversion lets you embed working copies of other repositories using externals, allowing easy version control of third-party library software in …

svn version-control anti-patterns svn-externals
Design patterns to avoid

A lot of people seem to agree, that the Singleton pattern has a number of drawbacks and some even suggest …

design-patterns anti-patterns
How do you refactor a God class?

Does anyone know the best way to refactor a God-object? Its not as simple as breaking it into a number …

class refactoring anti-patterns god-object