Rediscovering Math as a Dev
It can’t be a coincidence that so many good programmers have a math/physics background.
What's more, they all claim that knowing math “helps you think."
I’ve usually dismissed this reasoning as hand-wavy.
How will L'Hôpital's rule help you build an Electron app?
Is It All Correlation?
Back in university, although I enjoyed the stringency of math, I used to dismiss its transferability as a skill along the lines of: Analytical people go into math, and being analytical also helps in programming. If you're good at the former you'll probably be good at the latter. But it doesn't imply that math will make you a better programmer.
I have since changed my mind about this.
1. Math as a Teacher of Abstraction
If the main idea in programming is divide and conquer, then the main idea in math is abstraction.
Studies in mathematical theory is an excellent opportunity to learn to analyze, reason, argue, structure and arrange. Mathematics is based on abstraction and those who master abstraction possess enormous strength in analytical contexts.
— My old calculus compendium (translated by me)
Let's be clear, nothing will teach you more about programming than programming. But the abstraction ability that math gives you can help you grow into more senior roles and do higher-level tasks like designing systems. And if you want to go into deeper domains like quantitative finance, machine learning, or research in general, advanced math is a must.
Of course, not all math is created equal to the programmer. There is a reason why computer science degrees focus on discrete mathematics, linear algebra, and statistics. But there might be some alpha in learning more esoteric math like abstract algebra too.
2. Math as a Teacher of Confidence
Read the source of your dependencies, if that’s not already a habit you have. Do you write webapps on React? Try grabbing a checkout and reading through the source sometime.
— Nelson Elhage in Computers can be understood
If you've ever fought, you'll know that a good sparring session will have you walk out of the gym chest up, top of the world. Taking blows to the face instills godly levels of confidence. Makes you humble too.
Likewise, a focused math session will make you feel like no problem is too difficult to solve. Is your ego inflated? To some degree, for sure. Doesn't matter. Bring this intellectual confidence to your programming and you'll go where others fear. The time isn't always right to go down that dependency rabbit hole to gain a multi-leveled understanding of the system as a whole. But when it is, you'll kill.
Furthermore, math is ruthless – it won't allow you to prove a theorem if you don't understand all required definitions and axioms inside and out – it constantly humbles you to study more. This is gold in programming.
Should You Study Math as a Dev?
This weekend I picked up an old calculus compendium from university, and it made me nostalgic for the tightness of math. Opinionated definitions, abstract theorems – it's a breath of fresh air compared to complex systems and poorly documented tools. Working through a couple of chapters on sets and logic reminded me of the stringent state of mind doing math puts you in.
After a couple of years in software engineering, I still haven't found an application of L'Hôpital's rule, but I have found a meta application. Math teaches abstraction ability, but above all, it instills the view that everything is figureoutable.