Sorry, the question in title sounds naive. I have no doubt that math is essential in programming, but I am thinking about philosophy of programming and want to summarize when they’re needed in programming. My attempt is below:

Most applications of programming are making electronics do things through their interfaces. Whether that’s telling a screen to display something, a network wire to transport data, a hard disk to persist data.

But we often need math because we often transform data, or we might make said electronics do things based on user input, or an event. Transforming an event to data is a mathematical construction.

Some applications are almost purely mathematical, like banking, crypto currency, or encryption.

In your opinion, does this fully explain why we need math in programming? Is there a better way to sum it up?

  • solrize@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    3 months ago

    No and the question was pretty confusing. I would say for a long time, math wasn’t really important in programming, but it has gotten more important and will keep doing so. The most math-intensive big area of programming these days is machine learning, which is basically applied sttaistics. If you want to understand the currently trendy programming languages like Rust, it helps to know some mathematical logic. And even for a typical CRUD web site, on the back end you will be shovelling large amounts of data around, while at the front end you need to do a fair amount of user testing for effectiveness (lots of sites don’t do that, which is why they suck). So again a bit of clue about probability is helpful. The same is true for the basics of cryptography (what it does–the details of how the primitives work is for specialists). You probably want to understand something about that if your application has any security requirements above the trivial.

    When you mention embedded hardware, there’s often electrical engineering (signal processing) involved, but I would treat that as a niche area that’s not part of programming per se. Similarly if you’re doing options trading or whatever, there is mathematical finance involved. But, the ordinary payment processing segment doesn’t use anything like that, at least as far as I’ve seen.