I'm still learning OOP. Any tips on staying unbiased and pragmatic?
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:开发者_Python百科 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!
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.
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
精彩评论