How much math you need for programming (2014)
lispmachine.wordpress.com
lispmachine.wordpress.com
So here’s what I should think is the obvious answer: No, significant formal or informal maths training is neither necessary nor sufficient for a successful or even exemplary career as a programmer. But talent and success in the two do seem to correlate pretty strongly, and those who do have above average backgrounds in maths seem to feel it’s beneficial and provides an advantage. No, you don’t need maths any more than you need strong writing skills or comfort teaching or experience with office politics or a sophisticated sense of humour. Those are all, however, astonishingly useful in getting the things you want, even if that’s only a richer experience of life.
It seems to me that lots of people have endless energy for this fight, unfortunately.
I can see being defensive about the importance of one's discipline in a society that sometimes seems to deemphasise it, but you'd think that struggle would make one more, not less, sympathetic to the need to keep basic literacy in other disciplines.
It’s a shame, too. As an undergraduate I had a very small amount of exposure to some papers in theoretical computer science. I presume they were fairly typical for the world of mathematics - trying to establish boundaries on how small something can be. And not much application in the real world. But I remember having my mind blown at the way the authors could take one problem, convert it to some completely different domain, and use previous work in that domain to prove things about the original problem. It was very beautiful, and I think even that very limited exposure has changed the way I see the world.
Then the real world came knocking and I haven’t been back since.
Most of college was proving everything.
Okay, I get this is important for high level math.
I want to do “something” with it.
I did a lot of basic robotics programming for pay in early college. Taught myself a lot of math to get the job done. Later I hit Trigonometry. Wow that would have been handy in that role.
I agree with your post, except that statement is a bit of personal choice. From my perspective, knowing how airplanes work and how they fly makes my life richer, but I doubt lit majors would feel the same way.
(For example, when my house was built, I noticed a weak spot in the structure holding the house up, and had it reinforced. Without engineering training, I never would have noticed. Does this matter? In my previous house, some of the doors wouldn't close properly, and in the crawl space I noticed the main loads were not supported directly by a column on a concrete pad. The structure there had been gradually sinking. Jacking up that section of the house, installing a pad and a column, fixed that and the doors all worked again. I missed another structural fault until one day a window just shattered from the stress of the distorting wall.)
I would argue that this is wrong. That's what physicists do, not mathematicians. Mathematics is about abstract ideas, which can live regardless of nature or application. Physics instead is about understanding nature. Most physicists use mathematics to do that, but that's just for practical reasons. They don't always take it for granted, there's a very famous article by Eugene Wigner on this: “The Unreasonable Effectiveness of Mathematics in the Natural Sciences”.
I think it's important to understand this. Sure, computer programming is not math. Physics is not math either. Mathematics is kind of a way of thinking, and mathematical language turns out to be very useful in describing and understanding nature and many other things. Computer programming theory stems out of mathematics, but I agree that everyday programming practice does not strictly require an in-depth math knowledge.
But it depends. One day you wake up and you want to solve a problem: sometimes you need programming, sometimes you need math, sometimes both, or maybe you need some business experience, psychology, whatever. We need different perspectives, I don't think we can compartmentalize these things any more.
Notice that many mathematicians would not agree with you, here (but probably, a majority would). As the mathematician V.I.Arnold famously said, "mathematics is a branch of physics where experiments are cheap". So, yes, in the minds of lots of mathematicians, what they do is precisely to study and understand nature.
Mathematics is the study of patterns. Any kind of pattern you can imagine, in anything, including relationships between things. What things? Any things. That covers a lot!
Most pure mathematicians I've met/worked with actually look down (in a jocular way) on applied mathematics/physics. When Lagrange reformulated Newtonian physics, he was very proud of the fact that he didn't use any diagrams and arrows showing forces in his paper. In fact, of all the Physics I've seen, I found Lagrange's work to be the most beautiful and elegant.
I love how the commenter put it as "Nature is of no consideration whatsoever in some fields of maths". I'd restate it as "Nature is of no consideration whatsoever in pure mathematics" and I'm quite sure that the pure mathematicians would agree.
It's not about actual nature (the universe etc) being into consideration.
It's about many mathematicians coming to see maths as exploration (physics-style) of a mathematical universe, so to speak, rather than a simple constructive process.
So, they come to see mathematics as a kind of physics in this regard, no in the sense that they concern themselves with the outside nature. But in that math work appears to them as exploring a natural landscape (just one made of patterns and numbers).
> rather than a simple constructive process.
This requires some more distinction. 'constructive' can mean very different things. Some non-intuitionists would consider their counterparts definition of 'constructive' as possibly OK, but simple - and held other cases still for construction. Anecdotally, Ramanujan received his results as an inspiration from his household deity. Thinking about it probably brings up 5 different opinions among two people.
>> Muddying the waters, some mathematicians would expand the definition of "nature" to include completely abstract ideas - anything that feels "discovered", for example.
Though I wouldn't necessarily consider it "muddying the waters", but taking another criterium as important in the distinction of physics-like or not.
Namely, not whether it concerns the study of the material universe, but whether it involves experimentation/discovery of in place structures, and other such physics-like processes (which they think it does).
I’m not sure if mathematics belongs in the sciences or art; it really has hallmarks of both.
It a modeling language that can be used to describe the universe. You don’t have science today, without the math.
Yet some of the proofs and mental exercises in pure math are almost divine; inspired in a way that resonates like a beautiful work of music.
In a way, yes, as it extends the casual/conventional understanding of the term. I'm just saying it's not done to intentionally muddy the waters, but to introduce an alternative understanding.
So, yeah, we agree!
Actually, you've probably done that yourself, in a programming setting: integers modulo 2, where 1+1 = 0. It's useful in places and the consequences aren't too ridiculous in this case.
Following through figuring out the consequences of rule changes is a key thing mathematicians do. E.g. do we need this rule? What if this was weaker? What if this was reversed? What if we had this extra restriction?
I'd argue they do, numbers arise when counting and counting is definitely a part of our reality. It is pretty hard to imagine a universe where you can't count things.
On the contrary, it’s very interesting to explore the consequences of something we take for granted being actually wrong or unnecessary.
In such a universe, how is conscious thought even possible?
Not quite. Your parent post was about thinking beings being incapable of counting, unless I misinterpreted, not about the universe making it impossible for anyone to count. My analogy is that for a while our universe was one in which non-Euclidean geometry was unfathomable for at least one thinking species, although it clearly can be observed in the universe.
Counting is something that is deeply embedded in our evolutionary tree (some fish and frogs have a primitive ability to count). So of course it seems fundamental to us. But to me this is not a proof that you cannot think without being able to count in our familiar way.
For example, you could perhaps build a logical system using uncountable quantities and still get something out of it. Like some fish which are able to see which school is bigger and base decisions on this without being able to count.
It's like imagining a universe where True == False. It's not a hypothetical, it's a logical impossibility.
True == False does seem pretty broken though. Not sure that can go anywhere.
Mathematicians work on extremely simple objects as a basis. For example (since we're here), give them a 0 and 1, and they will spend 200 years building a whole theoretical world from that, an artificial system they will describe through thousands and thousands of pages of theorems, getting more and more complex as time goes.
Nature is an extremely complex system from the start. Trying to understand and describe it is not at all the same approach. You take a complex system (the complexity of the system is given, fixed externally by the nature) and try to simplify it.
You can see this difference in the software world too.
Mathematicians (CS) will build and favour the use languages which are based on a single simplistic axiom: "everything is a list" for the most famous example, "everything is a function" for others, and then you are supposed to build all the rest on those simplistic bases, and in practice that will mean twisting, bending, squeezing the problem world (i.e. the nature) to make it fit in your model.
On the other side, you have programmers, which will more often favour practical, pragmatical languages, which do not exhibit the clean regular, symmetrical simplicity of the former ones, but which are more adapted to describe a complex, irregular world.
Physics is experimental model building of phenomena which are not yet understood and are being explored.
Engineering is experimental model building of phenomena which are mostly understood, albeit sometimes with some quirks and unexpected edge cases.
Applied math is the toolset used in both physics and engineering.
Pure math is the abstract and philosophical exploration of symbolic relationships within all of math.
Academic CS - Wirth and Dijkstra-style - is the tiny subset of pure math used to explore theories of computing.
Practical CS is mostly just relatively trivial puzzle solving using a combination of cookbook academic CS with a bit of invention and innovation with influences from user psychology, marketing, and business design.
The most academic and mathematical parts of practical CS is ML and AI, which are genuinely exploratory. The second most academic part is probably processor architecture, where you may be applying statistical modelling to cache design and instruction pipeline outcomes.
Most of the rest is pretty basic compared to engineering modelling - never mind academic physics.
Every discipline has its ivory tower and “plebeian” branches.
No need to give physics a free pass :)
Math is the study of abstract patterns and those cannot be escaped. But just because individual mathematicians dedicate their lives to finding abstract patterns inspired by physics doesn't mean that either physics or math are branches of the other.
I think that is not so much subsuming mathematics under physics as a cheeky way of avowing mathematical Platonism, where eternal mathematical truths reside in some Platonic realm of ideas and wait to be discovered (not invented or proven) by mathematicians.
https://www.uni-muenster.de/Physik.TP/~munsteg/arnold.html
As you say, it is written in a playful and cheeky manner, but it is just a rhetorical device; the meaning is certainly very deep. Even deeper and longer, but in a similar spirit, you have this text:
http://math.ucr.edu/home/baez/Polymath.pdf
It starts with a famous quote, replicating Caesar's gallic war:
All mathematics is divided into three parts: cryptography (paid for by CIA, KGB and the like), hydrodynamics (supported by manufacturers of atomic submarines) and celestial mechanics (financed by military and other institutions dealing with missiles, such as NASA).
Regardless of nature of application, yes, but not so abstract otherwise.
Many mathematicians consider math to be more like physics, where you discover things, there is experiments, etc., than a mere axiomatic system where you invent things.
That was an increasingly popular idea about math in the 20th century (and haven't heard otherwise in the 21st).
I do however feel a little sorry for the some /r/programmerhumor post-ers, who are obviously students who think that everyone just copies stackoverflow - I understand what my code does, I look at the assembly etc. etc. I wrote my first interpreter at 14/15 though so I may not be the best example, but you get the idea.
I would disagree. They both are the study of nature just different aspects of it. Mathematics is the study of the some of the more universal formal causes, while Physics also involves the particular material causes.
> They try to understand mathematics and use mathematics as a language to do that.
None of them are skills that a programmer needs unless he works in the field. Maths is the same. You need very little maths to code unless your field requires it.
And even then, sometimes you don't even need to. I worked on a software that computed material fatigue with absolutely no idea about the maths involved, the mechanical engineers just told me the formulas and constants to use as well as the expected results and I implemented them. (not entirely true, but it was just personal curiosity, absolutely not required for the job).
It is the same with algorithms. Some times a role is utilising the basics all the time and you rarely get passed some DB access, lists and maps. In others I have needed to build a Type 2 ary tree with lockless parallel access. I think what ends up happening is that most projects have some tough stuff and some have a lot more of it but you can contribute to those projects without knowing how to solve it because the bulk of most programming is fairly simple. But that deeper knowledge is needed by at least someone on the team at some point in time.
I can totally understand WHY maths would be important for some programmers (and why thinking mathematically would help), but "programming" covers such a spectrum - for me it's always felt more like the Lego I spent my entire childhood building was more important. Somewhere between logic and creativity.
There are times when I wonder "hmm would I have known this alreay had I done A-level maths at school?" but that I think is general imposter syndrome more than anything. At least for me, I've never needed anything particularly special maths-wise for professional work, apart from derivatives for ML/AI and even that was just academic-self-pleasuring from the course I took... no ML library requires you to mathematically prove something before you can use them (at least not the ones I have used)
Was a long road, and would have been a lot less torturous if I had been better in math. Not because I've needed math much in my programming career, but because my bad math became a reason that gatekeepers closed doors on me over and over again. Perhaps the strongest cause of imposter syndrome I have at work is less related to not having a CS degree -- because I feel like I know about 99% of the content of any CS program -- but more to do with the fact that I work around a lot of maths geniuses.
In reality the "math" I failed in high school was more arithmetic than mathematics per se. I feel like I might have a disability around numbers but I've rarely had problems with the higher level symbolic manipulation involved in algebra or programming or symbolic logic, etc. though my probably-ADHD means I have to really step back and work through things at my own pace in my own environment, and so whiteboard coding type interviews really piss me off.
Perhaps that's why I've always found excellent engineers from Canada's flagship schools (U of British Columbia and U of Toronto) :p
More seriously though, I have an advanced degree in Math and seldom needed it for development work, even when I was working in more quantitative roles. And whenever I did need the knowledge I would just look up and learn again. Glad you're doing well without a traditional background.
But in Canada generally we don't have the same level of status game around school reputations that Americans seem to have. Certainly grads from U Waterloo do very well, but they may have as much to do with their excellent intern program than anything else.
UBC and UT certainly receive more funding for computer science and engineering and they're generally well regarded research schools and highly recruited from. UT seems to be slightly more prominent but I'd wager it's a result of the school being much larger with multiple campuses all considered the same school. Same story with Waterloo's computer science faculty being many times the size of UBC with mandatory internships in its undergrad program.
Perhaps the reputation of schools domestically in Canada is different than their brand overseas, as UBC is known even in Switzerland and Sweden, but Alberta and Waterloo are completely unheard of. Even now as I relocated to the USA, UBC comes up often (despite the relatively small Computer Science faculty) and all the past companies I used to work for across quantitative finance and autonomous vehicles recruited from them.
But developers should at least know basic calculus, logic, and what what you need to grok basic algorithms and data structures. That part of math isn’t even meaningfully separated from “programming”. It’s one and the same. Programming is math. Math isn’t just a useful skill that some times pops up as useful. Without math, programming is merely typing.
How much English do I need for writing?
The fact that middle school mathematics is often disconnected from what most people would find useful is a big problem.
Math is a language and a developer will get a code review explaining something using that language (complexity etc).
You can do without it but that doesn’t mean it’s a good idea not to simply know those things. It’s not years and years of math, it’s a tiny bit.
I’ve never been able to grasp mathematics as numbers. My ability to work with numbers is severely compromised by my disability. This hasn’t hurt my ability to excel as a web developer. In fact, while I can’t visualize individual formulas or algorithms, I can visualize very complicated applications. And I likely know what types of algorithms and data structures would be likely be optimal.
Even if I don’t know the “correct” math, I know where to look for it.
That’s not true for every language paradigm.
IMX numerical integration is useful in some areas (like physics simulations), but I haven't encountered any non-trivial applications of the kind of calculus that's taught in most schools, which focuses on continuous functions over the reals.
That would depend on what sort of writer you were and what sort of ideas you are trying to share (and, I guess, your audience). Most famously, Hemingway's The Old Man and the Sea is written in a such a way that an 12 year old could read it and understand the plot.
But most programmers don't need to use or understand the specialized notation of math - all the weird and beautiful symbols. We use the programming language as notation instead.
Some branches like calculus or statistics are not used regularly by the average programmer, but other branches like integer arithmetic or boolean logic is pervasive in any form of programming.
"Programmers are mathematicians that solve all their problems by Induction"
After being a software engineer for over half a decade now, that still rings strangely true to me
"Mathematical induction proves that we can climb as high as we like on a ladder, by proving that we can climb onto the bottom rung (the basis) and that from each rung we can climb up to the next one (the step)."
For-loops are a discrete form of mathematical induction and is a basic concept to do any kind of programming, hence the joke (of course its more nuanced than that but is true in a tongue-in-cheek kind of way)
I would tend to agree with the article that math can be quite useful as a general mental model and can often help to find cleaner solutions to some problems.
There are also a lot of applications that require some, often quite specific, knowledge of math: machine learning, cryptography, game engines, to name a few.
My high school offered a programming class for the first time (1998). I took it my freshman year, not having the required math. I remember realizing my sub-par math book was out on my desk in front of the teacher, then quickly hiding it. I think he pretended he didn't notice.
Of the 35 students (total) that took the class, 8 completed it. There was no second year class but the teacher (one of the few whose name I remember) asked me to come back next year and be his assistant and receive training one on one.
The next year, the school canceled the class. I checked out of schooling from there on.
2) How about designing and manufacturing a bike? Spokes and gears and diameters and metal expansion / contraction coefficients and whatnot.
3) How about doing number 2 from scratch? You start with some iron-enriched bacteria sludge ....
For 1), not a lot. Same for basic applied programming. I was perfectly fine modifying source code files to change strings & output without understanding any math, or even much programming.
For 2) When I wanted to develop a trading application, I needed some. It was before proper APIs, so I had to learn about rounding and what pitfalls it entails for currency. But today so much of development is glue. I made a license scanning and identifying app just by using someone else's code and gluing it together, but you bet there is math underneath doing the text recognition.
And then, if you want to develop something algorithmic, such, as, an example, a search algorithm, well, you are basing your algorithm on theory, and some of it math. Behavior and the concept of quality comes in, etc etc, but you better be good at math.
So really, if you want to make a product, you should be asking how much traction do I need before I invest more in the product.
If you want to program, you want to program what you like. If you need to program to solve a problem, then you start with the science classic, the literature / domain review. It sure will outline how math heavy the domain is.
And if you want to address something with math, you probably know at least some math. I'm not going into how you address finding out what you don't know.
My point, as many others have made above, is: how much math you need for programming depends on what you need to program, and why.
What you write may or may not have a strong maths component ( game engine vs crud app say, or PDE solver vs typical 'plumbing' app).
However, the moment you start having performance issues (and this is everywhere), maths comes in very handy : big o, back of the envelope calculations, orders of magnitude, etc. You may call it engineering (and to a large extent it is), but I tend to lump quantitative reasoning on the math side and not on the compsci/engineering side. It's not necessarily extremely sophisticated, but having a 'quantitative view' of your code can help a lot.
I remember many many years ago developing a sudden interest in algorithmic complexity (and what quadratic meant..) after having used a bubble sort to sort polygons in my 3d engine. Needless to say, log became a fairly interesting function after reading a bit more on sorting!
Another useful side of the model / math approach is that it allows you to formalize your problem and derive hard bounds, ie know in advance what's achievable and what's not (the 'let' s derive a bound' approach being another standard method in maths).
In my experience, you don't need it if you work on the more conservative projects. If you want to build the next YouTube or facebook, you might find a good understanding of math invaluable.
At their core, isn’t what makes them great, their simplicity? Upload videos, connect with other people?
I’m no math wiz but can probably code an MVP of the product that FB and YT were when they launched. The colleagues you described probably could too. Would love to learn more about the hidden complexity!
If you do anything with graphics, you need a subset of matrix math, and there are graphics books which cover what you need. If you get into robotics, you need differential equations.
You don't need math at all to make a computer program. All you need is a computer with some kind of language that is easy to run installed and a tutorial for hello world for it.
But what about programming a program that does some math calculations? Seem like it would be good to know those math calculations that you need to implement...
Or lets take accounting software for example? You need basic math most of the time but it turns out it is quite valuable to know about accounting. Yes, you can write an accounting software without knowing any accounting and just depend on what product manager tells you. But it is much easier to understand what he is saying if you know a lot about accounting... It is also much easier and faster to make decisions without going to product for each tiny detail.
You can expand this to the problem of building teams. You can read few tutorials on agile development and what not, however knowing psychology and having enough empathy to understand people you work with in depth will bring much better results then any so called management book that is taken literally.
And so it goes... The more you know about how world works the better decisions you can make that eventually might lead you to better solutions to the problem at hand.
This is a general thing in life in my experience, but also one that seems to be looked over quite often... The more you know about problem domain the better you will be at problem solving inside that domain. Coding that solution into a computer program at that point is just a matter of knowing how to use that tool (which is a specific problem domain in of it self.)
Instead I will point an interesting fact I've noticed myself among my computer science classmates (from my second degree, I first did mathematics).
When you stumble around 'maths' (which in classes it's pretty common, to explain things using mathematical formulas, but in the real world it's also common to have some explanations even in stack overflow using math expressions), in that situation other computer science students usually see them as something 'strange', something to be afraid of or reject by searching alternatives; whether myself and other math/physics-students just don't care, we are used to it (and most times it's just a function)
My opinion is: you don't need maths (99.99% of the time), but you also don't need to be afraid of them and knowledge is very good for that.
Here’s a simple truth I’ve found about it though:
It’s more than you think, but less than advertised in the end.
A lot of the most complex mathematics is abstracted away from the average or even maybe not so average developer.
This I would say is a loose guideline more than a rule of course, there are exceptions
I will say though that what I have learned is that a typical thing we need to be better at as developers (myself included) is math related to date/time and currency. These are actually quite complex problems that even the best developers get wrong
For some applications, you need a great deal of advanced dynamic maths, for some applications, matrix math, for some, heavy-duty topology, etc.
I have a lot of admiration for folks that write software that implements advanced mathematical reasoning, but that is only a part of what is required to develop shipping applications and systems.
For me, I learned the standard calculus stuff, but never used it. I was never a math whiz.
What has probably had the most impact for me in my work, was good ol’ Algebra 2. It taught me how to do things like express word problems as formulae, use variables, balance equations, understand functions, abstraction and encapsulation, etc.
Absolutely. Reflecting on my path, I got that in Algebra 2. Everything after that, was really just scaling and application.
Calculus is 90% trig and algebra. Lots of it, and applied. Quite voluminous, but rather pedestrian.
It also depends on the stacks you work with of course. If you are doing doing a lot of Haskell for example you probably want to understand category theory and lambda calculus and whatever.
Useful for at least some programming or work I've done in the past:
* Linear Algebra
* Geometry
* Calculus and Vector Calculus
* Differential Equations, Partial Differential Equations, and Control Theory
* Logic
* Combinatorics and Graph Theory
* Number Theory
* Fourier Analysis and Laplace Transforms
* Operations Research
* Discrete Math
* Computability
* Probability
* Statistics
* Numerical Methods
Classes that I haven't needed for programming yet:
* higher levels of Abstract Algebra, Non-Commutative Ring Theory
* Real Analysis, Complex Analysis, Measure Theory
* General Topology (I suppose some concepts are useful in category theory and perhaps kernel transformations in machine learning are superficially similar to the subjects covered in Topology)
The world is full of programs so some don't require much math, but mathematical sophistication is needed for advanced programming and young programmers should do their best in school to learn math well.
Unless you're in an area that needs math, e.g. fluid simulation, computer graphics, proving algorithms, deep learning, crypography etc.
Although there is pure mathematics, I'm not sure there is such a thing as "pure programing". It's all applied, to do something. So there's always another field required. Sometimes it's math.
There is theoretical conputer science, but (a) it's not programming and (b) is it math.
I'm sorry but how long has it been since newsgroups were relevant? I loved them back in the day but it's absolutely not where a programmer noob should go in order to learn programming.
I wrote that blog-post back in 2014, that was 6 years ago. I learned programming from 2005-2008 and all of that was because of the help I got from the mentioned newsgroups. There used to be a few known names on USENET and everyone knew them and ask them for help. I really loved USENET. These days comp.lang.c is mostly filled with spam and comp.object died sometime ago. Life is about change.
Also some of us here from this forum also hang out at a Freenode channel named #spxy (also accessible via https://app.element.io/#/room/#spxy:matrix.org on Matrix). This is a small computer science and mathematics literature club, so quite relevant to those who are curious about or who work in the intersection of mathematics and programming. Incidentally, many members of this channel are also Lisp programmers.
'Musical theory' background probably correlates pretty well with 'good programmer' in my completely unscientific guess, though it's obviously not remotely a requirement.
'Building' however, is quite fundamentally different from 'theory'.
Do you remember the supposedly 'not so bright kids' who went to work in 'shop class' because they liked 'working with stuff' and not 'stuff in books'? I don't they were so dumb.
The process of 'making' engages us on an entirely different level than intellectualizing, and I think really differentiates the discipline. There are many bits of software that we use daily, not made by 'genius' but rather the sweat and effort of 'some guy who did it, mostly because it worked'.
You don't need any maths, but it's probably a good sign if you do.
Confusingly, CS is considered to be a branch of mathematics, but it is still quite different from "traditional" (up to 19th century) math (linear algebra, calculus). I have a slightly different philosophical view, I consider CS to be on equal footing with most of traditional mathematics. In my view:
- Traditional math (which came mostly out of physics and geometry) studies primarily infinite but countable structures (functions on countable sets, infinite series). The finite structures are often considered trivial, and the uncountable structures are considered to be too large to have practical importance.
- Computer science (gosh I wish there was a better name of the two disciplines) is concerned with finite structures which are too large (in practice, functions on sets with more than 2^32 elements) to be represented by enumeration. In analogy to finite/countable/uncountable sets distinction in traditional math, small structures that can be enumerated in practice are trivial in CS, larger structures (infinite ones) are pretty much impractical, and they are simply universe in which we operate. (This leads to algorithmic languages, which are essentially descriptions of arbitrarily large finite sets.)
- There are other branches of mathematics, logic, category theory, algebra, which are concerned with building bridges between the two above subareas, which are probably many.
My point is that for (theory of) programming, you need computer science (focus on large finite sets), and study of infinite sets is less useful. But historically, it's not how mathematics became subdivided, and it is a distinction useful from applications of mathematics, not mathematics as a general study of structures (regardless of size).
I don't think this is the case at all. Basically all of calculus theory in based on uncountable structures and it's arguably the most used branch of mathematics.
Analogically, in CS, you use infinite sets (integers) but you don't really care what the cardinality is. You don't care about the axiom of choice.
I agree with that, but I fail to see how that means that traditional math studies primarily infinite countable structures.
In contrast with CS, where the building blocks are finite, and the resulting structures can be large finite or infinite, which in practice only matters a little.
With 12 years of experience, I would say this is true. I would even say that my fucked up logic makes me a very good debugger.
Yet beginners getting hazed and outsiders getting scared with CS/algodat and math is essential for keeping wages up and „normies“ away.
- you're putting algorithms and data structures in the same basket as mathematics - algorithms and data strucutures are useful in pretty much any programming job including CRUD and frontend
But when you're working on a huge project with many people and many users, lots of data (while slowing down the number of new features), math gets very important for modelling the behaviour of that huge system and getting every extra $$$ out of the network effect.
I myself love math, and a very bad fit for small companies, while people who just like to get dirty in throwing together features thrive there.
As an example Facebook was dropping messages for a long time, and when Google started Google+, Facebook got serious in fixing bugs with consistency of its features, and started to focus on latency (using Google hires of course).
Then, if you don't know the math that applies, you may never even see the opportunity, and be convinced that math does not applies to what you do, and that you never needed it in the first place.
And often, it makes you the most natural person to work on the most interesting and challenging problems.
As I recall, the emphasis was primarily on graph theory with no applications. Maybe its nice to have for a undergrad CS major but even there I wonder what percentage will go on to actually need/use such material? I suspect it is fairly niche.
From loops to architecture, this is applicable. Of course, you can apply this deeper, to processing efficiency, fetch times, etc. etc.
I think most other fancy equations or theorems can be learned as needed. But sense checking your math with skepticism about your own assumptions, and knowledge of orders of magnitude, is key.
Unless its in finance.
I'm a front-end developer and never needed any math until I got a job at a large finance company. We had several mobile apps that required some calculus, statistical models and some differential equations.
In college, I only had to take through Trigonometry for my major so when I was suddenly tasked with this stuff, I eventually had to lean pretty hard on two of my co-workers who had CS degrees and were much better with it than me.
I got through it unscathed and ended up with a much greater love and appreciation for math.
"Computer science could be called the post-Turing decline in the study of formal systems."
Recently linear algebra has come to the fore for AI.
It’s probably better to be well organized and a bit of a cleaning maniac to keep your code clean and easy to maintain.
I wish I had taken more math courses and now I'm seeking to learn on my own or possibly taking classes.
This can be generalised even further!
In programming X is often abstracted, so you don't need to know much of X to know how to program...
"How much X do yo need for programming"
It helps to have knowledge about X if you want to come up with a solution.
That being said some domains equipment require a fair bit of maths. Currently working on a game engine and trigonometry and linear algebra are very common tools for me.
First, Military
During the Cold War, around DC a large fraction of the interest in programming was for some of the math for the work of the Cold War.
Then I was programming at the David Taylor Model Basin in numerical fluid flow, that is, solution of the Navier-Stokes equations. Some of the work involved an early computer algebra package Formac; I used it for local series solutions to the equations.
Later there was work with the fast Fourier transform (FFT): A guy had wired up a hardware box for the algorithm. I showed him a version of the FFT that used the same signal flow graph at each algorithm stage. His jaw hit the floor: That version of the FFT could have saved him a big fraction of all the circuitry in his box.
Later I was in a software house bidding on a software project from a Navy lab. In part the lab wanted to be able to analyze and simulate ocean waves. They wanted to regard the waves as a second order (covariance) stationary stochastic process. For the analysis, calculate the power spectrum of data collected at sea on ocean waves. Then for the simulation, generate sample paths of the stochastic process with that power spectrum. So, I dug into
Blackman and Tukey, The Measurement of Power Spectra,
saw the statistical basics, and quickly wrote some illustrative software that did the work. One of the lessons was, to get an accurate power spectrum takes, roughly, some number of cycles of data at the frequencies of interest so that at low frequencies, i.e., for ocean waves, need possibly a lot of data, hours, where in radio engineering can need just seconds. I showed the results of my software, and our company got sole source on the software development project!
Second, Academic
At one point, I was consulting in programming, data analysis, and algorithms at Georgetown U. and teaching courses in computer science. One prof had programmed some polynomial curve fitting and was getting bad numerical accuracy. There are connections with the notorious Hilbert matrix. I programmed for him a version based on constructing polynomials orthogonal over the given input data; that approach had much better numerical accuracy.
Third, Commercial
E.g., GE was running a computer time sharing service, and there I was the main GE HQ guy for math, numerical analysis and statistics. So, it was statistical hypothesis testing, classic regression analysis, analysis of variance, factor analysis, polynomial curve fitting, some non-linear curve fitting, random number generation, sorting algorithms, all of standard numerical linear algebra, interval arithmetic (for guaranteed numerical accuracy), digital filtering, the fast Fourier transform, solution of ordinary differential equations, and more.
Later I was programming at FedEx. A first little bit of math, hard for the other FedEx people, was how to calculate great circle distances. A simple solution is to use the law of cosines for spherical triangles. The software I wrote to schedule the fleet used that solution.
Later FedEx wanted some revenue projections. We knew (a) our current revenue and (b) the revenue at the planned full service. So, the projections were a version of an interpolation between those two. So, how was the interpolation to go? I argued that the growth would be from word of mouth advertising, that is, viral growth and that growth would be directly proportional to (i) the number of current customers talking about the service and (ii) the number of target customers to be hearing about the service. This led to the first order, linear, ordinary differential equation initial value problem
d/dt y(t) =
y'(t) = k y(t) ( b - y(t) )
where t is time (in days), y(t) is the revenue (dollars) a time t, b is the planned capacity of the service, k is the constant of proportionality, and y(0) the current revenue. There is a simple closed form solution. We picked a value for k that gave a reasonable graph, and that was our projections.
Uh, with more details, each of those two FedEx projects saved the company once.
It may be that currently in the commercial world there is interest in principal components analysis and various cases of curve fitting, linear and non-linear.
Fourth, Startups
Currently I have two startup projects going: In some contrast with
Sam Altman, How to Start a Startup
at
https://startupclass.samaltman.com/
key to both is some relatively advanced, original math I derived. The math is the crucial key to being able to deliver the service and is the secret sauce, "unfair advantage", technological barrier to entry, difficult to equal.
Broadly, the power of current computing is a wide open invitation to use the computing to do the data manipulations for some math that can be powerful for some real problems. Then that computing needs programming so that it can help if the programmer knows the math.
Net, in some contexts it can help if a programmer knows some math.
> Computer Programming is not Math. Let me say it again, computer programming is not Math and will never be. You want to learn computer programming, then learn computer programming.
Programming is far more aligned with writing than math. If you want to be a better programmer be a better writer. Math will not make you a better programmer.
Conversely, programming will not make you a better writer, but it will make you better at math. This is complicated, but provable with testing.
The term math is extremely misunderstood. Math is not a practical exercise, it is a philosophy, a way of thinking. Lay people believe the word math is interchangeable with arithmetic, which it isn't. Arithmetic is the expression of immediate computation. Math is more than that.
Writing algorithms and instructions is algebra. Algorithms are always algebra. Always. Algebra is the conveyance of instructions, which is inclusive of arithmetic, but is more expansive and accounts for variability. The word algorithm literally comes from the Latinized name for the father of Algebra, Algorithmi. https://en.wikipedia.org/wiki/Muhammad_ibn_Musa_al-Khwarizmi
Planning is calculus. Calculus is the expression of continuous change. Calculus accounts for states in fluctuation and differentiation. Calculus allows for thinking in terms of various potentials and collections of decisions.
The reason why writing makes you a stronger programmer but math doesn't is because math doesn't force critical examination like writing does, at least not until you get to Calculus. The reason programming does make you better at math is because it teaches you to solve tough math problems without ever having to do math, because Math is a philosophy, a way of thinking.
This is provable with numbers. Simply test people, compare the testers, and then compare those differences against programming capability. This is provable objectively with numbers. If you want to hire better programmers test for writing performance. The best filter of a group of candidates, for programming potential, is a tough essay to write under time pressure.
When I took the military aptitude test, the ASVAB, the first time I was 17. My scores indicated that I was smarter than 79% of the people who took the test that year, but the only score that really mattered is the GT score. It is an examination of solving complex mathematical word problems under time pressure and is graded on a scale of 0-130. I scored I 107. Smarter than average but not smart enough to become a military officer. 17 years later when I wanted to be a military officer I needed to retake that test at which point I was smarter than 98% of the population who took the test that year and I scored a GT score of 129 (out of 130). I had been programming for 6 years at that point.
What’s more, that page says “Mathematics has no generally accepted definition. Different schools of thought, particularly in philosophy, have put forth radically different definitions. All proposed definitions are controversial in their own ways.”
I think all programming can be considered math (not higher math (https://www.merriam-webster.com/dictionary/higher%20mathemat...: “mathematics of more advanced content than ordinary arithmetic and algebra, geometry, trigonometry, and beginning calculus”), but math)