mathnet

February 2nd, 2010 by michael

Math is back in my life. I purposely avoided it. I told myself I was bad at it. I eschewed calculus in favor of an “applied math” course, the bare minimum I needed to graduate (it should’ve been called “don’t be a fuckup and run up a bunch of credit card debt, dummy”). In that class I learned how Susan, who started saving $100 a month at age 18, will be a millionaire by age 40, whereas Nancy, who started saving $1000 a month at age 30 will be cast out of her town a syphilitic and penniless spinster by age 35.

But now that I want to get a second Bachelor’s degree in computer science there’s kind of no avoiding it. Math plays a big role in computer science. I have to get to the calculus level. I figured this out while checking out an amazing class from MIT’s Open CourseWare. The professor said the first assignment should be “fairly easy”. It’s a two-part assignment.

Part 1: Write a program that computes and prints the 1000th prime number.

Not easy, but not impossible. It took me a few hours to get a working script:

candidate = 3
primes = 1

while primes < 1000

  primeness = 0
  divisor = 2

  while divisor <= (candidate / 2) and primeness == 0
    test = candidate % divisor
    if test == 0
      primeness += 1
    end
    divisor += 1
  end

  if primeness == 0
    primes += 1
    puts candidate
  else
    primeness = 0
  end

  candidate += 2

end

Then…

Part 2: Write a program that computes the sum of the logarithms of all the primes from 2 to some number n, and print out the sum of the logs of the primes, the number n, and the ratio of these two quantities. Test this for different values of n.

Teacher…what’s a logarithm?

Clearly, this isn’t going to work and it’s certainly not going to be “easy” unless I know math. Back to sqaure one. So, here’s my self-taught algebra to precalculus curriculum. So far I’m halfway through the algebra and, actually, loving it:

Part One: Practical Algebra: A Self-Teaching Guide, 2nd Edition. This is a fantastic book. I don’t know when it was written, but it feels pretty fresh. The author(s) have personality, and concepts kind of flow together. I only wish there were more exercises to work through. I though there would be more resources online, but it looks like the vast majority of math pages online were written in 1996 and only exist to sell the author’s $3.99 printable flash cards.

Part two: Master Math: Trigonometry (Master Math Series) I’m not so sure about this. I haven’t gotten to it yet, but I mostly bought it off reviews, and now that I look at it again I think 2 of the 3 Amazon reviews were written by the author. Also, the author’s other book is ARROWS THROUGH TIME: A Time Travel Tale of Adventure, Courage, and Faith. Not the best sign. Might be time to invoke my right to return.

Part three: Quick Calculus: A Self-Teaching Guide, 2nd Edition. I guess I’ll find out more in a few months.

Saturation Point

February 1st, 2010 by michael

As a neophyte coder I’m learning a lot about learning itself; mainly, what it takes for me to learn. I’ve read a ton of great books, articles, and blogs. The most important thing I’ve learned, however, is this:

Embrace the saturation point.

I don’t know how many books I’ve picked up only to get about 3/4 of the way through and then drop them. I lose interest because they’re getting too specialized, or – more likely – I didn’t spend enough time learning fundamentals early on in the book. Then I feel lost. Then I think of something else to read or learn. Then I’m done with that particular book and topic.

At times like this the best thing I can do is try to put what I’ve learned into action so I don’t forget it. The nice thing is it also invariably launches me into some juicy task that a book never would’ve taught me.