You don’t (generally) need math for programming. That much is true. There is some specialized knowledge that you need for a few areas (ML, graphics) but you can pick it up as you go.
And yet, I want to talk about my love for math. What it means to me, and where it’s coming from.
When I say “love for math,” a stereotypical image pops into my head. That of a student who’s great at solving examples in the textbooks, someone who reads complex formulas without batting an eye, someone who knows how to solve problems using math. That person is not me.
Math in high school (and in many university courses) is often taught as means to an end. As a set of techniques you can apply to answer practical questions. How to solve an equation? How to calculate the area of a surface? How to describe a physical process? Step 1, 2, 3, done.
This approach, guided by calculation and practical needs, has driven my interest away from math for many years. Sure, I understand the value in being able to solve an equation, or integrate a non-trivial function. And yet it’s mind-numbingly boring. I’m not a fucking computer!
When I hear the word “math,” there are two separate images overlaying in my head. Like yanny/laurel. One is that of “school/uni math” — memorizing rules in service of calculations to solve “real problems.” Just thinking about it makes me yawn. But there’s also another image.
The other image is how I remember math from my childhood. It’s like the alien language in the Arrival movie. It lets you think deep universal truths that you can’t express otherwise. It is a way to pierce through the infinite and come back alive to tell the story.
Let me give you an example.
Say you have two books: A, B. There are 2 ways you can arrange them on the shelf: AB and BA. If you have three books, there are 6 ways: ABC, ACB, BAC, BCA, CAB, CBA. If you look closely, you might notice that the number of these “permutations” is 1 × 2 × 3 × ... × how_many_books.
This number of ways in which you can rearrange n things is known as the factorial and is written as n!:
1! = 1
2! = 2
3! = 6
4! = 24
5! = 120
...
But it’s really nothing more than n! = 1 × 2 × 3 × ... × n
Now, we’ll jump onto a seemingly different topic. Let’s talk about functions. In mathematics, a function means that you put a value in, and it gives you some value out. You can plot it to see the relationship visually.
Here’s a graph of y = x. It’s pretty uneventful.
The graph in the previous tweet is of a linear function. It looks like a line, hence “linear”. Its value grows, but it grows in a boring way. It doesn’t grow slower or faster at different times: its value grows at a constant speed. It’s exactly like being on an escalator.
It turns out that the idea of “how fast does a function grow at each point” can also be expressed as a function. That’s called an original function’s derivative. For example, the derivative of y = x is y = 1. That is to say, the “speed” of growth of y = x is constant (at any x).
But not all functions grow so boringly! For example, you might wonder: which function grows with the speed of y = x (rather than y = 1)? In other words, what is the function whose derivative (“speed of change”) is y = x? You’d expect this function to climb up faster than a line.
It turns out that there are infinitely many such functions, but they all look very similar. Specifically, the original function (the “anti-derivative” of y = x) is y = x^2 / 2. This parabola “grows” with the “speed” of a line!
I said there’s infinitely many such functions. That’s because you can move this parabola up or down, and its “speed of change” would be the same. Speed doesn’t care where you start — only the journey matters. The anti-derivative of y = x is y = x^2 / 2 + C, where C is any number.
So there’s clearly some interesting transformation here. A parabola grows with the speed of a diagonal line. A diagonal line grows with the speed of a horizontal line (because the speed constant). A horizontal line grows with the speed of a zero horizontal line (ie doesn’t grow).
This might lead you to a question. Are there any functions that are their own derivatives? In other words, are there any functions whose speed of growth are described by themselves?
You already know one such function for sure. It’s y = 0. It doesn’t grow at all. So its rate of growth, its derivative, is also y = 0. It is its own derivative.
But this function is boring as hell! Can we do better?
Let’s say our function grows. But its speed of growth must grow like it grows. And that grows with its speed of growth! Holy fuck that function must be growing fast.
One function that grows fast is the exponential. For example, here is a graph of 2^x. This boi is going places!
However, 2^x does not quite grow fast enough to be its own derivative. Its rate of growth *is* exponential, but not the same. It’s something about y = 0.693 * 2^x. It’s slightly more chill than the original function y = 2^x (though still impressive).
If you start adjusting from 2^x to 2.1^x, 2.2^x, and so on, you’ll notice that the rate of growth also gets closer and closer to the original function.
At about y = 2.718^x, the rate of change becomes the same (also about y = 2.718^x). This function is its own derivative!
The y = 2.718...^x exponent is called “natural” precisely because it is its own derivative. It is written as e^x, where e is that pesky number that seems like it came out of nowhere: 2.718... e is just as interesting as π, but is clearly underappreciated in the pop culture!
Now here’s the kicker. Suppose you have infinite time, a calculator, and nothing to do. Suppose you start computing the number of ways to rearrange books in an ever-expanding bookshelf. No books (0), 0! = 1 way to arrange. 1! = 1 way. 2! = 2 ways. 3! = 6 ways. And so on.
Now suppose that, for no good reason, you start taking the inverse numbers of those factorials. So you take:
And suppose, in a state of total delirium, you start summing them up.
You’re gonna get:
1
2 2.5 2.666
2.708
2.716
2.718
If you spend an infinity of time summing them up, at the end of infinite (which will never come), you will get e.
If you look at things from the real-world perspective, you would never know the connection between rearranging books on a shelf and the processes which grow with their own speed. You wouldn’t be able to take an infinite sum and claim a meaningful result. Math lets you do that.
When I first saw
e = 1/0! + 1/1! + 1/2! + ...
or
π = 1/1 - 1/3 + 1/5 - 1/7 + ...
it was like a revelation. I guess that’s what religious people feel reading the scriptures. As that Dylan line goes, “and every one of them words rang true and glowed like burning coal.”
There are reasons for why these relations are true. I understand pieces of them, but not fully. Often there are multiple ways to get at the same result. To me, mathematics is not about calculating or making practical observations. It is about immersing into this tower of thought.
Mathematics is unique. Unlike programming, it’s not constrained by the machines we can construct. In fact, it is *what* constrains the machines we can construct. It’s inspired by practical needs but isn’t beholden to them. Ungrounded in reality, it needs no “scientific method.”
There is a certain amount of arrogance and toxicity associated with that line of thinking. I’m not here to knock down on other sciences or anything like that. But the appeal of mathematics to me lies exactly in that: how utterly “useless” and “useful” it is at the same time.
Have you ever played Minecraft? When you’re out to explore the caves for the first time. When you get ore and make different tools, each more powerful than the previous one. When you reach the lava or craft a Nether portal. That’s what mathematics feels like to me.
So, to conclude. Do I want to learn math to get better at programming? Hell, no. Maybe someday. But just the idea of *applying* it right now feels like caging the bird of thought to sing one tune every day. No — I want to float free between the ideas and revel in their relations.
*correction, that would be π/4, not π.
• • •
Missing some Tweet in this thread? You can try to
force a refresh
can i pay google to never show me another AMP page? please?
like, i get it, many people find it useful, that’s cool. all i’m asking for is per-user opt out. is that really so difficult? AMP wastes my time because i always end up requesting the normal version anyway. wtf Google why can’t you just add an opt-out. it sucks
i don’t care about it for any ideological or big company reasons or “open web”. it just feels broken. it’s annoying like a faulty lightswitch or leaking boots or shaking table. it takes a medium that’s already shitty at usability (mobile web) and somehow makes it worse in my exp.
It’s ok. You don’t have to “defend” $technology. Sometimes it’s just a matter of taste.
I mean the aesthetic part. There’s a saying, “what’s good for a German is death to a Russian.” I don’t think it goes quite as extreme but what’s cute to some can make my eyes bleed and vice versa. That’s ok.
Then there’s also the model and which problems it solves. But who wants to talk about that 😛 Not me.
This thread is my translation of the Christmas Song by Boris Grebenshikov. More about this translation project (and an index of my other translations) in the linked thread!
To start off, I’d recommend listening to the song itself to get the mood. There are two versions that I think are interesting.
1) This is a recording from the 1984 live album which is considered canonical: aquarium.lipetsk.ru/MESTA/mp3/1984…. At the time, they weren’t allowed to play shows so they would play at friends’ places, and someone recorded it on a tape. The quality is crap but that makes it more visceral.
You might not know this but I enjoy translating occasional song lyrics from Russian to English as a hobby. I usually just throw them away but I figured some people might find translations interesting! So, in the spirit of the internet, I’ll be threading them here.
In particular, I like to translate songs by Boris Grebenshikov (Aquarium). He became prominent in the 80’s when USSR underground rock music went mainstream. Lyrically, he established a unique blend of Russian songwriting, Dylan-esque imagery, references to Tolkien, Lao Tsu, etc.
It is important to understand that in the Russian musical culture (at least between 80’s and 00’s), the music itself tends to be secondary, and the lyrics are at the forefront. Sometimes this means the music is shitty or derivative, sometimes it’s minimal (e.g. acoustic guitar).
I’m looking for a math tutor in London. Ideally for in-person weekly meetings (sick of zoom, yes I’m fully vaxxed). My circumstances are a bit unusual. I’m not a student and don’t need to prepare for exams or anything—it’s just curiosity. [thread]
A little bit about me. I’m a software engineer but I always had some interest in math. As a kid, I learned derivatives before multiplication table. However, my attempts to learn math were sporadic and would fizzle out when I have no one to ask questions and support me.
My background is very patchy but similar to a first-year college student. I’m familiar with basics of analysis (and read Tao’s rigorous axiomatization in Analysis 1 though I didn’t do exercises). A long time ago studied linear algebra, diff eq, prob theory, but barely remember.
So. I have a medical symptom that’s been bugging me and so far doctors don’t know what it is. I don’t want to self-diagnose but at this point I want to ask if any of you experienced something similar — and what it turned out to be in your case, if you jnow. (Thread)
It’s been going on for about six months by now. It’s a bit hard to describe. It’s like sore throat but there’s no pain (even when swallowing). The sensation is more like there’s something in my throat and I want to clear it. It’s like I “feel” more throat more than I do normally.
There is no chest pain or anything like this. No real difficulty breathing except subjectively the airflow feels more “noticeable”. I get tired speaking a bit sooner than normal. The symptom does not progress linesrly — it’s roughly same level but some days are better/worse.