For those programmers who are weak at math and trying to figure out just how much and what kind of math is required to get started with programming or get better at it.
Programming is not math. Computer science however is based on boolean and predicate logic and borrows requires mathematical thinking and methods as well. That being said I don't find the basic algorithmic analysis stuff very math heavy unless we go into induction and analysing recursive functions.
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.
Hm. To me programming is a subset of mathematics. You are right it is not math, but its origins are definitely mathematical. There was Alan Turing who built the first computer to decifer nazi communications. But the axis too used "programming", by calculating optimization algorithms to determine rocket trajectories... Of course there is more too it, but an understanding of mathematics is good for any programmer.
Yes I agree with you but I like to make the distinction between computer science and "programming". I.e the study of computer programs and algorithms is absolutely based on math but most of every day programming isn't really focused on that. As in when you write your business logic or UI code or whatever there's not that much math per se related to the software itself more just the domain math if any.
I have/had a few colleagues with almost no math knowledge beyond primary school. One was quite a good programmer, interested in all kinds of technical stuff. He had failed secondary school because of, well, reasons, but he wasn't dumb, and wrote decent code and was quite inventive. Another one was someone with a business school degree who had changed careers. Not a glitch in his school career, but his math was very weak. Not a great programmer, but he had a good feel for UI. I've also had a colleague with a math PhD. He was a very good programmer, although not very fast.
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.
Followed you fully, right up to the end. Why would a good understanding of math be invaluable to start the next big thing?
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!
I think (and I believe the parent poster does too) that math becomes relevant when things are starting to scale. Sure, creating an MVP of FB can be done quickly with minimum knowledge of maths. However, if it starts attracting a lot of users, suddenly algorithms and theory becomes very very important to minimize cost while optimizing performance.
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.
It would be nice to have a map. Some programming is plumbing.. some is investigating (maintenance).. some is more attention to details (specs and protocols) but sometimes it's raw wide and deep math. You don't solve dynamic programming problems without a mathematical thinking (or else I want to see 'you' operate :)
It really depends on what software you're working on. If its regular web development, eshop, fintech etc, math knowledge required is close to none. Backend or frontend doesn't matter. If you switch to more advanced software e.g. geo, cad, games then it's a different story.
I'm a game programmer, so I definitely have some bias (bare minimum of acceptable is somewhere between advanced high school and first/second year linear algebra, with some calculus being very helpful), but in practice I've found the more math I know, the more I use. I've been working on stats recently in the evenings, and have used quite a few of the concepts in my day job already.
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)
I gave up maths as soon as I could at school (16) and didn't study it for an A-Level. It was required for my CS degree, but they let me in without it. I had to apply myself a little more to pass the maths modules, but I don't think maths has really been important to me or my career.
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.
Same here, although my degree didn't require maths A-level.
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)
I think the only possible answer to how much math do you need is that it depends on what you work on.
There is a lot of stuff that can be done only using very basic math, that's for sure.
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.
But you use math all the time when programming, probably without thinking of it as math. Boolean logic is math. Incrementing an integer is math. A pixel coordinate is math.
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.
It depends on the scale and latency requirements: for a startup creativity and pace of execution/person is the most important (just like Facebook in the early times).
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).
There are two different problems actually : what you write, and the quantitative aspects of your code.
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!
I'm self-taught with minimal maths and this is something I've used. I started re-learning some basic math for fun and now I find it helpful now to visualize mathematical models of some basic runtime characteristics of my programs. A simple example is that I will visualize X number of users firing Y number of requests, and I'll actually imagine this as a live system with various statistical properties (% of errors and the like). It's not typically strictly mathematical—I don't write down many (if any) numbers or symbols—but I'm creating a quantitative model in my mind to think through the behavior of my program when actually in use as opposed to a sequence of logical commands like I usually do.
Indeed! I very much agree with the model vs sequence opposition.
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).
You need all the math for the domain. If you are in engineering, games, DSP, ML, then that can be a lot. At the same time some developers can go a whole career without ever (knowingly) using a floating point number. They work with web sites/services/databases/apis etc.
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.
Meh, disagree. A bunch of developers I know don't know the Pythagorean theorem but they are crazy good (developers). It completely depends on what your job requires you to do. For some developers to be great, they don't need even middle school math.
I agree with this 100%. Hard math rarely has a use outside of it's scope. How often are you really trying to simplify the cotangent multiplied by an arcsin? Sure people who deal with trigonometry do often. But that subset of people is even smaller than people who do geometry. I'd wager carpenters do more math on a daily basis than the average programmer.
I doubt Pythagoras would show up very often outside of domain problems, but basic logic and polynomials, logarithms etc shows up everywhere where you do algorithms and data structures.
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.
With that weak of a definition of math, you might as well say any first year high school subject is a prerequisite. If you didn’t pass any of those, chances are you’re not a great programmer either.
Simple example: monitoring your systems when data only increases, like number of hits to your site or queries to the db. That graph is always up and to the right. However, if you look at the rate of change (cough, derivative/calculus), the graph now tells you interesting things. Granted, the calculus understanding there is superficial, but it is there!
We can talk about those things without the language of calculus, though: "this graph shows requests per second, and that graph shows cumulative requests." And I think it should be clear how to derive one graph from the other, with or without calculus training.
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.
It crops up when you start to do statistics usually. That said programming itself is usually more about discrete things, so knowing about calculus is more helpful in figuring out what to use programming for than programming in general.
Calculus doesn't relate to the work of the programming majority. I've only seen it used for domain-specific work or in contrived examples (like LeetCode-esque problems).
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.
Programming is nothing more than a list of instructions. Understanding data structures doesn’t require math, just logic. Maybe some mathematical operations can be derived from observation but the numbers behind it don’t really need to be known.
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.
The question seems a bit backwards to me (who come to programming from maths). I am more familiar with the opposite question "how much, if any, programming do you need for math?" Every year I meet lots of math students who love math but hate the very idea of programming, as if it was a dirty and unnoble thing to do. I have to convince them that sometimes it may be useful for them. The best course of action is to start by offering the game: "you don't need any programming for math, except in very particular cases". This gives them a clear starting point where they feel safe. Then we work from there, showing them inductive experiments that would be impossible without computing. For example, it is well known that Gauss would check, by hand computation, many theorems about prime numbers before attempting to prove them. This entailed many days of tedious hand computation that he was very proficient at. Today, most of these experiments can be programmed in a handful lines of code and the computer verifies them in a second. Then some students are eager to actually see these lines of code, but more importantly, to see their result.
Having come from the science I think you have a good viewpoint. We didn't learn programming to program. We learned it because it is a useful tool to model and stimulate. A necessity to do science in the modem world. It was only later that I started to dig in more because I found that I actually liked using this tool.
As someone who has formal degrees in Math, I believe this is mostly because the programming Math students do is extremely tedious and simply not enjoyable. In school we were making graphs in Matlab/Octave/Mathematica/R which I think most programmers would not like. Maybe some used Python if they were lucky. Coding visualizations, solving matrices or convex optimizations in Mathematica is not exactly inspiring.
> Now what does does a mathematician do? He tries to understand nature and uses mathematics as a language to do that.
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.
> I would argue that this is wrong. That's what physicists do, not mathematicians.
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.
In that sense, though, programming would be a branch of physics that's concerned with making brute-force experiments cheap (thus saving the mathematical work needed to find clever tricks to do that same experiment by manipulating a small bunch of symbols).
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.
Even if a lot of mathematicians think math is about studying nature they are demonstrably wrong. One can do maths that has no known relation to physical reality, has no basis in physical reality or sits in direct opposition to how physical reality actually works. That is precisely the opposite of physics to say that "well, if I can imagine it it must be nature". So by counterexample, since the field of maths contains things that are anathema to the science of physics maths cannot be a branch of physics.
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.
You are making a lot of ontological and epistemological assumptions that are contentious in the philosophy of math. Not saying you are wrong in thinking this, metaphysical questions don't necessarily have answers, but many would not agree with you.
I am a mathematician. Nature is of no consideration whatsoever in some fields of maths. But nature or applications to it are the primary focus in many other fields of maths. In still others, nature would be a source of analogies, or applications of a few special cases, etc. Muddying the waters, some mathematicians would expand the definition of "nature" to include completely abstract ideas - anything that feels "discovered", for example.
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!
>I am a mathematician. Nature is of no consideration whatsoever in some fields of maths.
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).
Yes, that's what my comment says (but maybe you read it before I edited it to be clearer):
>> 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).
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.
The controversy between assuming a point of view of "creating" vs "discovering" things is as old as mathematics.
> 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.
You could say that math is the part of laws of physics which humans can't imagine being different. You can pretty easily imagine a world where newtons laws are different, but I'd argue it is impossible to imagine a world where 1 + 1 is not 2. However being impossible for us to imagine doesn't mean that such worlds can't exist, it would just have completely ridiculous consequences we can't imagine, so those rules are a part of our universe and not a fundamental logical truth.
> I'd argue it is impossible to imagine a world where 1 + 1 is not 2.
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?
Numbers don't exist in any real sense, so we're clearly not talking about the actual physical universe. The universes we're talking about are the spaces of possibilities that arise from sets of rules. Examples include number systems and physics models built on them. Newtonian physics, built on Euclidean space; Einsteinian physics, built on space distorted by mass; quantum circuits, where modular arithmetic can show up.
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.
We can count things, because we use the concept of numbers. Numbers aren't a physical thing, they are all imagined. How I see it is that physics models can be described using number systems, but the numbers aren't part of what's being described. E.g. the numbers describing properties of particles are categorically different from the particles themselves, and only the particles can interact with other physical objects. An electron can never bang into a 7.
I agree. Counting might not have any intrinsic relationship to the physics of the universe, but it's a strange universe where thinking beings can exist, yet are incapable of constructing the mathematical rules that would allow them to count.
For a while, people thought that a universe in which Euclid’s postulates would be wrong would be very strange indeed. In my opinion it is short-sighted to go from “it’s weird (to us, right now)” to “it’s impossible”.
On the contrary, it’s very interesting to explore the consequences of something we take for granted being actually wrong or unnecessary.
In a universe where Euclid's postulates are wrong, like ours, you can still construct them. You're positing a universe where it's impossible to construct counting – i.e., set theory is impossible to imagine, Peano arithmetic is impossible to imagine, Church numerals are impossible to imagine…
In such a universe, how is conscious thought even possible?
> You're positing a universe where it's impossible to construct counting
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.
That's because (imo) numbers aren't intrinsic to the physical universe. They are (imo) an abstraction we humans invented to describe certain phenomena. You may not agree but hopefully you can at least see why some people would have this PoV, and especially the more general PoV that mathematics is not about (physical) nature, but about abstract ideas.
1 + 1 = 2 is based on conservation of particles. You put a marble in a bowl, then another marble in the bowl, you now have two marbles in the bowl. If you remove conservation then there is no reason why 1 + 1 should equal 2. 1 + 1 being equal to anything could just be nonsense in that universe, such a construct wouldn't exist and there would be no way to reason about quantities. That isn't a logical inconsistency, so such a universe could exist.
In modulo arithmetic, 1+1 != 2 can work just fine. We're not talking about the literal universe, but the space of possibilities that opens up when you change the rules. E.g. all the amazing power and complexity that comes from imagining the existence of a number i with the property that i^2 = -1. This was initially thought to be a logical impossibility.
True == False does seem pretty broken though. Not sure that can go anywhere.
Whatever people may think what mathematicians think, this comment describes the real situation best as I've experienced it.
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.
> "Nature is of no consideration whatsoever in pure mathematics" and I'm quite sure that the pure mathematicians would agree.
Only if you have the audacity to call Arnold "not a true pure mathematician"... He mockingly said that the parts of "so-called" mathematics that have no connection to nature are useless mental masturbation.
I agree this is a common sentiment among mathematicians, but this is a very modern perspective. If you look back 100 years ago to Hilbert, there was less distinction between physicists and mathematicians, much less the pure/applied rift that now exists. Arnol'd (who is referenced above) was one of the mathematicians who tried to keep this unity alive.
I see mathematics as completely opposite to studying nature.
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.
Then, Arnold also says that mechanics is geometry in phase space (which subsumes physics in mathematics, like in the later “mathematical universe hypothesis” metaphysicians).
Math, like philosophy, is only interested in using concepts, structures, or otherwise rigorous ideas to pry into other ideas. Like philosophy it is in some senses self referential, and not really interested in discovering some idea of "truth", but rather exploring the avenues by which truth itself is defined.
> As the mathematician V.I.Arnold famously said, "mathematics is a branch of physics where experiments are cheap".
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.
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:
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).
Sometimes I feel like software developers don't actually know the fundamentals of how the programs run, not taking into account all the math behind the algorithms, etc. Being good developer IMO is first understanding the system from ground up, second - understanding the domain and if it requires math, yes, you need to know that as well.
Otherwise you can go on your whole career copy/pasting and using APIs/language features you have no idea how it's working.
That kinda describes my experience. I was never formally trained in computer science; I fell into it in my late twenties and taught myself. I never took math at the collegiate level, so I don't really understand the fundamentals. However, I am able to get by for about 95% of the things I've needed to do. But the last 5% is always the most interesting, and I hate it when I hit those walls.
well I hope there will always be that 5% left that you can't answer yet, and that you find interesting enough to learn more about. At the end of the day, that's probably the best way to learn more maths and get a deeper understanding of how computer programs work, at least that was the case for me who's, so far, been pretty bad at learning theory without having applied it first.
Most developers don't work in domains where there is any math as per se.
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 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.
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 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.
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.
Unless you are doing something novel, not so much imo. I generally trust standard approaches and tools, I'm not trying to write my own encryption, right, or reinvent wheels. You can often get by with no real understanding of the underlying math, just what you put in, what you get out, and what that generally means. Lots of respect to you math geniuses who make it all possible. I'd rather play and prototype stuff than perfect and get into the nitty gritty. But math in programming is great for learning and understanding, it being actually applied.
It's all depending on the domain you work in. When working as a web/app frontend developer I've barely ever needed any real maths knowledge beyond basic algebra. As a backend developer, I've had to read up on certain select algorithms. As a game developer I've had to study a bunch of trig, pathfinding and search algorithms.
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.
186 comments
[ 3.7 ms ] story [ 203 ms ] threadThat 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.
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!
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.
"How much X do yo need for programming"
It helps to have knowledge about X if you want to come up with a solution.
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)
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)
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.
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.
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).
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).
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?
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.
The fact that middle school mathematics is often disconnected from what most people would find useful is a big problem.
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.
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.
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.
> They try to understand mathematics and use mathematics as a language to do that.
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.
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.
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!
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).
>> 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!
> 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.
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.
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.
Only if you have the audacity to call Arnold "not a true pure mathematician"... He mockingly said that the parts of "so-called" mathematics that have no connection to nature are useless mental masturbation.
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.
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).
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.
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 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.
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...
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.