Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Has using an acknowledged anti-pattern ever been proven to actually solve a problem, or be beneficial in any other way? [closed]

Has using an acknowledged anti-pattern ever been proven to actually work in a certain specific case? Did you ever solve a problem or gain any kind of benefit in one of your projects by using an anti-pattern?

like image 866
luvieere Avatar asked Dec 04 '09 15:12

luvieere


2 Answers

My understanding of the "anti-pattern" concept is that it encompasses solutions that have drawbacks that only reveal themselves over the long term. Indeed, the primary danger associated with a lot of them---like writing spaghetti code with loads of global variables and gotos every which way, or tossing exceptions into the black hole of an empty catch block---is that they're seductive because they provide an expedient solution to an immediate problem.

EDIT to add: Because of that, sometimes you do derive benefit from these anti-patterns. Sometimes your calculation that you're writing throwaway code that no one will touch again is dead wrong and you wind up with maintenance programmers slandering your heritage and sexual hygiene, but other times you're right and that crummy shell script that's held together with baling wire and spit does the job you intended it to do and is then blessedly forgotten, saving you the considerable time and effort of putting together something decent.

like image 145
Pillsy Avatar answered Oct 13 '22 02:10

Pillsy


Anti-Patterns are still so widely around just because they solve a particular problem (while creating 10 new ones). Also known as workaround. But how do they say? Nothing lasts longer than a makeshift.

In fact I believe we'd all be jobless if things had been done right from the beginning.

like image 6
herzmeister Avatar answered Oct 13 '22 02:10

herzmeister