I was asked once (more than once) “What’s the most difficult math you’ve ever used on a project?” This was asked by a young programmer worried they would need extensive math to follow a career in software development.
I rarely if ever run in to “difficult math” or “difficult algorithms” on project’s for clients and companies unless I am doing robotics or computer vision work. And difficulty is probably subjective.
Most of the time obscure/difficult math & algorithms crop up on my own personal projects. And on CRUD apps, no matter the platform, rarely get more complicated than the most basic calculations, e.g. adding lists of numbers together, averaging numbers, and so forth.
Math, for work, most of the time:
Quaternions, 2D vectors, 3D vectors, euler angles, basic matrix operations, basic algebra, basic trig, colour space conversions, time series calculations.
Math, for work, some of the time:
Calc and obscure stuff I always have to read up on due to it being something to do with reconstructing a 3D scene or figuring out something weird in AR or VR with predictive rendering or foveated rendering or other weird display nonsense. Robotics is usually calc and linear algebra, though wrapped in a library most of the time, due to inverse kinematics or figuring out intersections, and to re-emphasize, wrapped in a library I didn’t write.
I would say most of my job, when it comes to math, is knowing that a calculation or method or algorithm exists rather than knowing how it works or being able to do the deep math behind it or describe precisely what it does in detail.
Now, it is useful to have a deep understanding of the math or algorithm or data structure, but most of the time, my memory fails me on exactly how it works or how it is implemented because I haven’t had to do that “by hand” for 20+ years, and I just invoke the library function. Most math code I write these days is gluing this bit of math to that bit of math.
I spent the first two weeks of January solving a math problem and writing code, which at final check in was a total of 12 lines of code, and two of those were logging statements. I then went back and optimized the code which removed three lines.
Math, algorithms, data structures for personal projects:
Reassembly of fragmented pieces of paper. Solving a rubik’s cube and inferring the other faces. Scrabble computer vision solver. Jigsaw puzzle computer vision solver. LEGO piece finder computer vision solver. Virtual video production assistant. Word search. Prime number theory. All of these used obscure bits of math, algorithms and data structures I had to read up on every single time, though I had a general idea of what I was looking for.
And most of the time, the math, data structures and algorithms aren’t actually that hard. It’s just being willing to read around the subject, in the literature rather than vacuous blog posts, about what solutions are out there, what’s been tried before, and keep deeply thinking about the subject and making extensive notes about your thoughts, and keep thinking about it usually long after most developers would have given up.
And the best way to keep thinking about: Take a shower, go for a long walk in nature, touch grass, and do anything and everything you can to keep distractions, e.g. your phone, far away from you.