Live data from Hacker News

Ask HN: How to Learn OOP

news.ycombinator.com

1–10 of 78 posts

Ask HN: How to Learn OOP

#1
I want to learn Object-oriented programming. When I was in college I had learnt few concepts, but now I don't remember most of the things. Also, presently my work doesn't demand to learn object-oriented concepts or OOP.

Any suggestions on: how/where to start? which book to refer?

Re: Ask HN: How to Learn OOP

#2
You don't mention a language; I suggest you pick one then look for a good free text. For example, choose Python then go for Mark Pilgrim's Dive into Python. I'm sure others could make recommendations for C#, Java, Ruby or JavaScript. A good view of OOP in a relatively language neutral manner if the GoF patterns book: Johnson, Gamma, Helm, Vlissides Design Patterns. It summarised state of the art OOP in the mid 90s and was a big influence on Java. Things have moved on since then, and IMHO, other techniques for structuring your code are just as important as OOP. I'd highlight generic programming, asynchrony and coroutines. There's a lot to discover and enjoy - good luck!

Re: Ask HN: How to Learn OOP

#6
You can always check out Object Oriented Analysis and Design by Head First (http://www.headfirstlabs.com/books/hfooad/). Their books are more about learning the concepts than the theory so they employ a lot of games and learning activities. They are a lot more interesting than a textbook on OO, even if the format seems a little juvenile at time (I mean they have word-searches and crosswords with key terms).

Re: Ask HN: How to Learn OOP

#7
post #5

May I ask why you want to learn OOP? You don't need it at work right now, and you'll probably never need it. Not even in interviews.

I don't need to be able to drive at work right now. I'll probably never need to do it in an interview. Does that mean that I shouldn't try to get better at it?

Re: Ask HN: How to Learn OOP

#9
Could you tell us what kind of experience you have? There are many ways of learning OOP and they vary greatly in how approachable they are depending on your previous experience.

If you come from a procedural programming in a low-level language like C, for example, there is an excellent book "Object Oriented C", which teaches you OO concepts by implementing them in C.

If you do GUI programming in a procedural language (again, mostly C) you could download Pharo and go through "Pharo by Example".

These are just examples - there are much more languages/books combos out there.

Re: Ask HN: How to Learn OOP

#10
post #5

May I ask why you want to learn OOP? You don't need it at work right now, and you'll probably never need it. Not even in interviews.

It's still very relevant in the job market. Probably upwards of 50% of jobs are going to want you to know OOP, and many of those will cover it explicitly in technical interviews.
Post reply on HN