During a coffee break I mentioned that “even though the kids prefer schnitzel I’d rather prepare baked chicken”
When asked why I explained that “Chicken is
O(1) and schnitzel is
This is a case in which the joy of using jargon colloquially overrides strict correctness. Obviously making chicken isn’t
O(1) even if you do have an infinitely large oven.
Then again the complexity of finding an element in an unsorted sequence isn’t really
O(N) either, it’s
O(N * Max(Cmp(a, b))). Comparing objects can often be considered
O(1) (e.g. 32 bit integers) but if you want to compare books by the number of the times the letter e show up in them, well then, comparing War and Peace to Les Misérables is far from constant speed (you could use A Void as the null book</aside>)
The real reasons I prefer making chicken to schnitzel are twofold.
- The constants are much bigger for schnitzel
- Schnitzel making is synchronous while baking chicken is asynchronous
And don’t get me started about the
space dirty dishes complexity.
- Of course how healthy the food is doesn’t count as a consideration, we are geeks here after all. ↩