That programming book you never finished

Tell me if this sounds familiar:

You walk into a bookstore, browse through some shelves and run into a programming book about a subject you always wanted to learn. Maybe it was about machine learning or algorithms or some other cool technology.

You read the back cover, the intro and you get really psyched. You think to yourself: “I think I can really get this”. And, “when I’m done with this book I’m gonna have super powers” and “I’m gonna show the guys at work what a rock star I am” etc.

You get home, open the book that is about to change your life and 20 pages into it you’re starting to sleep after seeing one too many mathy squiggly thingies.

Then you start thinking some other thoughts, such as “oh, not math again!” And “I’ll never get this, I suck at math!” And “I guess I’m just stupid” and other such nonsense.

If I had a dollar for every time… anyway.

So I’m here to tell you that math has a dirty little secret that will help you get through these books: mathematicians like to use big scary words and symbols to describe small and simple concepts.

Let’s look at an example. Chances are you ran into the scary looking Sigma symbol:

I don’t know if it’s because it’s big or because it looks like Egyptian hieroglyphs, but something about that symbol freaked me out the first time I saw it. But it turns out that it’s almost idiotically simple.

Sigma simply means “sum up”. What do you sum up? The thing on the right (i*2 in this case). And you do that starting at the number below the Sigma (i=1 here) until the last number designated above the Sigma (100 here).

So this particular Sigma equals to: 1 * 2 + 2 * 2 + 3 * 2 ... + 100 * 2 = 10100.

So the easiest way for me to think about Sigma is to think of it as a `for` loop, where the lower boundary of the loop is specified under the Sigma and the upper boundary of the loop is specified above the Sigma. Here’s how it would look like in python:

def sum(i):
  s = 0
  for n in range(1,i+1):
    s = s + (n*2)
  return s

I know, it’s almost disappointingly simple.

This may sound like over-simplifying the situation. That some math concepts are just impenetrable and beyond mere mortals grasp. Well if that’s the case then I haven’t ran into it yet.

On the other hand, this is not a “get math quick” scheme either. To understand these math concepts you’ll sometimes have to drill into other concepts that the original concept builds on — recursively. This can take hours, days or more to accomplish, depending on the concept.

But the point is the same. It’s just fancy words and symbols. And as long as you keep going down that rabbit hole using dictionaries, tutorials, videos, whatever you can get your hands on, to define these words and symbols, you’ll eventually get it. Try it sometimes.

Happy learning.

Leave a Reply

Your email address will not be published. Required fields are marked *