3 Replies - 1197 Views - Last Post: 19 April 2014 - 06:42 PM

#1 steve.v  Icon User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 30
  • Joined: 31-October 12

Learning patterns necessary?

Posted 17 April 2014 - 09:38 PM

I would just like to ask some experienced developers and or programmers if it would be worth learning about programming designing patterns such as strategy, observer and factory etc.
I am currently in my Junior year pursuing a computer science degree wanting to land a programmer analyst/web developer career.
My mentor said it would be useful if I wanted to become an architect however I should focus on learning a framework first.
One of my goals is to become a seasoned ruby developer plus experience with rails/Sinatra etc frameworks.
So will learning this help me become a better developer and programmer in the years to come?
I am currently reading a book that gives a lot of references to the GoF, that's why I had to ask; Are these patterns still applicable?

Is This A Good Question/Topic? 0
  • +

Replies To: Learning patterns necessary?

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5436
  • View blog
  • Posts: 11,662
  • Joined: 02-June 10

Re: Learning patterns necessary?

Posted 18 April 2014 - 04:12 AM

Yes. Absolutely. Design patterns are used in the real world every day, unlike that 17th century French art history class.
Was This Post Helpful? 0
  • +
  • -

#3 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3471
  • View blog
  • Posts: 10,706
  • Joined: 05-May 12

Re: Learning patterns necessary?

Posted 18 April 2014 - 07:34 AM

My advice is yes, learn design patterns, and then forget about them... :)

It's like learning your various forms and combinations when you are learning martial arts, chess, and other strategy games. You want to learn the mechanics so that you can do them instinctively, but you also don't want to be locked into predictable patterns that your opponent can anticipate your moves. You need to understand how they work and how you can incorporate them to solve the problem at hand, but not be locked into the mindset of "it must be this pattern, or it must be that pattern".

I highly recommend the modern approach to learning about design patterns used by Shalloway: Design Patterns Explained: A New Perspective on Object-Oriented Design, as opposed to the textbook format of the GoF book. But always have a copy of the GoF book handy. Shalloway refers to it, and as you start to grok the hows and whys of design patterns, the GoF book makes an excellent reference to quickly refresh yourself.
Was This Post Helpful? 1
  • +
  • -

#4 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7576
  • View blog
  • Posts: 12,725
  • Joined: 19-March 11

Re: Learning patterns necessary?

Posted 19 April 2014 - 06:42 PM

I would go the other way: write a lot of code, worry about patterns later. Patterns are simply common programming idioms - typical ways of addressing typical problems. Until you have a certain amount of experience with the problems, I don't see a lot of sense in learning the solutions. It'd be like learning a bunch of rules about sines and cosines and tangents and such, without having any lines or angles to apply them to.

And frankly, the GoF book is about the worst piece of technical writing going. Truly atrocious writing, horrid organization, and lots of poorly-executed diagrams. Approximately what you'd expect from a book written by a committee. Trying to read it without some substantial experience in actual programming would probably be a waste of your time. Get thee out and write stacks of code, make all the mistakes you can make, and don't start optimizing your programming habits until you have some habits to optimize.

Later on you can get a copy of the GoF and look through it and find out the names they've put onto the things you discovered along the way.

This post has been edited by jon.kiparsky: 19 April 2014 - 06:44 PM

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1