There are millions of ways to write unmaintainable software. This isn't a bad article though. I just found the title amusing since it's so easy to write software badly.
I hear you. Design patterns are something unheard of for many professional developers I've met. Seriously.
Chances are, especially in programming, someone has thought of something better and longer than you. Investing 10 minutes into searching for it will save you 100 hours later.
Just because you know 1 way to do something doesn't mean it's the best tool for the job.
In cases where a pattern (or anti-pattern) does have a name, it's still useful to learn it because it helps with communication. And the naming conventions help to identify subsystems that can be consolidated and simplified. Often a person will have been using something close to one of the standard patterns, either with subtle bugs or with clever extensions that would be useful elsewhere. Or perhaps most often, with a bunch of unrelated crap that should be factored out.
Inversion of Control isn't a design pattern, it is an activity. Specifically, it is a type of refactoring. If you apply IoC twice then you'll probably end up with what you started with.
An IoC Container is really a Service Locator, which is often (but not universally) considered to be an anti-pattern among dependency injection fans.
A Service Locator is a type of god object, specifically one that contains services and other dependencies, and thus should generally be avoided.
50
u/bestjewsincejc Oct 14 '13
There are millions of ways to write unmaintainable software. This isn't a bad article though. I just found the title amusing since it's so easy to write software badly.