News for hackers. Stuff that matters.
Re:“When are we going to use this in our everyday life?” (2017) by raydiatian on Tuesday October 04, 2022 @08:26PM (#33089262)
The benefit of calculus isn’t about the ability to write things down on paper in a fancy code and playing a game to solve it. The benefit is that it paints your waking reality in a color you weren’t aware you could observe previously: curves, and expectation, and prediction.

Based on your take here, I’m gonna guess that you’re in but haven’t yet graduated college.

I’m not sure how you’re going to suggest “learning programming” rather than learning calculus, as calculus is a foundational element of all modern languages. For loops are a further generalization of Leibniz notation, in a rough but very real fashion.

You can only understand a car so deeply without brushing up against physics, the study of which is classically explained by (you guessed it). Sure, you can argue that “you don’t need physics to understand a car well enough to fix it.” Okay, congrats on mastering the adult version of putting the right shaped block into the right shaped hole.

Understanding music really doesn’t require a ton of calculus, unless you want to go into building instruments and music software. If you want to do sound design, you’re also fucked, because understanding Fourier transforms is an important aspect of being a good design engineer.

To me, it sounds like you failed calculus twice and now are trying to prevent people from sharing in your grief. That’s less admirable than you think—-it’s not that calculus is fundamentally hard without reward or merit, it’s likely that somebody failed to indicate to you the importance of calculus.

Re:“When are we going to use this in our everyday life?” (2017) by Tainnor on Wednesday October 05, 2022 @06:46AM (#33093700)
> I’m not sure how you’re going to suggest “learning programming” rather than learning calculus, as calculus is a foundational element of all modern languages. For loops are a further generalization of Leibniz notation, in a rough but very real fashion.

Eh, I'm pretty much opposed to GP's assessment that calculus is useless; in fact, it is probably one of the biggest intellectual achievements of the past couple centuries and modern society would be unimaginable without it.

But I don't really see the connection with programming. Programming/CS is mostly discrete maths and little calculus (with some exceptions, like complexity theory, because it's just easier to talk about functions R -> R than Z -> Z, and numerical analysis, which is about how nice theorems break down when you have to work with messy approximations instead of the real values). Calculus is about the real numbers and we can't even encode the majority of real numbers on computers.

Re:“When are we going to use this in our everyday life?” (2017) by raydiatian on Wednesday October 05, 2022 @08:56AM (#33094930)
> I really don’t see the connection with programming

It may just be the stupid way my brain is wired. When I think about calculus I can’t help but also consider programming, and vice versa. Okay, Calculus is not a precursor to learning to code. But the DNA of calculus is definitely there.

First, how building blocks of programming and calculus are similar.

1) We can probably throw out the control flow concepts, although they vaguely map to the notion of intervals on evaluated integrals.

2) I said for loops are a generalization of Leibniz notation. I also said it’s a rough relation. You said you don’t see the parallel because you claim pure maths calculus deals with reals and computers are discrete. Yep. Real numbers are discrete at the infinitesimal limit (grab your torch and pitchforks). I hope this is enough explanation on that front. Loops roughly = integrals. It’s purely theoretical. I get that you can’t actually represent an infinite precision real using bytes.

Next, algorithms.

1) I think there’s another very loose but valuable perspective in which calculus and efficient algorithm implementation at least shop at the same grocery store, if not fool around on the down low. I can imagine every possible implementation for solving the knapsack problem as being distributed in a higher dimensional space. There are a ton of bad ones out there with dogshit runtimes. But somewhere near the middle is one that goes zoooooom. That’s an optimization problem—that’s calculus.

2) And then within solving a problem itself. The *good* solutions make use of derivative-like notions. Properties about the problem which you use to solve it efficiently are effective pseudo-derivatives. The way that you can use a derivative plus a point to approximate some next point forward, you can use problem topology plus current state to improve state a bit further until you converge upon an “answer”.

The list goes on.

Calculus is in programming and programming is in calculus. They are cross-pollenated dialects of the mother tongue of the universe.

Re:“When are we going to use this in our everyday life?” (2017) by Tainnor on Wednesday October 05, 2022 @09:45AM (#33095506)
> Real numbers are discrete at the infinitesimal limit (grab your torch and pitchforks).

I don't even know what that means. If you embed the real numbers in the hyperreals, where you do in fact have "infinitely close" numbers, those numbers aren't discrete either, as the hyperreal numbers are dense too.

> Loops roughly = integrals

I think this is the wrong way around. Loops loosely correspond to mathematical sums (finite or possibly countably infinite). We got integrals once people started asking themselves "what if you could have something like sums, but over intervals that are arbitrarily/infinitely small?". In that sense, integrals are an extension or generalisation of sums/loops - in the sense that sums are basically integrals with a discrete measure - but you don't need to more complicated, general concept to understand the simpler one.

Of course, different areas of maths (and CS is basically a branch of maths) are inter-linked. That's the beauty of maths. Some people will see calculus everywhere, others will immediately see connections to category theory, logic, topology, etc. Maybe in 50 years we will discover a new branch of maths and suddenly see that it can be found everywhere, but that doesn't mean that we needed to know that branch to do all the things we were doing up until that point.

But I don't think calculus is as fundamental to CS/programming as it is to, say, physics or much of the rest of the natural sciences. You do mention some examples (optimisation problems), but by and large I don't need to understand limits and Cauchy sequences to program a loop or even to prove statements about push-down automata or graphs or my favourite type system.

(You mention topology. Topology is an abstraction over analysis which can be used in discrete settings too, it doesn't fundamentally require the real numbers.)

Re:“When are we going to use this in our everyday life?” (2017) by raydiatian on Wednesday October 05, 2022 @10:48AM (#33096251)
> (You mention topology. Topology is an abstraction over analysis which can be used in discrete settings too, it doesn't fundamentally require the real numbers.)

Ugh I wanted to respond but this little quip puts the rest of your post into perspective about what an obnoxious person you must be.

Re:“When are we going to use this in our everyday life?” (2017) by nuancebydefault on Wednesday October 05, 2022 @04:59PM (#33101196)
As programmer (20+ years of experience) with a master degree in engineering, I think I can compare programming with calculus. In general, calculus is continuous, while most of programming is discrete. I dare to say that you can be a very good programmer without knowing derivatives and integrals, which are only at the very basis of calculus. Most formulas used while programming, have already been derived by a physicist or mathematic. Most (99 per cent) of programming paradigms can be fully understood and applied without calculus. I learned about exponential functions, logarithms and for loops way before knowing calculus.
Re:“When are we going to use this in our everyday life?” (2017) by pdonis on Wednesday October 05, 2022 @01:05AM (#33091491)
You are giving plenty of ways in which calculus can be useful. But the GP wasn't arguing against claims that calculus is useful. The GP was arguing against a claim that calculus was useless, but you should study it anyway as "weightlifting for your brain". Your arguments about how calculus is useful would be better directed at the teacher the GP was arguing against.
Re:“When are we going to use this in our everyday life?” (2017) by raydiatian on Wednesday October 05, 2022 @06:27AM (#33093551)
> But the GP wasn't arguing against claims that calculus is useful.

So no clue who GP is. Grandparent is my best guess. And with respect to you, that would be the guy I was responding to, but that couldn’t possibly be correct because he said

> rather than sitting on your butt learning a useless subject

From context, inferred to be calculus, esp because

> took me 3 semesters of Calculus to figure out that it was useless to me and 90+% of the people that take any of it

Soooo… who is GP

Re:“When are we going to use this in our everyday life?” (2017) by pdonis on Wednesday October 05, 2022 @10:32PM (#33103649)
"GP" is Hacker News lingo for "the grandparent post to this one", which in the post I made responding to you before, means the post you were responding to.