News for hackers. Stuff that matters.
Re:Goodbye, shitty Car extends Vehicle object-orientation tu... by praptak on Friday June 24, 2022 @08:47AM (#31860937)
I think it's a bad question, just like every single request to "model real world things X,Y,Z for no reason" and the article explains this:

    You can’t add code to ducks.

    You can’t refactor ducks.

    Ducks don’t implement protocols.
If I got asked this question I'd probably spend the whole interview inquiring about the purpose of the modeling. It's for a simulation? What info do you want to get from the simulation? It's for an ERP app?

I don't have problems with simple tasks which are not real-world but abstract something from the real-world use cases. The problem with "model me a car" is that it abstracts nothing.

Also for the most real-life purposes of modeling a car factory you wouldn't even have a "Car" in your object hierarchy.

There are no comments on this comment yet.