25 ms·
A Programmer’s Regret: Neglecting Math at University
- Shorel 7y agoIn my experience, the kind of math you get in engineering classes, that is: this is how you calculate integrals, now write the result, it is not really useful for programming. However, the kind of math you get in a mathematics degree, that is: we have this conjecture, now prove it, had made me a much better software developer than I was before taking these subjects. Of course, a lot of time has passed and education has changed, but the principle stands: learn to write proofs, as it will help you expand your mind.
- iwansyahp 7y agoSo for experienced programmers, what is best (at least better books and resources to learn math that 'works'?
- ijpoijpoihpiuoh 7y agoTo each their own, but a lack of math skills has rarely hurt me in my career. I guess I could be getting paid even more money as an ML specialist if I had more math knowledge. But you can make absurd amounts of money as a skilled generalist, so that only hurts you if you really find meaning in that type of work above what you'd do as a generalist programmer. And if that's where you're at, you can always study the math now.
- heavenlyblue 7y agoTo each their own, but the truth is that life isn’t just about money, and if someone knew maths, there’s a higher chance they can be getting paid the same amount of money working on more interesting problems surrounded by people who aren’t thinking only of money.
- vkou 7y agoI'll stop thinking of money when my survival stops depending on it.
- Ididntdothis 7y agoI agree. I once worked with a Russian guy (it seems the communists were really good at teaching math) and he could often synthesize super elegant solutions because he knew how to express them in math. They were much shorter and more concise than my solutions which are often very much brute force. On the other hand I have worked with physicists and mathematicians who were great at math but got nothing done in code. Applying math to coding seems a very special niche.
- crispyambulance 7y agoI don't think it has anything to do with communism, but I got similar observations. Don't know if that's still the case these days. I suspect the reason is that in many countries, there is a greater focus on getting the fundamentals done with significant rigor. USA curriculums put more of an emphasis on breadth. I think they [the Russians] are right. For STEM-focused students, there should be no short-cuts when it comes to mathematics curriculum.
- wwweston 7y agoConsider that the largest employer of mathematicians in the US is the state. Why is that? Why aren't market institutions valuing mathematicians more? Also, if you look around and individuals who are staffing the top hierarchies of business/market institutions, what kind of credentials are most commonly seen there? On top of that, in even intellectual subcultures, what stripes of intellect tend to be most respected in US culture? I think there's a number of ways (some subtle, some less so) in which American society messages people about the status of STEM and in particular about the M, which is almost always about its auxiliary value for something else and rarely respected in its own right. I think it's plausible there are a number of features of a communist culture that might shift some of those incentives, especially when combined with a generally more intellectual culture. (Also, this shouldn't need to be said, but this is not an argument about the general superiority of communist society. I suspect that more pragmatic societies do better than more ideologically organized societies.)
- 0kl 7y agoObservation: USA curriculum, or, often in recent times, lack thereof, has not seemed to harm the USA’s position in the STEM field
- asplake 7y agoMy degree is in maths but I got special dispensation to drop statistics so that I could do more computing. Regretted that ever since.
- commandlinefan 7y agoSimilar story here - went to college, majored in CS, found out how much of CS is math, thought it was just there to be difficult, learned just enough to (barely) pass. It wasn’t until much later that I did some graphics programming that I wished I had paid closer attention - I’ve been going back and trying to re-teach myself a lot to the stuff, like differential equations, that I probably would have gotten a lot quicker and easier if I had just paid attention when it was the only responsibility I had along with access to an expert on the topic who I was actually paying to help me learn it. Oh, well, some of us have to do everything the hard way…
- zcrackerz 7y agoIt would really help if professors would give you a taste of something applicable before diving deep into the math itself. I suffered through most of differential equations and calculus, but I happened to take a computer graphics course before linear algebra. We learned just enough math to make things work but linear algebra really took a deep dive that I was able to appreciate having had the basics around affine transformations explained in a very visual and intriguing manner.
- dvfjsdhgfv 7y agoIt's a major problem still: teachers neglect giving examples of practical application of a given concept (might be difficult at times, I admit), and miss the opportunity to make knowledge stick and increase the intuitive understanding of the subject. I still remember my dialogue with my high school maths teacher when first learning calculus, it was more or less along the lines: "But why do we need these differentials?" "Because it will help you to understand integration." "But why do we need integration?" "Because it will help you in your further education." (No, she didn't even mention velocity/acceleration or area below the curve as it's usually done, I had to figure these out myself.)
- cableshaft 7y agoI do sometimes think more math might unlock more options for my software career (like if I had a better grasp on calculus I could be more effective at 3D graphics and simulations, for example). But right now, I probably use math more often in my main hobby than I do when I program, and that hobby is board game design. I'm often resorting to math to figure out how to make sure my designs are balanced, how many cards I should use at different player counts, how many cards I should include if I have different combinations of symbols on them (first time I've had to break out combinatorial functions outside of school), determining and balancing probabilities of different things happening, recording the results of multiple playtests and compiling and analyzing various statistics from those playtests, etc. Some designs for my games have even been inspired by game theory, computer science structures, fractals, etc. One of the most prolific game designers out there today is Reiner Knizia, who has over 600 published games, and has a doctorate in Mathematics. I can see why. There's all sorts of neat fun things that can be found by probing different features and patterns in mathematics. What I've been trying to do is find corners he probably hasn't discovered himself yet, and considering I'm only aware of about 50 of his more well-known games, so probably the concepts I think are pretty new could very well be hiding in one of his lesser known 550 other games. Several times I've come up with an idea, only to bump into one of his designs a month or two later that does something similar. So if I can find a bunch of uses for math for game design, there's probably a ton of potential applications I could see if I directed those energies more towards software engineering. And learn more math.
- jasim 7y agoAnother place where I wish I knew more math is Programming Language Theory. Proofs, abstract algebra, Denotational semantics etc. This would've let me work through books like Software Foundations, TAPL etc.
- DennisP 7y agoAside from probability, what math do you use in board game design?
- cableshaft 7y ago
- codazoda 7y agoI'm a self-taught programmer and I turned that into my career. I didn't go to college and I didn't pay a lot of attention in Math classes in High School. I'm regularly reminded that I should have focused more attention on math. There are occasional challenges where understanding complex math would have been extremely helpful in solving real problems.
- windexh8er 7y agoThis 100%. So is there any good way to revisit all the maths in a correct order of operations as they would apply to a topical area of CS in general? I've picked up a few overview text books and have bookmarked a copious number of math related refreshers but the subject is hard to gauge if the material is good or not. Any MooCs have good tracks that don't cost an arm and a leg?
- fastball 7y agoFind a well-regarded college math curriculum and read the textbooks?
- lilott8 7y agoThe best collection of resources I've found has been on https://www.reddit.com/r/learnmath/ https://www.reddit.com/r/learnmath/ of all places.
- oneepic 7y agoI mean, the college math I had was: calc 1-3 and differential equations (4 classes total), and probability/statistics (1 class). I didn't have to take linear algebra, but I got a good enough understanding from calc and my algorithms class (we studied algos from a theoretical perspective with math, like the CLRS book, so we did some vector and matrix stuff). Paul's Calc Notes are awesome for calc. But it seems like you have plenty of resources right now, so probably the best thing to do now is actually pick one at a time, and go through it.
- claudiawerner 7y agoThis isn't a popular suggestion (and by that I don't mean to say it's rejected or people don't like it, I just haven't heard it suggested before in this context) but at university for electronic engineering we used K.A. Stroud's Engineering Mathematics. This book is surprisingly little focused on actual applications to engineering, it takes you through calculus by introducing the derivative, for example, and then some linear algebra stuff. But what surprises people is that it starts off with the properties of addition and multiplication - it's that simple. It's a book that starts from zero and takes you very, very far. It won't take you to a mathematician's 100 but it'll take you to any serious engineering undergrad's 100. If I recall correctly it also has problems for you to do - which is key for understanding mathematics and developing a sense of intuition.
- ukj 7y agoThe thing is - if Programming corresponds to Maths (according to Curry-Howard) what is really happening is Mathematicians and Programmers are disagreeing over language, not over substance. Mathematics is a formal language. As such - it's part of the Chomsky hierarchy. And if it's part of the Chomsky hierarchy - we can build parsers/interpreters/compilers for it. So why not standardise it all into a shared library? That's exactly what Voevodsky did. https://github.com/UniMath/UniMath/tree/master/UniMath https://github.com/UniMath/UniMath/tree/master/UniMath As computer-assisted proofs become more and more popular, expect plenty of cross-polination between software engineers and Mathematicians. Code refactoring. Unit testing. Managing a large, shared code-base. Fun times ahead.
- usgroup 7y ago...maths is not a formal language by any stretch of the imagination. I think about the best definition one can give is maths is what mathematicians do, and maths notation is what one mathematician writes down to communicate mathematics to another mathematician. It's circular in about a dozen ways but that is as it is IMO.
- ukj 7y agoWhat mathematicians DO is computation. What a mathematicians WRITE is a formal language used to express computation. Manipulating mathematical expressions has a name. Symbolic Computation. https://en.wikipedia.org/wiki/Computer_algebra https://en.wikipedia.org/wiki/Computer_algebra
- usgroup 7y agoI'd say what mathematicians do is "think". We call the sort of thinking mathematicians do "mathematics". I get through quite a bit of grad stats in any given week and I'd say that what I'm not doing reading the computations of other mathematicians. I'm reading words in english, which try to explain concepts which are then sketched formulaically. I'm also reading proofs that are usually completed by a "mathematical" intuition and are very rarely if ever constructivist. Maybe, that's just me busy thinking whilst the rest are busy computing :-)
- agentultra 7y agoA regret: never being able to afford university and always feeling like it was too late when I finally could. It turns out I really enjoy type theory, category theory, and formal mathematics. I also care about liability, reliability, and safety. And all I can do is study in my own time, which I do freely, in order to catch up. And I will never get a research position or work at a startup where I can put these skills and ideas to the test. Oh well. I will still work on the libffi integration in the community Lean fork and will try to get Lean working on AWS Lambda and GCP, etc. If you're younger and starting out -- don't neglect maths! It is far more useful than the programming language du jour. The former is how you weather the constant flux of the latter. And how you solve hard problems.
- joycian 7y agoCan you tell me more about your project to get lean working on the cloud providers?
- agentultra 7y agoSure! The high level goal is being able to write proof-carrying code in more places. I think it's important for us to be able to guarantee properties/requirements of our programs and one way to do that is with formal methods. Lean is not only a proof assistant but also a dependently typed pure functional programming language with a decent VM. I would like to be able to ship the program from the proof. I'm starting from the low level of the Lean VM by adding libffi support so that we can write high-level bindings to C libraries and bootstrap the Lean ecosystem. We need libraries to call databases, parse JSON and other serialization formats, speak HTTP, etc. The goal is to be able to ship an AWS Lambda function written in Lean.
- joycian 7y agoSounds very cool. Is there any way to follow your progress?
- rajlego 7y agoInteresting point, reminds me of this article: https://www.supermemo.com/en/archives1990-2015/articles/genius https://www.supermemo.com/en/archives1990-2015/articles/geni.... One of the points it makes is basically that abstract thinking is more valuable than specific facts, and that math is basically the king of this. I hadn’t really thought about comparatively weak something like programming can be since a strong focus of it is syntax (if programming and computer science are somewhat seperated).
- kemiller2002 7y agoI would agree that Math is useful in several programming situations. I won't say that I shouldn't have maybe tried a little harder to understand it. Here's the problem though, nothing's free. Concentrating more on Math, means you have to give something else up. Maybe Math would have helped you in a certain situation, but what other skill have you gained that are useful in others? It's easy to say, "Wouldn't it be nice, if I did this?" without having to specify the consequences of that action. (OK that sounds really negative, but I'm sure you know what I mean.)
- usgroup 7y agoI feel the post is misguided. Pick any career out there and you'll find that in a complex enough cranny of it there is mathematics. That doesn't mean that plumbing IS doing mathematics, or fixing the washing machine IS doing physics; at least not in any substantial sense. If you're cutting web APIs, writing wrappers, wrangling pixels; you wont find maths useful to you very often. If you find yourself working in data science, cryptography, compilers, formal design, etc then obviously maths will be indispensible to you. Having said that most the maths that you need in order to pick something up and implement it is within your grasp and you'd probably have to learn it anyway even if you did know some maths. Recall, there is no "know maths"; you only ever know some maths, and once you've done it long enough you develop an ability to "do maths" which is in some bizarre way independent from any actual maths you know. As a final note and honestly to hell with lamenting the past. I think if I could do it all over again; I would... and when I did I'd most probably want to do it all over again, again.
- throwaway082729 7y agoMath is a subject that you don't understand why you need it till you see real-world applications for it, especially higher-level math. Rather than teaching math in a way where you solve equations, students need to be taught to 'think' mathematically, similar to mental models. In fact, a good number of mental models have a strong grounding in mathematics. Seeing the world as a set of mathematical problems gives you a leg up on a number of things.
- codesushi42 7y agoThanks for sharing. I have been contemplating this as well. I do have a degree in CS, did take a decent amount of math in college (vector calculus, linear algebra, discrete math), and aced all my courses. More than 10 years out of college I still retain a lot of what I learned. I work in AI and get paid well. But that said, I wish I had a graduate degree. And the most useful subject would be math I feel. You see, like many others I didn't find that learning a lot of math would be useful. Yes, I was aware of its uses in 3d graphics and even learned about quaternions in college. But beyond that I was ignorant of how useful it would be for analyzing data. And I really tired of having to do proofs in college, so I didn't want to have anymore to do with something so difficult and unapplied. Unfortunately I have found that you need the math background to work on what would be more interesting problems to me. And recently there are a lot more of these problems where math is important because of the AI wave. I am in my 30s and I'm thinking it is too late. But I am still considering going for an Applied Math Masters offered online by UW. See here for anyone who may be interested. https://www.appliedmathonline.uw.edu/academic-experience/courses/ https://www.appliedmathonline.uw.edu/academic-experience/cou...
- theworld572 7y agoI studied maths and computer science at university for precisely this reason - I heard many programmers say they wish they knew more mathematics. Honestly there have been very very few times where my knowledge of mathematics has directly helped me with coding, possibly even none. Unless you continue to study mathematics, which you will likely only do if you stay in academia, you will forget what you've learned! It boggles my mind to think that I used to know advanced calculus, group theory, linear algebra etc. I have forgotten all of it bar the very basic concepts behind them. That said where it has helped me is in logical thinking - stuff like abstractions as the article describes. Writing mathematical proofs requires logical precision which is very helpful when programming. If you spend enough time studying mathematics then eventually some of the core concepts will sink in and it will help in thinking of solution. Though I would not advise that you study it with the aim of thinking "How can I use this knowledge in programming" - its not directly applicable unless you are doing graphics programming, AI, data science etc.
- omarhaneef 7y ago"It boggles my mind to think that I used to know advanced calculus, group theory, linear algebra etc. I have forgotten all of it bar the very basic concepts behind them." I thought it was just me! edit: we should add confessions like DHH twitter where all these advanced programmers confessed they had to look up print() commands on google or whatever it was. edit#2: The point might be that you don't remember linear algebra but you remember there is that tool to help. If multiple, parallel computations come up, you know to look up linear algebra. If a rate of change question comes up, you know to brush up on calculus. If the halting problem comes up, you know it isn't solved etc.
- lifeisstillgood 7y agoA long time ago I gave up the "manager track" and went back to be an individual contributor mostly because i noticed I was having to look up things I "ought" to have known Slowly now I am settling into the idea (the confidence) that I am actually pretty good at this, and that occasionally looking up how to open a csv file is just an artifact of knowing why and what if not precisely how (it's also a good indication that another abstraction that is easier to remember might be useful)
- BeetleB 7y agoI feel like writing almost the opposite: An Engineer's Regret: Focusing Too Much on Math. I did a lot of calculus, some functional analysis, numerical methods, etc. I've never needed even basic calculus for my engineering job. I did use it a few times, but mostly because I was looking for an excuse to use it. No one cared, and demonstrating such skills played no role in my annual review. Furthermore, everyone around you has forgotten this stuff, so the system will shift to not valuing math. Of course, jobs do exist that need heavy math. They are not the norm, and there is a lot more competition to get those jobs. With the exception of machine learning, your employer will value you as a SW engineer more than a math wiz, precisely because the demand for the former is much higher compared to the supply. (I honestly don't regret it - but the value of knowing advanced math in the professional world is overestimated).
- YeGoblynQueenne 7y agoThe thing is, software engineer salaries are going down and data scientist salaries are going up and the data scientist jobs are taken by people from the sciences, who know that kind of math, that CS courses maybe are not that heavy on. So there is a great big incentive to know "maths" (continuous maths). And if one does not know, the incentive is for one to learn.
- selestify 7y agoInteresting, can you give a pointer to the data on software engineering salaries declining?
- BeetleB 7y agoIt seems you agree with me: >With the exception of machine learning,
- codesushi42 7y agoI don't know if what you are saying is true. Where is the data? But I do believe in the long run, you will be right. Software is saturated, and a lot of the infra has been built or commoditized. The value will be there for people who can analyze data. Too bad I don't find analyzing data as fun or as interesting as banging out a programming problem.
- bitL 7y agoIf you focused on math, you'd be regretting wasting too much time on insignificant yet (intentionally) convoluted parts of math and feel you wasted a few years of your life. Just accept you can't know everything and that it's in your own best interest to work with other people to achieve your dreams and help them to achieve theirs.
- bigred100 7y agoMath things that you think are convoluted (at least as you’ll find in refined undergraduate/graduate material) usually have a very good reason for being that way in my experience...
- bitL 7y agoDunno, I spent (wasted) 3 years of my life studying theoretical computer science at PhD level including very advanced parts of (discrete) math and many of those parts are just unnecessarily obfuscated to enable academic careers and an academic version of "demonstrating one's worthiness". There are not many cases of a worse feeling than when you realize after a year and half of difficult studies that the problem was either simple and obfuscated, or that the set of instances satisfying some theory is empty.
- southphillyman 7y agoI sometimes wish I had a better foundation in college level math when encountering proofs in algorithm books. This is probably the biggest hurdle to me just buckling down and studying the various complex algorithms.
- jefft255 7y agoI did a dual major in math and computer science, I recommend it if you are aiming for a research career like me. It helped me considerably in AI and mobile robotics, and I think in some ways it put me ahead of people who "only" did CS. I guess one of the reason for that is the gaping absence of math in the CS curriculum at my uni. Of course the issue is that nobody knows prior to choosing their major if they want a research career! There's no point in studying topology and measure theory like I did if you end up being a front-end dev, apart from personal development.
- YeGoblynQueenne 7y agoI get the feeling that when the article says "math[s]" it means continuous maths, like matrix arithmetic, calculus and statistics (judging by the examples given). Those can be useful, but not as immediately useful as the discrete maths for computer science that most programmers are (er, I think) at least somewhat familiar with: propositional and first-order logic, combinatorics, complexity theory, computational theory (including automata and languages) and, well, binary arithmetic. Not to mention: algorithms. I see the reference to category theory. That's discrete, of course, but it's intermediary to advanced. You don't get there without some solid foundations on logic, that you should expect to get from your CS course.
- kragen 7y agoI agree that discrete math is even more widely applicable to programming than continuous math, but I would add one quibble to your comment: matrix arithmetic is not necessarily continuous — Shamir secret sharing works by doing polynomial interpolation in a Galois field, and that's linear algebra, even if you never materialize the Vandermonde matrix. Similarly, Peterson–Gorenstein–Zierler decoding of Reed–Solomon codes — one of the most-widely-used ECC schemes — is grounded in matrix algebra over finite fields too. Myself, I've just started picking up some continuous math after years of neglecting it, because graphics, sound, probability, physical simulation, convex optimization, and neural networks are all continuous math. I feel like I've been really missing out!
- ivanhoe 7y agoI hear things like this from time to time, but among programmers that I hang with almost no one ever uses any math beyond a basic primary school stuff. I really wonder is it: - us doing boring projects (quite possible), or - web dev and business apps are a specific niches that don't need anything more complicated than interest rate formula level of math, or - it's just that people complaining about not knowing enough math really don't know even the basic math?
- 40acres 7y agoTons of free resources out there. OpenCNX is a solid resource for free online textbooks on algebra and calculus. A Programmers Introduction to Mathematics is also free.
- analog31 7y agoI was a math + physics major in college, but I work at an outfit that has a lot of engineers. In my observation, most of them are weak at math -- they got through it OK in college but it didn't come alive for them, which is probably not their fault. And as they start their careers, they can easily get productive enough without using their math, whereupon they forget it pretty quickly. This isn't a slam on anybody -- these are bright and capable people, and I envy their success. A handful of people, maybe 10%, gravitate towards the problems that involve math. Maybe they took a personal interest in math while in school, or maybe they're using math to cover up a shortfall in some other area. They become the "math people" in the department, and everybody brings quantitative engineering problems to them. I'm one of the math people, not even officially an engineer, but I volunteer to solve problems that other people hate. I'm actually not as successful in my career as some of the engineers, but at the same time, I'm doing OK considering that I got a more esoteric degree. I think we could teach math in a way that's more relevant to the people who might actually use it, without detracting from what makes math come alive for math people. Let's teach more computation and proofs, perhaps from the git-go. Computation is how most people solve problems anyway. Proofs offer a much richer palette of ideas and styles than memorized "forms" and algorithms. Granted, any reform of math education suffers the same pitfall as contemporary and historical methods: Massive attrition. This is the huge unsolved problem in math education.
- rajlego 7y agoI think the biggest problem of math education is that it’s not taught in a way that maximizes long-term memory. There’s a lot of research on it but I think there’s lots of methodology in teaching on how to make students remember better that’s underutilized. An example: interleaving old problems in tests and homework. Doesn’t take much work but from what I remember there are studies that show significant improvement in final tests scores and likely in overall recall. Depending on students to review older material on their own isn’t a good bet.
- agumonkey 7y agoHonestly, 3/4 of what I like in programming languages are Mathy. Monoidal arithmetics (+) = 0, (+ 1 2 3 ...), Orthogonality~ , reasonable .. Everytime I had to stray away from this my brain hurt.
- jaza 7y agoI have said to people, a number of times, only half-joking, that the most complex maths I do during a typical day as a paid programmer, is adding 1 to a number. I dropped maths in my last year of high school (halfway through calculus), not because I was failing it, but as a pragmatic choice, because it was my lowest grade, and because it was the subject that I enjoyed the least. Instead, I picked up advanced literature and history. I have never regretted this. I then went straight on to Comp Sci at university, where I avoided all maths except for basic set theory and boolean algebra. After that, in the workforce as a dev (originally mainly PHP, now mainly Python). I have never felt that my lack of maths background hindered me. On the other hand, I have very often felt that my communication skills (particularly my formal writing skills) have been above average for a dev, and have benefited me greatly. I would like to learn more university-level maths, but I have neither a pressing urge nor a burning desire to do so. Programming, at least the kind that most devs do, on the whole has very little to do with maths. I don't regret not learning more maths in preparation for a career as a programmer, and I certainly don't regret learning lots of programming in preparation for a career as a programmer.
- nbanks 7y agoHe has a point. I started wishing I knew more maths when I started playing with tensorflow last year....
- rurban 7y agoI studied enough math to comfortably read Knuth and solve real geometric and AI problems, which sometimes needs linalg. Which is ~2 years out of a 5 years curriculum. I'm still happy with that decision. Everything which sounded too complicated eventually was too complicated. If it speaks like a duck, acts like a duck and looks like a duck, it eventually might be a duck.