Why Radians?

Posted on July 9th, 2008

Ever wondered why there are 360 degrees?

Constellations make a circle throughout the year — ever see the Big Dipper upside down sometimes? (Never fear, it’ll be rightside-up in 6 months). Here’s a theory about how degrees came to pass:

  • Humans noticed that constellations moved in a full circle every year
  • Every day, they moved a tiny bit (” a degree”)
  • Since a year has about 360 days, a circle had 360 degrees

But, but… why not 365 degrees in a circle?

Cut ‘em some slack: they had sundials and didn’t know a year should have a convenient 365.242199 degrees like you do.

360 is close enough for government work. It fits nicely into the Babylonian base-60 number system, and divides well (by 2, 3, 4, 6, 10, 12, 15, 30, 45, 90… you get the idea).

According to Better Explained, degrees are subjective but radians are objective.

A degree is the amount I, an observer, need to tilt my head to see you, the mover. It’s a tad self-centered, don’t you think?

Much of physics (and life!) involves leaving your reference frame and seeing things from another’s viewpoint. Instead of wondering how far we tilted our heads, consider how far the other person moved.

Problem 12

Posted on June 22nd, 2008

To save you going all the way to Project Euler to read it, I have copied problem 12 here for your puzzle solving convenience…

The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28.

The first ten terms would be:

1, 3, 6, 10, 15, 21, 28, 36, 45, 55, …

Let us list the factors of the first seven triangle numbers:

1: 1
3: 1,3
6: 1,2,3,6
10: 1,2,5,10
15: 1,3,5,15
21: 1,3,7,21
28: 1,2,4,7,14,28

We can see that 28 is the first triangle number to have over five divisors.

What is the value of the first triangle number to have over five hundred divisors?

In case you were wondering, the answer to problem 10 is


primes = Primes.new
puts primes.find_primes_less_than(2000000).inject{|s,n| s+n}

How come inject and collect haven’t caught on in other languages? They are awesome.

Forgetful me

Posted on June 21st, 2008

According to Kurzweil, the singularity (the moment when we will start to invent things instantaneously) will occur in 2045. According to me the singularity (the moment when I forget things fast than I can learn things) occurs in 2009.

Every time I start over with Ruby (or XSLT or …) I find that I have forgotten the most basic things (like how to construct an object).

Anyway, thanks to Project Euler (according to which, I am 4% genius), I had an excuse to go go back and learn Ruby all over again.

Here’s my prime number generator (which is about a third of the size of my Java version):


class Primes
  def initialize
    @primes = []
    @next_candidate = 2
  end

  def prime? number
    root = Math.sqrt number
    find_primes_less_than root

    @primes.each do |prime|
      return true if prime > root
      return false if number % prime == 0
    end
  end

  def find_primes_less_than limit
    until @next_candidate > limit
      @primes << @next_candidate if prime? @next_candidate
      @next_candidate += 1
    end
  end

  def [] index
    until @primes.size > index
      find_primes_less_than @next_candidate + 100
    end
    return @primes[index]
  end
end

The answer to problem #7 is @primes[10000], in case you were wondering.

Wasting Time

Posted on June 15th, 2008

Project Euler. Wasting time with Maths.

My attempt at #3 is running now (which probably means it is wrong).

Like maths?

Posted on June 16th, 2007

When I was at grammar school, I used to rank the subjects according to how ‘like maths‘ they were.

We were taught chemistry, physics and biology as separate subjects and, while I enjoyed all the sciences, I enjoyed physics the most because it was more mathematical. Chemistry had less maths and biology, at that level, hardly any at all. In my 11 year old mind, physics was pretty much just applied maths and therefore fun.

In geography, we covered such topics as map reading, how rocks are formed and weather but I never thought of it as science because science was something I enjoyed and I didn’t enjoy geography. Geography had a little bit of counting, measuring and charting but less maths than the sciences. History had no maths at all and I hated it.

At Dylan’s school, they have a single subject called science and they cover such topics as map reading, how rocks are formed and weather. Dylan hates it. In 7th grade he’ll do life science but he already knows he’ll hate it because he hates science. It’s like they want to avoid exposing kids to the hard sciences until it’s too late. Until they have formed an opinion one way or the other.

I have this theory that the people who design school curricula don’t really like science or maths but they know it’s important to the economy and that not enough people are following science careers. The remedy? Make the science in schools appealing to people who don’t like science!

I wonder if they stop to consider the effect it has on people who actually like science? If a kid likes science would making it less science-y make him like it more or less?

I know the answer for me and I know the answer for Dylan. Maths good. Science good. The more the better.

Maths? Hard Work?

Posted on June 14th, 2007

The other day, I went to Dylan’s open house at school and met his maths teacher. We went through the usual awkward self-introduction:

“So, who do you belong to?”

“Dylan”

“Oh! Dylan! He works so hard!”

“No! Dylan Lawrence!”

Apparently, Dylan’s teacher was under the misapprehension that Dylan works hard at maths. I tried to explain to her that maths was Dylan’s favourite subject because it required no work at all. She found the notion very odd. I thought it was obvious.

For me, at Dylan’s age, maths was my favourite subject too. It required no study or work and, every now and then, the teacher would give you some cool puzzles to work on. I would often slyly do maths in other classes when the teacher wasn’t looking. Apparently, it hadn’t occurred to Dylan’s maths teacher that people would enjoy doing maths.

I have encountered this odd attitude before. When Dylan started fourth grade, at back to school night, his teacher explained how hard maths was for the children but that she had a bunch of manipulatives to help with the difficult concepts and she would take them through it step by step and, usually, by the end of the year they would understand.

What would it be like, I wonder, to have math teacher who enjoyed maths? I had english teachers that enjoyed their subject ..and history …and physics …and chemistry …and biology …and french …but never maths.

What if the default assumption in the maths class was that kids like maths and find it easy. What would that class be like?

Imagine if, at the start of the year, they said “OK. Everyone who loves maths come with me. We are going to teach you separately. Your teacher like maths too”. What would that class be like?

To their credit, Dylan’s school has advanced placement for maths and they give the new sixth graders a test. If they pass, they go into a class with a bunch of surly seventh graders who don’t like maths.

Anyway, Dylan just passed the test that lets him take high school maths next year. All he needs to do now is get the form signed and handed in on time which, apparently, was the hardest thing he had to do all year in maths class.

Why is it so hard for him to get a form signed? I don’t know where he gets it from.