News for hackers. Stuff that matters.
Re:A bad citizen in Javaland (2006) by gravypod on Thursday December 03, 2015 @06:32PM (#10673544)
I feel that this is a representation of the fundamental misunderstanding of how object orientation is really done. In my opinion, if designed this way, this application was not well thought out.

If I was writing this, I would aim for this:

You wake up one day and you call to the heavens asking for transportation, you yell out the location in front of you, and with no response from the skies a self driving car appears.

You walk to the car and ask it to take you somewhere. Suddenly a pair of hands reaches out from the car, pulls you in, and takes you to your location. While you arrive, you are pushed out.

When you get to your job, you need money for lunch. You hand your wallet to your friend and your friend puts money into it giving it back to you. You keep your friends phone number on record if you would like to ask for money again. If he is busy, you can leave a voice mail and eventually he will throw money at your face hoping you catch it.

When you finally get home, you go into your bed and sleep until your bed wakes you up the next day to start again.

It's silly, like the original post, but I prefer to give handles and let abstracted code do it's magic. In all of these cases, I do not have the caller assume anything. It does what it knows it can do.

Some things need a more fine tuned application of this, but the idea is you just never assume something is true, only use what you know. That's where a lot of people mess up in java.

Re:A bad citizen in Javaland (2006) by GhotiFish on Thursday December 03, 2015 @08:45PM (#10674083)
note: It's called "A bad citizen...".