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?

  • nothacking@discuss.tchncs.de
    link
    fedilink
    arrow-up
    19
    ·
    3 months ago

    Computers can really just do two things: copy data and do math. Anytime your your doing anything but copying data verbatim, there is math involved. Anytime your reformating, filtering or acting on data their will be some math involved.

    Take displaying an image: you can’t just copy image data to the screen, because it could have a different resolution, or color space, or be compressed. In all of those cases, you will need to do a lot of math to get things to work right.

    The exact math varies, in graphics, CAD or geospatial stuff, expect a lot of geometry. Any sort of statistics or classifier is going to involve a lot of linear algebra. Even simply storing data in s quickly accessable manner involves quite a bit of math.