• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Should mastering a language come before design patterns?

 
Ranch Hand
Posts: 38
Android Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi folks!

I have a kind of "organisation" in how I learn software development. At the moment, I am trying to learn absolutely everything I can about Java, while also developing some Android stuff on the side.

I want to go far beyond my current level of knowledge, and have begun back at the basics with Head First Java to ensure that my fundamentals are 100% solid. After this, I plan to move onto Head First Android Development because, in all honesty, I find developing Android apps to be just plain fun.

However, I'm not sure where to prioritise Design Patterns in all of this. I understand the Singleton and Factory patterns, but barely know anything about the Command, Observer, Memento(etc) patterns. Also, I've honestly never found anywhere in my side projects where patterns would be useful, aside from possibly the singleton pattern. Are they more useful in industry-level applications?

I have a copy of the GoF Design Patterns book too, but I've heard that the Head First Design Patterns might be more applicable to me, as it's examples are all in Java, where the GoF book's examples are in C++.

So any advice on my next step? Should I continue making Java my priority or are Design Patterns more important, despite my experiences with them so far?
 
Sheriff
Posts: 17644
300
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me give you an answer by way of analogy.

Learning Java is like learning the fundamentals of a sport, like football or baseball. You learn how to throw the ball, how to catch, how to bat, etc. Learning patterns is like learning the different plays, like throwing to first base when you've got two outs or throwing to second base first when you field a hit with a runner on first.

So to play the game well, you need both fundamental skills as well as familiarity with the plays. Likewise, if you want to write good programs, you need to have both mastery of basic language constructs as well as familiarity with patterns and the proper contexts in which they are effectively applied. I often find that the one thing many people gloss over when learning patterns is the context. It's just as important to know WHEN to implement a pattern as it is to know HOW to implement it.
 
Marc Laffan
Ranch Hand
Posts: 38
Android Ruby Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, I see.

Both are vital, but there is a mix of precedences in there.

I'll focus on Java for now and bear your advice in mind when I am satisfied with my level of Java.

There never was a huge focus on Design Patterns in my old place of work or old college, so this was an important question for me to ask.

So... Thank you!
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Note that Design Patterns are Universal - independent of computer language and in fact related to other human activities.

When I first read the Design Patterns (gang of four) book I said "wow thats what I have been doing."

For non computing uses of patterns, you might start with this article on pattern languages.

If you are interested in architecture, this book is a good starting point.

Bill
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My experience has been that interviewers are more likely to ask questions about the details of both a language's syntax and a language's libraries, than they are to ask about design patterns and best practices.

My personal opinion is that design patterns are more important. They are applicable to any language, and they are needed for writing maintainable code and stable programs. There are more libraries than any single person can master. Details of a language's syntax and and a language's libraries can usually be looked when it is needed. Everything is all relative though.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic