Lurker News
I recently realized that certain kinds of knowledge allow one to be significantly more productive when solving a large class of problems.

For example,
* Regular expressions for simple text processing.
* Parser combinators for parsing.
* Parser generators (esp. packrat variety) for parsing.
* The concept of fuzzing and property testing for testing code.
* Calculus for solving all sorts of problems.
* MCMC for solving a huge class of probability problems.
* Search algorithms for solving a variety of problems (e.g. all NP-hard problems, sudoku, HTNs, scheduling, planning).
* Gradient descent for solving a variety of optimization problems.
* Vector Space embedding as a conceptual tool for a variety of complex AI problems.
* Effect composition (Haskell's IO or Scala's ZIO) as an incredibly powerful paradigm for concurrency and parallelism.
What are some examples of 10x multipliers that come to your mind? Fundamental ideas without which you would be drastically less productive.

Comments (418) 135 threads

Show all comments

Showing thread 41 of 135

giantg24 replies#
"Calculus for solving all sorts of problems."

Is this really common? I know I'm not in a top tier job, so maybe they don't give dummies like me the hard problems, but I've never had to use calculus to solve a real world problem.

giantg21 reply#
Looks like a paywall.

Yes, a calculus formula might have been used somewhere in that process, and was used by the finance person and dev. That doesn't mean I, or any other person, needed to know it.
As a dev at a financial institution, I've never needed to implement calculus formulas. Most calculations and formulas I've dealt with are algebra and stats. These usually are just a matter of using standard libraries too. So most devs aren't implementing formulas themselves, but just utilizing standard libraries.

softwarebeware3 replies#
> Looks like a paywall.

That's odd. It loads up just fine for me with no paywall.
Check this out for more: https://allusesof.com/math/51-amazing-uses-of-calculus-in-re...
The point is that calculus is used to solve all sorts of problems. Sure, you can say "...not in my experience" but that's one experience and not representative. You just happen to a) not work in a realm where Calculus is used and/or b) work within that realm only on problems without Calculus.

Continue this thread — 3 replies

lanstin2 replies#
calculus is irreplaceable for understanding system dynamics. Every meta-stable computer system is an incarnate approximarion of some differential equations relating the different parts of the system and the way changes propagate from here to there. I don't often use numerical methods, but analysis of stability, classification of fixed point types, topological limits to what small changes to the system can do to the behavior do all come into play. The people enforcing backoff for retries, randomization or careful analysis of fatal vs. temp errors, are using those sorts of insights. while you can take ten years of industry experience to get a feel for these flows, you can also take a good DiffEq/Dynamic systems course and start out understanding the possible shapes at the start.
giantg22 replies#
I mean, you could call that basic logic and just take a philosophy course. That would provide formal and informal methods of evaluation without the need for actual calculus. This informal understanding and balancing is more closely aligned with philosophy than it is to calculus.
SamReidHughes1 reply#
Nope. You could call that basic logic... and you'd be wrong, because it's not basic logic.
giantg22 replies#
How so? The comment clearly states that they aren't doing any formal calculations, not using numerical methods, and just getting approximate insights.

If I'm wrong, show me I'm wrong and post a substantive comment. Snarky comments like that are not inline with HN guidelines.

SamReidHughes1 reply#
It's not a snarky comment, it's literally, not actually basic logic. You had no factual basis for saying it was.

Basic logic is here: https://en.wikipedia.org/wiki/Mathematical_logic
Dynamical systems has stuff that is not basic logic such as this topological concept which is applicable in understanding how stuff works without doing an actual calculation: https://en.wikipedia.org/wiki/Limit_cycle
That's calculus. Not logic, not philosophy.

giantg22 replies#
You misunderstand. This is the basic logic I was talking about. Note my comment mentioned philosophy.

Same for limit cycles - they make no mention or this type of calculation. The concept can exist in other domains such as systems thinking.
So concepts do exist outside the context of pure math. If you look at everything from a hard math perspective, then that is what you will see. You have to look at the context of the comments to understand. It's not necessarily calculus because the commenter might not be looking at it using those strict theories. There's no support for your assertion that it's not philosophy or not logic. It could coincidentally be similar to a calculus concept, but that doesn't mean that one is using calculus if they are approaching it from a different context that shares a similar concept.
https://en.m.wikipedia.org/wiki/Philosophy_of_logic

Continue this thread — 2 replies

rockemsockem#
How does logic help you understand what system dynamics will arise from choosing a particular exponential backoff or making a choice about picking some method with a particular known error rate, as the original commenter mentioned?
tonyarkles#
I realize that I'm in a less common industry, but I often end up using calculus and DiffEqs in my day-to-day work working with drones.

To your point on system dynamics, queuing theory pairs really well with calculus on that as well. Being able to somewhat predict how a system is going to behave under load based on measurements and an understanding of how the queues work is super super valuable for decision making.

brimble#
I had the same reaction. I've forgotten most of it, but that's because there have been zero times in the ~18 years (oh god...) since I had a calculus class that I've seen anything I could use it for, without just making up a reason to use it.
SamReidHughes1 reply#
Just for personal investing I've used calculus amidst some basic modeling to estimate probability of getting certain outcomes under certain assumptions and compute an expected value. This is just to sanity-check my thinking, or to see what the market's thinking.

To understand basic financial concepts, like the present value of an annuity, or implied volatility, requires calculus.
In boring software, simple questions like, how often will a workload miss cache, and what optimizes the cost there, can be modeled... if you use calculus.
Also, in the past, I've casually been thrown into a couple of jobs where calculus was directly applicable to the work I was doing.

Ancapistani1 reply#
I took calculus in high school and did really well in it - but I honestly can’t say whether I’ve used it or not as an adult, because all of my mathematical knowledge kind of runs together in my head.

I realize it’s a big ask, but is there any way you’d be willing to put together an example of when and how you’ve used calculus for a specific purpose where it really shines?

SamReidHughes1 reply#
Work-related, I built a backend of a database engine on top of a transactional distributed key-value store. When building a secondary index, suppose you traverse the primary index in a series of transactions, reading a batch of key/values and updating the secondary index. With the scheme that was used to build the index, this has the chance of conflicting with an incoming write, which will also try to update the secondary index. You'll have some kind of backoff/retry strategy. What is the optimal batch size? Treating it as a clean calculus problem with static, homogeneous workloads, you could model the probability of getting a conflict, the performance of a given batch size, set the derivative to zero and find the maximum. (In reality instead of modeling the probability, you can measure it.)

In another instance, I got a summer job working at a company that made an optics-related product, and that involved a bunch of numerical integration, Fourier transforms, some optimization problems in stuff like calibrating equipment. So naturally, there was calculus.
Fun-related, recently, I noticed that a long-term call option I was holding seemed surprisingly expensive compared to just buying the stock on margin, given current and expected future interest rates, and comparing against the option's theta and delta values. Then I realized I was assuming the stock only goes up, ignoring short-term vs. long term taxes, etc. To get a general sense of how an alternative strategy of just buying the stock and adjusting position sizes at a few price points might work out, in a back-of-the-envelope calculation, I considered this problem: on average, how many times will a Wiener process W(t) completely cross the small interval [a,a+h] in the time interval 0<t<T (for some T)? What's its asymptotic behavior with respect to h, T, and a? (This problem of hedging options with stock, surely, is studied much more in depth, but I wanted to understand the general picture.)<p>Edit: I'll add, that's also taking for granted a lot of stuff with infinite series in comp sci that is also part of calculus. Like, if you want to pick a random number from 1 to 5, you know you can pick from 1-8 and retry if it's too large, and with calculus you know it will average a finite number of tries (8/5, specifically) because the infinite series passes the ratio test.

Continue this thread — 1 reply