How much math you need for programming (2014)
151–160 of 187 posts
Re: How much math you need for programming (2014)
#152Re: How much math you need for programming (2014)
#153First, 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.
Re: How much math you need for programming (2014)
#154If you're programming a basic business app then you won't need too much math. If your app is simulating the big bang origin of the universe you would probably need a bit more.
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.
Re: How much math you need for programming (2014)
#155If 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.
Re: How much math you need for programming (2014)
#156I 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 "programmin…
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)
Re: How much math you need for programming (2014)
#157Was 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.
Re: How much math you need for programming (2014)
#158Re: How much math you need for programming (2014)
#159As usual, the answer to the eternal question of “how much formal math training do you need for X” turns out to be “right around the amount the author of the argument has had.” Why is it that we always have to prove the instrumental value of maths education? You’re a lot more likely to “need” your maths in the “real world” than your Shakespeare, but few have much energy for fighting the idea that literature should be…
I agree with everything you’ve said, but I want to push back on the (non-load-bearing) “few have much energy for fighting the idea that literature should be studied for it’s own sake.” It seems to me that lots of people have endless energy for this fight, unfortunately.
Re: How much math you need for programming (2014)
#160Earlier quoted context omitted.
I agree with everything you’ve said, but I want to push back on the (non-load-bearing) “few have much energy for fighting the idea that literature should be studied for it’s own sake.” It seems to me that lots of people have endless energy for this fight, unfortunately.
It’s possible that the sample set of anecdotes I base this on is a bit skewed, as I teach undergraduate maths. In my limited experience I had to put a lot more effort into keeping basic differential calculus in the required freshman curriculum than my colleagues from the English department had to keep the %#^* five-paragraph essay. (Full disclosure, I’ve also taught our “Communications” course because of a misspent y…
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.