August 2021 newsletter
Published: 2021-08-31Word count: ~1543
Oh shit right I have a newsletter...
I'm so busy not doing anything with my website that I actually forgot that I had a newsletter until like yesterday. What can I say? I've been busy.
I've been busy
That's right. I've been busy.
If you care at all -- a big if -- you'll have noticed that I haven't really been adding anything to my website recently. That's intentional, since I'm doing some pretty intense research stuff and I can only do so much in a day before my frontal lobe starts to feel numb.
I'm not going to school or anything. Catch me in a school and you'll know that it's a doppelganger. No I've been doing my own self-learning. My goal is to gain a deep working understanding of the problems facing the AI field, especially the whole "how do we program an AI to not kill us" thing. That involves math. Lots of math. And programming. Aren't I just such a autodidact? Hahahaha.
How does a guy who's best "math" experience is programming go about learning actual math? I think I've picked up some pretty good math skills in the last four months or so when I started doing this, so I can at least answer that question for myself.
This might actually make a good blog post, but I'll write out my rough thoughts on it for now and see if I want to use it as notes for a blog post in the future.
What do you mean you're already bored? Come on! Math is cool!
Math was very very confusing to me near the start of my intense study 4 months ago. You see, in my deepest core I'm a programmer. I've been programming since I was 10 years old, although I haven't gotten around to trying anything actually serious until a few years ago.
When I was Young Tim -- I'm talking like 7 years old -- I was known as the "math kid", since I could easily pick up on the patterns in multiplication tables and do long division without crying. This was, obviously, unacceptable for my beloved math teachers, who are only used to beating the joy of learning out of helpless prisoner children. My peers gave me weird looks for enjoying things like how multiplying something by 10 just adds another zero at the end.
After a few years of being cursed to live through the modern school system, I finally got the message that I shouldn't enjoy math.
On the flip side, I found programming at around the same time. It was Game Maker, but it was still some kind of programming. The thing is that my teachers, especially my computer teachers, were incompetent to the point of absurdity. They couldn't interfere with my growth as a programmer even if they tried.
So while my love of mathematics was systematically destroyed, my love of programming was developing naturally and swiftly; you know, like how it's supposed to when a young child finds something they're passionate about. God I fucking resent my school years.
The point is that, until very recently, I was far more competent at programming than mathematics. My aesthetic senses for "what is a formal system" were mostly developed through the lens of programming. And even now that I'm better educated on what math is, I still find programming's aesthetics more appealing.
I knew all of this going into learning math. I also knew what a formal system was, and I had a massive advantage in practice of systematic thinking.
So if you're like me, then this is the advice I would give: Programming and mathematics are similar in many ways, but their differences are profound to someone who's only done programming and never read a proof. As a programmer you're constantly limited by the physicality of the machine you're programming. As a mathematician you're only limited by the constraints of the formal system of mathematics itself. Both of them can be practical fields, but programming is practical as a physical requirement of reality.
An example: In programming you might choose to represent a number using 32 bit floating point. Since this number is represented using 32 bits, it means that there's only 4,294,967,296 different states that series of bits can represent. Even IEEE 754 floating point numbers have to be constrained by this fact; for all they claim to have "infinity" and "not a number". And it shows, too. As the number you want to represent becomes larger or smaller, it also gets less precise. It's what you get when you try to cram that much information into something with 32 bits of entropy.
A mathematician might choose to be limited by the same constraint, especially if they're studying information theory or computer science, but the thing is that it's a choice. They take it as a constraint because it's what they want to be constrained by through the formal system's axioms. Sure a programmer can make arbitrary precision math as well, but then they're limited by memory constraints, or hard drive constraints, or time. Eventually it stops being useful for a programmer to talk about larger and larger numbers, while a mathematician can keep going.
In programming you're making a physical object push around electricity in a highly specific pattern, in mathematics you're discovering/inventing truths about a system and communicating them to other people.
Suppose that you have a sequence of numbers: 1, 2, 3, 4, 5
. You add all these numbers together, 1 + 2 + 3 + 4 + 5
, to get 15
. But what if you had a sequence 1, 2, 3, ..., n
where n could be any number? That is, what if you had an array of numbers that starts at 1 and increments by 1 up to n? As a programmer you would gravitate to solving this with a simple for
loop. A mathematician might tell you to do (n * (n + 1)) / 2
, if they knew the notation that we programmers use for expressions. In this specific case the mathematician's answer would execute faster than the for loop, but that's not the point. The point is that the mathematician would go on to prove to you that this answer is true.
I will not give that proof here, since this is a newsletter and I don't give a shit. Still, it's rather elegant when you've learned what it means.
Through some arcane sequence of events the mathematician discovers 1 + 2 + ... + n = (n * (n + 1)) / 2
(that is equality =, not assignment), and then they communicate this truth to other's through some method of proof. A programmer gravitates towards describing the computation needed to arrive at the answer in terms that a compiler can translate into machine code a CPU can execute.
Notice how (n * (n + 1)) / 2
is a computation. It's just that the method of communication is from one human to another, compressed for optimal succinct understanding between two minds. I can easily tell you "n can be any positive integer" and you understand what I mean. The programmer is communicating with other programmers as well, any decent programmer would be able to read that for loop, but their target audience is first and foremost the computer.
You may think that I'm trying to pick a side here. That I'm being rude towards math for not being practical, or that I'm being rude towards programming for being too limiting. Please don't think so low of me. Mathematics is over 3000 years old; this formal system that we as a species have invented is a thing of awe. We in our age of information are privileged to be able to explore the inventive work of the greatest minds we've ever produced working towards the goal of inarguable truth. Programming is young, but I can also flip a single bit in a sea of gigabytes of them with such perfect finesse and speed that it can only be described as awesome. I love both of these things.
...With that said I do enjoy programming more. What can I say? I have a taste for the practical.
So how should a programmer learn math? The same way they learned programming: By learning the rules of the system and applying it towards a goal. My goal is understanding so that I can apply it towards difficult programming tasks, your goal might be different. Cast your mind back towards first learning to command a computer; did you immediately understand on a gut emotional level that the computer was, as we say, "very very stupid"? Of course not. You had to be broken by the computer's steadfast refusal to listen to your intent before you could have progressed. There are lessons like that in mathematics as well, especially for a programmer, and your confusion and fear at the weird symbols are a sign that you're heading in the right direction.
-Tim
P.S. Yeah this would make a great blog post. Maybe I shouldn't write it in such a dry way though. It's just easier to be dry than it is to be actually entertaining.