| ||Ask HN: Any Tips for Understanding OOP?|
6 points by replwoacause 10 days ago | hide | past | favorite | 10 comments |
|At this point I can no longer recall how many intermediate programming courses I've completed that teach the basics of classes: inheritance, properties/methods, getters/setters, polymorphism, constructors/destructors, etc. But what I'm finding much harder than learning the syntax is how to actually put these ideas to use in real code, which seems like the real art form in OOP. I've seen a million examples of Cat classes extending the Animal parent class with an overloaded method, and Car classes that have color, weight, and speed properties with Accelerate() and Stop() methods. But this isn't enough to help me employ OO patterns when solving problems with programming. Every time I try to level up my programming skills from "scripter who only writes a bunch of statements, functions, loops and conditions" to "programmer who follows a thoughtful/logical design pattern that other developers can understand and build on top of" I become paralyzed by not knowing how to fit the idea of my program into an object oriented model. As much as I love him, I'm realizing that watching another Derek Banas video isn't what I need right now. Does anyone have some tips for "thinking in objects"? Something that will help this paradigm click and help answer the following questions? I'm not sure how much this matters but I am learning primarily in Python (although I've explored this topic with other languages too).|
- How do I decide what parts of my program should be based on classes?
- Is it possible to go OO crazy and needlessly complicate the program? How do I KISS?
- Are there any tools or resources that can help model a program from the onset using an OO design pattern?
- Can I write a serious program without OO or should I resign myself to staying in script kiddie land until I learn it properly?
- Should I look into another paradigm? Is my only other choice to use a functional langauge like F# or Clojure?
| Apply to YC