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.

Any reason not to use '+' to concatenate two strings?

A common antipattern in Python is to concatenate a sequence of strings using + in a loop. This is bad because …

python string-concatenation anti-patterns
Singleton with Arguments in Java

I was reading the Singleton article on Wikipedia and I came across this example: public class Singleton { // Private constructor prevents …

java oop singleton anti-patterns
How to block users from closing a window in Javascript?

Is it possible to block users from closing the window using the exit button [X]? I am actually providing a …

javascript dom-events anti-patterns
What are the most common SQL anti-patterns?

All of us who work with relational databases have learned (or are learning) that SQL is different. Eliciting the desired …

sql anti-patterns
What is an anti-pattern?

I am studying patterns and anti-patterns. I have a clear idea about patterns, but I don't get anti-patterns. Definitions from …

design-patterns terminology anti-patterns ooad
Why is Singleton considered an anti-pattern?

Possible Duplicate: What is so bad about Singletons? Singleton Design Pattern: Pitfalls Singleton anti-pattern I've heard recently that Singleton is …

design-patterns anti-patterns
What is the most EVIL code you have ever seen in a production enterprise environment?

What is the most evil or dangerous code fragment you have ever seen in a production environment at a company? …

anti-patterns
Why are data transfer objects (DTOs) an anti-pattern?

I've recently overheard people saying that data transfer objects (DTOs) are an anti-pattern. Why? What are the alternatives?

java ejb dto anti-patterns data-transfer-objects
Why is "log and throw" considered an anti-pattern?

This question was sparked by a discussion around this article, where I did not receive any good answers. Why should …

logging exception-handling anti-patterns
What is spaghetti code?

Can you post a short example of real, overdone spaghetti code, possibly saying what it does? Can you show me …

terminology anti-patterns