Grilled cheese object reference diagrams
Here's an interesting thought for those of you interested in interesting thoughts. Well okay it would only be interesting for those doing object oriented programming if you want to be pedantic. Pedantic sounds like a cheap brand of paracetamol.
We're often told the advantage of using pseudocode and diagrams like ORDs is beneficial because they're programming language agnostic, but that's not entirely true. Take the above example of a grilled cheese sandwich class; it's all fair and good if we were using Java because only the String here is an object not a primitive data type. But what about something like Ruby in which everything is an object? Huh? Would it be something like this?
That's a lot of duplicated boxes. Clearly the ORD was envisioned when what I call "hyper dynamic" programming/scripting languages didn't exist! I can't think they'd be terribly practical to draw all the time as a Ruby developer unless you wanted to bend the rules a bit for it.
The diagram looks like my bedroom in Singapore, if my bedroom in Singapore contained boxes with attributes regarding instances of grilled cheese sandwich objects. I'd go for a nice Colby or Extra Tasty Cheddar. Makes sense to me.
I need a stiff cup of coffee.