Grilled cheese object reference diagrams

Software

A grilled cheese sandwich object reference diagram.

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?

Another equally pointless diagram, this time with Ruby and grilled cheese sandwiches

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.

Author bio and support

Me!

Ruben Schade is a technical writer and infrastructure architect in Sydney, Australia who refers to himself in the third person. Hi!

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite bespoke cloud infrastructure provider.

If you found this post helpful or entertaining, you can shout me a coffee or send a comment. Thanks ☺️.