3 ms·
Over-engineered code is frustrating to read and work with. If your project doesn't require classes then it's fine to not create a bunch of complexity with OO s
by jakejake 15y ago
Over-engineered code is frustrating to read and work with. If your project doesn't require classes then it's fine to not create a bunch of complexity with OO style and design patterns. But if you just dismiss the techniques because they're difficult or you don't want to spend time learning, then you're likely to re-invent the wheel over and over.
- aroberge 15y agoThat's not what the video was about at all. The speaker never implied to use an approach that would lead to reinvent the wheel over and over ... quite the contrary in fact.
- jakejake 15y agoWell, his message I think is easily translated into "classes suck - never use them" by those who may choose read into it that way. He also dismisses a few rather basic design patters as basically jokes (literally with laughs from the audience as if these ideas are idiotic rather than foundations of software design) without making the distinction that these concepts are actually really important. It's easy for people who are very smart and experienced to dismiss the rules - that applies for all things, not just programming. But if you never learn the basics then you'll stumble over silly things that have be solved by much smarter people.
- aroberge 15y agoStandard design patterns are important ... if you program in Java and similar languages. But many of these are completely unnecessary when using a dynamic language like Python - and many others.
- jakejake 15y agoTo me it's just simply a way to organize code, there's nothing inherently good or bad about classes. You can use or abuse them like anything else. It never hurts to know the basic GoF patterns and when to use them to simplify your code or solve a common problem. You can use them with or without classes. Most Javascript libraries that I look at today use closures, prototypes and anonymous objects that might as well be classes. Patterns seem to be making a huge appearance in client-side code in the last year. I'll admit that I don't know anything about Python, though.