How to learn something new- teach a ten year old!

Teaching a ten year old!

I’ve started a personal mission quite recently to master maths that I would have taken at A level if I’d done those. It’s a lot easier to learn algebra if one has done some programming; it’s a lot easier to appreciate.

However, its easier to understand just what you understand when you teach it to a ten year old. Especially when said ten year old only needs maybe fifteen minutes of a pen and paper explanation to just get it.

The ten year old, he’s my nephew and some teachers who love their jobs,will love teaching him. As for me, maybe I can pinch some reflected glory as he becomes a top scientist or something?

A few weeks back, we covered sets, differential calculus – power rule, list comprehensions and transposition ciphers. As I said, he’s quick! I’m teaching, it clarifies ones own understanding because somehow there’s a need to see the other guy ‘get it’. That driver alone can deepen intuition and open up a new way to see the world. I guess if you want to understand something, try teaching it!
image

Very simple List Comprehension

This is another rushed post making me slightly late for work, but I thought of it in the shower and decided to try and teach to my brother. So forgive the lack of testing of my syntax!

You may see something like (1..10, x > 10, x = x*x)

This is functional programming idea called a list comprehension that makes it easy to get a list and do stuff to it.

Instead of typing

For each person in a list(of person)
If person.hashairRed and PersonIsFemale then
GiveBadge(Person)
end if
Next

This is a list comprehension and my syntax is generic.

Here is how to understand the idea:

1..10 could be any range of values. Say it is a group of ten people.

Then you can decide which people you wish to operate on. So X >10 could be replaced for X is a person with red hair who is a woman .

Then you decide what to do with those people. so X*X so instead I say give each one a badge. This is a function you wish to apply to the individual.

So really I’m saying in a room there are 10 people all mixed and I want to give red haired woman a badge.

(List (of PeopleInARoom), Person.HasHair(Red) =True And IsFemale, GiveBadgeToPerson(Person))

This is a very general way to understand the idea.