"Raise your hand if you can do long division on paper, right now. Hands? Anyone? I didn't think so."
Is he serious? I knew how to do that in 3rd grade and a different version of it in 4th grade and on, and have never forgotten. How can somebody not know how to do long division? Please tell me I'm not the only one?
I'm pissed that I'm forgetting discrete math. I loved it, but lost my textbook at some point.
I can still do long division but dividing 2651300296 by 46532 by hand is not on the list of Things I Want To Spend Any More Of My Life Doing.
Anyway Steve Yegge is my hero. He rips into Java and C++ better than anyone. I think my favorite is when he cited "Dr. Gary Larson's" definitive paper on static type systems.
While I think he makes some good recommendations, his listing of "Advanced algebra" under "High school" makes me think he might not have gone that deep down the math rabbit hole.
Example: Knuth introduces the Grey code permutation of the natural numbers in The Art of Computer Programming, Volume 4 Fascicle 2, Generating All Tuples and Permutations (2005). Knuth gives the following equations defining Grey code sequences of length 2^n
G_0 = () [the empty list]
G_{n+1} = 0G_n 1G_n^R
where 0G_n means prepend 0 to everything in the list G_n,
and G_n^R means reverse the list G_n, and juxtaposition is concatenation of sequences. Successive elements of the list differ in precisely one bit position: this is obvious inductively, since if G_n does, so do 0G_n and 1G_n^R, and since the last element of G_n is the first element of G_n^R, the last element of 0G_n differs from the first element of 1G_n^R in the first digit. So this is a Grey code.
We get
G_0 = ()
G_1 = (0 1)
G_2 = (00 01 11 10)
G_3 = (000 001 011 010 110 111 101 100)
...
The sequence of G_n's induces a map g:N-->N
recursively by
g(0) = 0
g(k) = 2^n + g(2^n -1 - r)
for k = 2^n + r with 0≤r<2^n,
Here's an algorithm in Lisp for the function g.
The function MSB below kills off everything but the high-order bit of the binary representation of a non-negative integer.
(DEFUN MSB (n)
(LET (( x (LOGAND (- n 1 ) n)))
(COND ((EQUAL x 0) n)
(T (MSB x)))))
The MSB can be used to compute the Grey permutation
GREY:N-->N
(DEFUN GREY (n)
(COND
((= n 0) 0)
((= n 1) 1)
(T (LET ((x (MSB n))) (+ x (GREY (- (- x 1) (- n x))))))))
Restricting the domain and range of the GREY map to [0, 2^n -1] is a (well-defined) permutation; for example:
Is he serious? I knew how to do that in 3rd grade and a different version of it in 4th grade and on, and have never forgotten. How can somebody not know how to do long division? Please tell me I'm not the only one?