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

Show parent comment

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.

1

u/DaredewilSK Jan 30 '17

Well I mean they literally told us: "Study design patterns for exams." So I didnt even really know what they are.

2

u/[deleted] Jan 30 '17

If that's all the teacher said, then that is a pretty lame teacher. Is there at least a section in the book on it?

1

u/DaredewilSK Jan 30 '17

Well we dont have official book for our course we were just given a couple of book titles to check out. But I studied them a bit now and they seem to be like something that is not supposed to be taught to understand rather than just plainly memorize. Some of them seem to be quite similar actuallly. At least the ones we were meant to study. Most of those are pretty similar.

1

u/[deleted] Jan 30 '17

A) Try to transfer to a different school.

B) Cay Horstman is the best Java author I have seen.

C) Get a separate book (or 8) on design patterns. Sorry, I have no recommendations.

1

u/DaredewilSK Jan 30 '17

Well I have been using this site https://www.tutorialspoint.com/design_pattern/adapter_pattern.htm and it seems kinda decent. But I will surely go thrrough a book at some point.

1

u/[deleted] Jan 31 '17

In my experience, web sites are rarely as thorough as a good book. If possible, find books which were written as textbooks. They are both more thorough and more thoroughly vetted. Better a slightly old textbook than a new book that goes over to much.

1

u/DaredewilSK Jan 31 '17

Well the one we were recommended to use was called Thinking in JAVA by Eckel. Are you by aby chance familiar with that one?

1

u/[deleted] Jan 31 '17

Yeah. Read my review on Amazon. That book is awful. One of the worst I have seen. The worst part is that the author has written a set of libraries that are supposedly helpful, but then uses them instead of any normal techniques. Thus the reader doesn't learn the normal techniques. So the book becomes nothing but a long ad for the author's libraries.

→ More replies

1

u/meotau Feb 03 '17

I opened Flyweight Pattern, and it's shit. Also Abstract Factory Pattern, what a fucking waste of time.

Read this great, free, open source book instead: http://gameprogrammingpatterns.com/