Archive - Originally posted on "The Horse's Mouth" - 2007-04-22 12:55:35 - Graham Ellis
I was running a C++ course yesterday (yes, a Saturday!) and among the topics we covered was the overloading of operators. In languages such as C++ and Python, you can re-define what operators such as "+" do when you add objects together, and the course example I used was adding two enclosing cubes - boxes - where the resulting box to contain both the input boxes is sized as:
The LARGER of the two X values
The LARGER of the two Y values and
The SUM of the two Z values.
Think about it - stacking two cubes on top of each other.
Odd things happen with addition in real life too. With staff at the hotel now going off on their summer holidays, we need not just one person (plus the manager) but two who can perform each job. And that adds a whole new "can of worms" - procedures to ensure that jobs are documented and done consistently - things that Martin and I take for granted and do automatically each morning have to documented and checked. It's a darned site harder that just saying 1 + 1 = 2!
Please feel free to browse "Breakfast in 5 Stages" ... part 1, part 2, part 3,, parts 4 and 5 ... a new writing that I'm sure is NOT going to turn into a best seller, by Graham Ellis and other Well House staff.