A concrete example: one person could not get it through their head that they could write a function to return the correct value, then unit test that function with arbitrary known values. My question: "how do you know if it gets the right answer for 1,000,000,000,005?" What I wanted:
def fizzbuzz(n): ...
assert fizzbuzz(1_000_000_000_005) == "fizzbuzz"
or something similar. What they offered:"OK, we'll loop from 1 to n and write each of the values out. Then we can compare the contents of that file with a test case!"
"How is that going to work for values like 1 trillion something?"
"We can compress it!"
"And how long is this unit test going to take?"
"Well, let's assume we can process a million answers per second..."
"Aren't you going to run out of hard drive space at some point?"
"We can use `tail` to get the last few lines!"
"OK, let's start over. Can you imagine any way to test some arbitrary value in O(1) time?"
"Nope, can't be done."
"Sigh."