Skip to content

Comment on Codeacademy for competent programmers?parent

Comments

You can get that out of the Gang of Four book.

The problem is that until you're faced with a real-world software system with real-world problems - and in particular, faced with the consequences of your misuse - you'll be tempted to use them in places where they're not the best solution. It's one thing to read something in a textbook. It's another thing to wrestle with a million-line codebase and try to make sense of it.

Singletons, for instance, almost always turn out to be an antipattern in the long run. You're better off injecting your dependencies explicitly, even if you only think there is one in the whole program. Delegation is used all the time, but can also be overused, and it's important to know when you're better off modifying the original class rather than trying to wrap it with something else.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.