An anti-pattern is a behavior or practice that is common despite being ineffective or counterproductive.
29
votes
7answers
1k views
Code maintenance: keeping a bad pattern when extending new code for being consistent, or not?
I have to extend an existing module of a project. I don't like the way it has been done (lots of anti-pattern involved, like copy/pasted code). I don't want to perform a complete refactor for many ...
95
votes
65answers
8k views
Which things instantly ring alarm bells when looking at code? [closed]
I attended a software craftsmanship event a couple of weeks ago and one of the comments made was "I'm sure we all recognize bad code when we see it" and everyone nodded sagely without further ...
25
votes
8answers
8k views
Is ORM an Anti-Pattern? [closed]
I had a very stimulating and interessting discussion with a colleague about ORM and its pros and cons. In my opinion, an ORM is useful only in the rarest cases. At least in my experience.
But I don't ...
33
votes
9answers
5k views
So Singletons are bad, then what?
There has been a lot of discussion lately about the problems with using (and overusing) Singletons. I've been one of those people earlier in my career too. I can see what the problem is now, and yet, ...
25
votes
8answers
1k views
What to do about “Failure Driven Development”?
At our shop, we strive to be agile. And I'd say we are making great strides. That said, a few of us have spotted a pattern we have started calling "Failure Driven Development".
Failure Driven ...
8
votes
1answer
311 views
When is a glue or management class doing too much?
I'm prone to building centralized classes that manage the other classes in my designs. It doesn't store everything itself, but most data requests would go to the "manager" first. While looking at an ...
23
votes
10answers
2k views
What naming anti-patterns exist? [closed]
There are some names, where if you find yourself reaching for those names, you know you've already messed something up.
For example:
XxxManager
This is bad because a class should describe what the ...
21
votes
10answers
2k views
How many are too many interfaces on a class?
I would probably consider it a code smell or even an anti-pattern to have a class that implements 23 interfaces. If it is indeed an anti-pattern, what would you call it? Or is it simply just not ...
11
votes
26answers
2k views
The worst anti-patterns you have came across [closed]
What are the worst anti-patterns you have came across in your career as a programmer?
I'm mostly involved in java, although it is probably language-independent.
I think the worst of it is what I ...