Picked up a book

8:09 PM Edit This 0 Comments »
...from my dad's bookshelf today, and read about a page of the first chapter. The book was called A Basis for Theoretical Computer Science (will cite properly in a bit) and the chapter was about set theory. The first example showed how to do a division and remainder problem. I got it in about a minute by looking at the flowchart-if the divisor is greater than the number, output 0 as the quotient and the number as the remainder, if not, add one to the variable with the value 0 and subtract the divisor from the number, then test again. Yes, that would draw a collective "duh" from the computer scientists of the world. But here's why it was awesome.
I'm about 11 and we're in a hotel room. My mother is talking to a friend of hers and I'm half-listening. At one point, her friend comments that the problem with the way basic math is taught in schools is that they teach multiplication as repeated addition, but not division as repeated subtraction. I don't understand this at all, but store it somewhere as an "unanswered question biding its time."
I'm about 14 and my C++ teacher shows us the code for division (/) and modulo (%). It vaguely bothers me that I can't get any more basic than that.
So in the space of about 30 seconds of looking at a bunch of boxes with arrows, all those unanswered questions just CLICK! and I put the book back, smiling.
That's why I love this stuff.

0 comments: