Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What is an example where you missed mathematical knowledge to do your job? Honestly curious, I never needed any math during programming for my job.


I guess the thing is that for any bit of reasoning, “there’s math for that”. So whether it feels like you’re using maths or not, you are.

Restructuring code, for example, often needs a good grasp of negation in logic.

Do you need formal training to do it? Not really. It’s advantageous to have a good math grounding though. My colleagues that have a good math education can often reason and communicate using graph theory, especially when it comes to architecture. Set theory is also super useful - I’ll often see people writing crappy algorithms because they don’t know about using sets (again, understanding computability and complexity would have helped here).

Maths is all around us, it is really just the study of patterns after all. That applies more so in software, even if it’s not immediately apparent.


> What is an example where you missed mathematical knowledge to do your job? Honestly curious, I never needed any math during programming for my job.

Basic arithmetic comes up all the time: pro-rating a monthly plan, figuring out how much to scale up or down a system in response to changes in data, figuring out when your system will run out of memory/disk.

Statistics and probability are also pretty common. I'm often calculating standard deviations and finding expected values of non uniform random variables. For example, how fast does a queue have to be to handle 1 second tasks 90% of the time, but 30 second tasks 10% of the time?

Derivatives comes with many graphics tasks, such as 3D graphics or animations.


Yeah, I always think I "should" brush back up on my now-rusted-solid math skills—I doubt I could pass the final for any math class I took past maybe 9th grade without studying, let alone anything I took in college—but they've rusted for a reason. I never fucking use them. If I do it's some narrow little thing that I look up, do, then never look at again.

[EDIT] and then there's "what is math?". The memorization from early grades that everyone shits on, with some simple algebra, is what I actually, ever, use in my life, plus some very basic geometry when doing stuff around the house. If it's for work it's some practical application thing. "Real" math like proofs? Never, ever.


> [EDIT] and then there's "what is math?"

Good remark. I wouldn't call arithmetic math, nor would I call using a Boolean expression math. I am currently working on a compiler bug that has to do with liveness analysis. That is an algorithm, which kind of is math, but the actual bug is just 'oh, for some reason the registers that the function arguments are passed in are not marked as live', and I wouldn't say that I had to use any math.

In my job, I'm usually either fixing bugs, parsing formats, making different API's work together by converting stuff or writing wrappers around API's. I wouldn't call any of this 'math', and if you'd ask me I have never used math at work (which is a shame really, because I really love math).


In my case, having to write WebGL shaders required me to brush up on mathematical concepts, but I very much enjoy being granted the opportunity to learn about those things.


Now I'm curious. IANAProgrammer, what programs have you made that don't have any maths in them?

Can you share example code? I can't see how that works.


It would be easier to show example code that actually used math! I might use math once a year, or every few years. Someone can write standard enterprise REST/SQL endpoints for ages and never use a bit of the stuff.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: