Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
81–90 of 177 posts
Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#82I actually like to ask people in interviews to model a car and car factory because I want to see right away if they go deep into the nonsense of extending everything, or if they can use composition, or get away with something focused on maintainable code that meets requirements. I've seen it all. Prius extends Car extends vehicle extends motor extends ... Right within the first five minutes of the interview. But I al…
In job interviews, people don't write the code they would write normally, they write the code that they think the interviewer wants to see. And that brings me to a topic that's entirely different but also very relevant: job interviews bring interviewer-biases with them. If you run into an old-school interviewer who would do exactly that "Prius extends Car extends Vehicle, etc." nonsense, but you don't know it, they w…
Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#83It's like listening to a conversation about cars where someone says they hate cars because you have to figure out a manual choke and the many inner tube failures.
Do people still use these crazy inheritance trees? I haven't encountered it since the early 2000's.
Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#84Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#85I do scientific modeling. We have classes and hierarchies of different physical components we simulate, like fuel assemblies and pumps and heat exchangers. I guess this falls into the exception of "clone of The Sims or something" so perhaps my complaint is covered.
Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#86Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#87Earlier quoted context omitted.
Not every person in the interview process is anywhere near you in the org though, sometimes great jobs are behind a shitty interview
Yes, and sometimes shitty jobs are behind great people. Candidates get catfished in interviews all the time.
Similar works backwards, if you're using the interview to also ask the right questions, good people are generally not going to lie to you...
Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#88The author is obviously an experienced programmer, so I suspect they've forgotten what the mindset of an absolute novice is like, and to start programming with zero prior exposure to the concepts.
For the novice being introduced OOP, the `Duck / Cat / Dog That's not the point. A beginner knows what a dog and a duck and a cat are in the real world. The "a-ha!" moment is mapping real-world relationships into a brand new abstract environment called Object Oriented Programming.
When you've never written a line of code in your life, abstract things like "network protocols" and "file I/O" and "ImageDisplay" (which is neither an image nor a display) are confusing, and so frustrating, and so not useful for teaching a complete novice.
Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#89After many years of OOP, I'm not sure if we gained anything from OOP, and if it wasn't a solution in search for a problem. At first I was enthusiastic. Then I've realized that there might be better ways to solve problems than trying to fit everything in a "everything is an object" mentality. OOP can lead to overly complex code, uneeeded abstractions and design patterns thrown on top of each other for no good reason.…
All programming paradigms can do that, you are not making any particularly salient point about OOP here.
OOP doesn't mean that everything needs to be an object, but inheritance and shared behaviors are concepts that map neatly between the real world and the programming world, which is why OOP has been such a resounding success.
We have refined this approach now (e.g. using delegation over inheritance), but these basic concepts of shared behavior and reuse remain.
Re: Goodbye, shitty Car extends Vehicle object-orientation tutorial (2011)
#90After many years of OOP, I'm not sure if we gained anything from OOP, and if it wasn't a solution in search for a problem. At first I was enthusiastic. Then I've realized that there might be better ways to solve problems than trying to fit everything in a "everything is an object" mentality. OOP can lead to overly complex code, uneeeded abstractions and design patterns thrown on top of each other for no good reason.…
If I need some functionality, I write a function and pass it a struct. I’ve yet to find a time when this approach is too limiting, or chaotic.
Even for interfaces, function pointers achieve that goal entirely.
I do miss type safe vectors, e.g templating. Thats above and beyond the most common thing I miss.