tags:

views:

102

answers:

2

I keep reading about defficiencies and issues with languages. Specifically, I'm learning PHP and Javascript, but I see it everywhere. This question arose while reading Javascript: The Good Parts and PHP Objects, Patterns and Practice. While understanding and avoiding easy pitfalls, is there a way I can learn the fundamentals of OOP and discover solid programming practices without overlooking important areas (or simply becoming jaded)?

I'm sure I'll have plenty of opportunity to learn from mistakes!

A: 

First, make sure that you learn C if you haven't already. It is essintial to learn the basics of pointers and memory management to really understand what you're doing. I made the mistake of learning C later and my work suffered for it.

Secondly, there are many languages considered to be very good at object-orientation.

I'd reccomend: Ruby and Go

Maz
It's good to know about pointers, but that knowledge definitely isn't necessary for writing in PHP. I don't think the answer to this question is to "learn three new languages". For PHP, the specifics of memory management definitely takes a backseat to design patterns. I'm out of downvotes for the day, though.
Lotus Notes
I may just be stupid, I don't see how any of your first paragraph is useful for learning good OOP practices. C is not remotely OO and neither pointers nor C's memory management have anything to do with OO.
Chuck
@Maz why don't you have him learn Common Lisp. You can get the best of all worlds.
Gutzofter
+2  A: 

You can't stay unbiased. Pragmatic yes. You want to be biased in your opinions of different languages, that way you know which language/features to use to solve a problem.

I would recommend for OOP that you follow SOLID. Another reference would be Pragmatic Programmers. My personal preference for writing code is TDD.

Just remember, don't be afraid to be a beginner and learn something new. Just yesterday on SO I put my opinion out there in comments and learned something very valuable concerning deployment of libraries.

Gutzofter
Thank you. This is exactly what I was looking for. I appreciate the good references.
Marc Ripley
Your welcome. Remember programming is a rabbit hole. There's no turning back.
Gutzofter