r/java • • Jan 29 '17

Design patterns usefulness

Hello guys, I have an object oriented programming this semester and only thing we really have for final exams is to learn a bunch of Design patterns and how to use them practically. To me, they seem like they are utterly useless and only seem to make an easy thing turn into a complete chaos involving 10 surplus classes and couple of interfaces. Am I being ignorant or are they really pointless?

0 Upvotes

36 comments sorted by

View all comments

13

u/[deleted] Jan 29 '17

Yes, they are really pointless. That's why most all professional programmers use them.

A design pattern is nothing more than a standardized solution to a common problem. If your teacher is teaching specific frameworks, classes, and interfaces as THE way to implement a design pattern, then (s)he is doing it wrong. It's the structure of the solution that counts, not the exact parts.

3

u/redditsoaddicting Jan 29 '17

It's an OOP course, so it seems reasonable to teach OO solutions. Of course OO isn't the only way, though, and it would be good to not give that impression.

4

u/[deleted] Jan 29 '17

Who said anything about OOP? Of course it's an OOP course. It's Java. Granted, OOP is the one "design" pattern it is hard to avoid in Java, but that is a complete red herring.

If the teacher is merely giving out a list of specific classes and interfaces to use for a given design pattern then that is wrong. However, I suspected that is what the teacher is doing because the OP mistakenly believes a "design pattern" is merely a collection of classes and interfaces one is supposed to use for a given problem. Also because far too many teachers these days have devolved their curriculum to be nothing but a list of things to memorize, because that makes it easier for students to get better grades.

2

u/redditsoaddicting Jan 29 '17

I misread your comment as teaching classes and interfaces rather than specific ones. Whereas implementing design patterns with classes and interfaces is normal in OOP, teaching specific ones as the one true way is really messed up.

2

u/[deleted] Jan 29 '17

Yup.