Object Oriented Life
What can we learn from life that applies to programming?
Think of all the assumed methods that make up these simple activities - like making a cup of coffee. There are thousands of things that work down to the cellular level in doing something simple like grinding coffee (one of the methods needed for "MakeCoffee"
Class: Grind Coffee use DoSomething use Brain (to think through the steps) use Arms (to move things around) use Hands ( to grab things arms guide them to) use MuscleMemory (requires Brain) use BasicHumanStructures use Skin use Muscle use Nerves use Tendons use Blood (requires BloodVessels) use Bones use CellularStructures
About everything in life can be modeled this way - just take it down to the cellular level.
Now as for Classes and Instances - these are more organizational. I can say "grind coffee" - ok - when, where, how much? Without an instance its all confusing. Folks was specifics - instances have context. Some steps are simpler like "breathe" - we do that without thinking about it or needing specifics - in fact the only time we even use an instance is when we need to stop or start - like when in water. (a stretch of course - you get the point)..
"husband - please make some coffee"
Ok the wife just made this request - so lets create a new instance of "grinding coffee" and use some assumptions (defaults) based on who asked and using some info from our morning "instance" - namely we are at home, and I need to leave for work in an hour, she drinks decaf and likes it not too strong (these are information gleaned from the wife "instance". So I'll grind a couple tablespoons of a certain blend and put into a certain Aeropress.
If we were out camping with other families, and she said "husband - please make some coffee" I'd have to consider the characteristics of our morning "instance" which has inherited properties from our location instance (campground with other families) and adjust accordingly.
Now when adjusting the coffee for my wife, I need to make some tweaks
(polymorpism) to the coffee selection method (grab decaf) and my brew method
(roadtar = false). And because she like the aeropress - if the brew method
always assumes a french press, I'll need to polymorph that method by creating
an override method and say "use BrewCoffee - but my method overrides the
inherited BrewCoffee by adding some choices before using the inherited one.
Same method, but now you have a choice.
Earth as a massive data structure
to be written