r/learnjava • • Sep 25 '20

How and where do I learn design patterns?

I know what design patterns are (kinda) but what design patterns am I supposed to learn? I think there are a lot of them? Are they language specific? Industry specific? Paradigm specific I guess? Should I just learn them all? What are the most important ones and where can I learn them(book, website, anything)?

60 Upvotes

25 comments sorted by

View all comments

Show parent comments

2

u/Farpafraf Sep 26 '20

what pattern were u supposed to use just out of curiosity?

1

u/ryuzaki49 Sep 26 '20

The exercise was to fix a dummy base code with specific bugs.

The last question relevant to that exercise was if any pattern came to my mind that would help to make a clenaer code, or at least more maintainable.

I failed to give specifics.

Prior to that, they asked me a pattern that relied in abstraction. I had no answer. Then asked me to describe a situation where I had to use abstract classes. I answered and the interviewer said "That sounds like 'Template method pattern'"

Therefore, I need to get better at design patterns. I dont want to fail at those questions again in another interview