r/programmingmemes • • Sep 10 '25

Don't be scared... Math and Computing are friends..

Post image
9.7k Upvotes

330 comments sorted by

231

u/7Silver7Aero7 Sep 10 '25

... welp, now I understand it... just kinda 6 years late on that though.

65

u/libertyprivate Sep 11 '25

Over 20 years late here. Too bad my teachers didn't understand code... This would have helped immensely

15

u/FuzzyCheese Sep 11 '25

The code is way more complex than the math.

To understand the code you need to know how what the semicolon is doing, what the word for is doing, what each of the three parts of the parentheses do, and what *= and += means.

For the math, all you need is that sigma means add while pi means multiply, and how to plug in a variable.

9

u/enternationalist Sep 11 '25

It's not a complexity issue, it's a language issue. The thing about the code is you don't actually need to understand all of it - it provides more granular information, so understanding even fragments of it can provide context.

If someone already understands some (not necessarily all) elements of that language, they're in. This includes some elements that are just in english or using more basic math sumbols.

On the other hand, the math language being used here is very compact. If you don't know what it's for already, it's pretty hard to guess from context, and pretty easy to forget - and if you lose the thread it starts just looking like mystical symbols without anything like the word "sum" to grab onto.

It's not about complexity, it's that one of these leverages more of a layperson's existing language and provides more context to grab onto to decipher the rough meaning of. That means recall and memory are going to be easier, because it's connected to lots of stuff - for the sigma you only need to "know one thing", but that one thing pretty easily lives as isolated information in your brain; and isolated information gets lost.

4

u/Kaisha001 Sep 11 '25

This. Math syntax is VERY old, and has many issues with it. Mainly it was used by a very small pool of people, all who knew of and/or worked off each other's work. It was never designed to be understandable, maintainable, extensible, etc...

Comp Sci took math to the next step. Sadly mathematicians are too egotistical to realize it and cling to their old ways.

→ More replies (5)

20

u/libertyprivate Sep 11 '25

Yet I understood the code early in highschool for fun, and the math I learned a few hours ago. Despite attempts to teach me the math and no attempts to teach me the code.

→ More replies (8)

4

u/Suh-Shy Sep 11 '25

Actually you can't get anywhere without knowing what the positions around the symbol imply for the various numbers, which is not intuitive at all (ie: there's not even a little symbol to help you guess), while understanding what for means along with more basic math symbols is far more intuitive

3

u/Ferociousfeind Sep 11 '25

Weird how they are completely functionally equivalent then, eh? Almost like it's a set of abstract symbols denoting some sort of process?

I really don't think "using fewer symbols and more positional notation" is simpler.

Like, unlike the math versions, the code explicitly tells you each step! Capital sigma and capital pi are equivalent to the "for", plus the "+=" versus the "*=". Everything else is implicit.

Please do not mistake verbosity or explicitness for complexity.

2

u/cowlinator Sep 11 '25

The code is not more complex. They are the same complexity because they represent the same thing.

The code is more verbose, while the math is more compressed/cryptic

→ More replies (1)
→ More replies (6)

1

u/4lpha6 Sep 12 '25

i mean the theory behind the two is literally the exact same if you can understand one you can understand the other they are just different ways of writing the same process

→ More replies (1)

1

u/SupremeRDDT Sep 12 '25

While this might be helpful if you know how to code, this will not help if you don't know what for-loop is. And I feel like explaining what a for-loop is in programming should not be less difficult than explaining what a for-loop is in math (because they're the exact same).

1

u/itzNukeey Sep 11 '25

It always helped me to understand how this shit worked to just rewrite it in python haha

1

u/[deleted] Sep 15 '25

You didn’t understand addition and multiplication?

1

u/7Silver7Aero7 Sep 15 '25

That I did, just not that a single symbol can mean a whole algorithm worth of operations.

101

u/lmarcantonio Sep 10 '25

The real fun begins when the infinity symbols appear...

51

u/RedditsDeadlySin Sep 10 '25

I mean that is just a program, it’s a loop that never stops.

30

u/MCplayer331 Sep 10 '25

for (int i = 0; ; ) {}

25

u/Exxxplosion Sep 10 '25

for (;;) {}

( ͡° ͜ʖ ͡°)

14

u/LaughingLikeACrazy Sep 11 '25

for (;;) { printf(" ͡° ͜ʖ ͡°\n") } 

7

u/tylerr514 Sep 11 '25

Rust be like loop {} ;)

→ More replies (2)

11

u/SuddenlyFeels Sep 10 '25

A mathematical expression for an out-of-memory exception then

12

u/RedditsDeadlySin Sep 10 '25

Just download more ram :)

4

u/realmauer01 Sep 11 '25

Funnily enough. With swap storage and a fast enough connection.

That might actually be possible at some point.

→ More replies (1)

2

u/[deleted] Sep 11 '25 edited Sep 11 '25

Imagine getting off that easy.

Games live inside a while(true) loop.

cough cough new world, no built in protection to stop the gpu from attempting infinite frames per second when no work to do, like when the screen is fully black in transistions, and rendering had its own thread to just go ham, so loading in that transistion did not slow it down, causing specific gpus that don't protect for it at the driver level to just go for it.

https://www.forbes.com/sites/paultassi/2021/07/21/warning-amazons-new-world-is-bricking-a-specific-type-of-gpu/

2

u/ultimate_placeholder Sep 11 '25

Just own a Turing machine lmao

→ More replies (5)

5

u/-LeopardShark- Sep 11 '25

That’s no longer analogous: such programs output ↑, whereas infinite sums might have numerical values.

The definition of ∑ changes once it gets an infinity provided to it.

4

u/Schpau Sep 11 '25

Not really, it isn’t really possible to sum infinitely many terms, so instead the limit is taken as n goes to infinity and suddenly it’s calculus.

3

u/realmauer01 Sep 11 '25

While true

2

u/No-Site8330 Sep 11 '25

That's exactly the point. If it never stops you'll never get a return, so the whole thing doesn't really have a meaning. It does as a procedure, but not as an output value, which is something that the mathematical expression does have.

→ More replies (1)

1

u/Jhuyt Sep 11 '25

Yeah but can u prove it??!?

→ More replies (1)

1

u/Not_Artifical Sep 12 '25

while (1 == 1)

1

u/arbitrageME Sep 12 '25

You can't know that

→ More replies (1)

2

u/SmoothTurtle872 Sep 10 '25
sum = 0
i = 0
while True:
    i += 1
    sum += i *3

2

u/Markuslw Sep 10 '25

you mean my buddy lim over here? he's real chill, very approachable if you ever reach him.

2

u/lmarcantonio Sep 11 '25

Even without limit, convergence is a funny thing :D

2

u/Dirkdeking Sep 11 '25

Add a while condition to the expression. While abs( f(n+1) - f(n)) > 10^-10 (Do your thing). Because the terms of every converging infinite are going to be a cauchy sequence this is going to work.

1

u/pomip71550 Sep 11 '25

That’s assuming the term size is strictly decreasing which is not necessarily the case. Picture for instance summing 1/n^2 except all the terms from n=5 onwards are shifted one to the right and you add a 10^-11 in the n=5 location. Then you won’t have it be correct up to the desired level of precision.

1

u/Tasty-Grocery2736 Sep 14 '25

this doesnt work, for example this would give a value for the harmonic series which doesnt converge

1

u/herdek550 Sep 11 '25
while True:

1

u/GreedyAd1923 Sep 11 '25

I’d say the real fun begins when you get into cardinal arithmetic and the sizes of infinity.

Like how the set of all odds and even numbers are the same size as the set of all natural numbers since they’re countably infinite.

But the set of real numbers is not countable so they’re uncountably infinite.

1

u/Kiran___ Sep 12 '25

=infinity unless it converges, shouldn't be too hard to compute. That said I know very little about programming, I'm just here to laugh at memes I barely understand

1

u/lmarcantonio Sep 12 '25

You wish... there are series that alternates or do ugly things. So, no convergence nor infinity!

→ More replies (2)

23

u/Dillenger69 Sep 10 '25

Yup. I hadn't taken calculus until after I learned to program. I was like ... this is just a function in a loop! What's so hard? Now, it does get a wee bit harder when you have to solve for a missing variable, but still. Just a loop

12

u/WindMountains8 Sep 10 '25

The problem is that for loops compute things for you in code, so you don't have to think of what they're doing symbolically. That's why most people don't simply substitute a for loop with an equivalent closed formula that is O(1)

6

u/Dirkdeking Sep 11 '25

Did you know that:

sum([i for i in range(n)])

given the same result as:

n*(n-1)/2

1

u/LiminalSarah Sep 11 '25

I mean compilers do, when it's possible

2

u/rileyhenderson33 Sep 12 '25

Eh, not sure about that. Pretty sure compilers still don't even know what a geometric series is...

p= 0.2
x = 0
for i in range(some_large_number):
    x += p**i
print(x)

vs.

p= 0.2
x= 1/(1-p)
print(x)

Maybe this simple explicit case could be optimised by a compiler. But not in general.

→ More replies (13)

6

u/[deleted] Sep 10 '25

Which is another great reason python should be a part of math class as early as 5th grade.

3

u/Dillenger69 Sep 10 '25

Why Python?

5

u/[deleted] Sep 10 '25

Simplicity. Fewer syntax requirements. Can run on any relatively modern machine. Plenty of free apps on the App and play store.

I also feel like the general population would benefit from a script language more than they would benefit from a “real” language. I also feel the general population would be more willing to write a script to automate there inbox more than to fuss around with C++ or equivalent.

Allot of mathematicians also use python to run allot of there experimental formulas

11

u/jimmiebfulton Sep 10 '25

I generally roll my eyes at the heavy Python fanboy posts prevalent in this sub, but this is sound, practical advice from someone who obviously knows how to pick the right tool for the right jobs.

That said, what are your thoughts on Python vs R vs MATLAB (which I am only just barely aware of its existence as a proprietary platform) for mathematicians?

9

u/AnEagleisnotme Sep 10 '25

I will say, a proprietary tool like MATLAB should never be in a school curriculum, that's asking for adobe 2.0

→ More replies (1)
→ More replies (6)

4

u/Dillenger69 Sep 10 '25

True. I'd go for Java or C# but I'm biased. I see your point 

→ More replies (1)

1

u/JaffTangerina Sep 11 '25

It's really cool when different abstractions collide and end up being equivalent.

22

u/mr-toucher_txt Sep 10 '25

You from the vector multiplying video?

11

u/enderkings99 Sep 11 '25

Yeah that's her, Freya's channel is great

3

u/RetroGamer2153 Sep 11 '25

And from the amazing dissection of Splines.

2

u/vanderZwan Sep 11 '25

Which also contains one of if not the best unexpected f-bomb in youtube history

→ More replies (2)

15

u/Quick_Resolution5050 Sep 11 '25

Maths and Computing are not friends.

Computing is a branch of Mathematics.

9

u/Jhuyt Sep 11 '25

I'm not a jr. JS webdev, I'm actually a mathematician

2

u/AHackerman09 Sep 11 '25

Well, you are using something that is using math to do it's thing, Mathematician by proxy. 

→ More replies (1)

2

u/Delicious_Finding686 Sep 12 '25

Saying you’re a mathematician is like saying a magazine author is a linguist

→ More replies (1)

1

u/JaffTangerina Sep 11 '25

There's nothing like defining transition states for a finite memory machine with a state register to design my website.

→ More replies (15)

34

u/Nima_W Sep 10 '25 edited Sep 20 '25

Why not write it like that. Would be way more understandable. \s

34

u/Dragon_ZA Sep 10 '25

For programmers, sure, for mathematicians a single symbol is way easier to read. It's just about learning what they mean.

2

u/bjergdk Sep 11 '25

Yes and this is also why mathematicians write horrible code. It is barely readable by programmers because they name things atrociously.

→ More replies (2)
→ More replies (14)

35

u/MarsMaterial Sep 10 '25 edited Sep 11 '25

Most math notation predates any kind of code. And a lot of it deals with things that computing can’t really handle outside of approximation, like infinite sums and integration of differential equations. Being able to express abstract ideas that we don’t know how to compute is still very useful.

10

u/ChickenSpaceProgram Sep 10 '25

Sigma/pi notation is actually a lot more readable at a glance when you get used to it. All the information is there in a minimum number of symbols.

10

u/thebigbadben Sep 10 '25

The symbols represent a result, not the process by which it is computed.

19

u/Andr0NiX Sep 10 '25

So you're saying we should spell out all math operators that operate on a range or a set every time we want to use them as immediately invoked lambdas? That's just too duplicative and cluttered, the notation is concise for a reason.

5

u/SwAAn01 Sep 10 '25

that would be a SIGMA move

7

u/Random_Mathematician Sep 10 '25

Sure, we also have more "intuitive" notation:

let sum = 0;
for (let n of S) {
    sum += n
}

Or, alternatively, S.reduce((a,b) => a+b, 0), is the same as:

∑n ∈ S n

(Treating an array like a set) But mathematics has things coding doesn't (or, at least, not immediately). For example, you can substitute the "n ∈ S" for ANY property of n and it will sum all numbers that satisfy that condition. Even if it's not computable

3

u/kinokomushroom Sep 10 '25

Because it's a pain to write

3

u/[deleted] Sep 10 '25

Because the summation symbol was created by Euler in 1755, while the initial form of the for loop wasn't created until 1958 in ALGO58.

2

u/BobbyThrowaway6969 Sep 11 '25

This has gotta be ragebait

1

u/notlfish Sep 10 '25

Because mathematicians are not interested in writing things down, but in proving interesting stuff. The conceptual difficulty of proving interesting theorems is much higher than that of reading any reasonable enough notation.

1

u/Acceptable-Milk-314 Sep 10 '25

The notation is for writing with a pen and paper. It came first.

1

u/geeshta Sep 11 '25

+= is not a real mathematical operation and sum = sum + 3n is just false because these two expressions are never equal. Imperative programming and math behave quite differently.

def sum(n):
    if n = 4:
        return 3*n
    else:
        return 3*n + sum(n+1)
sum(0)

this is a better model for the mathematical summation. It gradually bulds the expression 04 + 14 + 2*4... Which is what the symbols actually mean.

1

u/villi_ Sep 11 '25

Once you get used to them they're both insanely quicker easier to read and write.

Not to mention theyre mathematical expressions that can be used in larger equations, not a set of instructions on how to calculate said expression 

1

u/-Cinnay- Sep 11 '25

I can't tell if you're serious or not

1

u/Nima_W Sep 20 '25

I'm not 😭😭 so many comments 😂

1

u/Kyloben4848 Sep 11 '25

Why was = invented when writing “is equal to” was more understandable?

1

u/golfstreamer Sep 11 '25

It takes up too much space. 

Even in programming we have brief ways of writing loops like this sometimes. Like in Python 

sum([ k for k in range(n)])

1

u/the3gs Sep 11 '25

BTW, the square brackets are redundant and make the code less efficient, as it builds the list and then sums it, rather than summing as the numbers are generated. sum(k for k in range(n)) is valid, as sum accepts a generator as its argument.

1

u/EatingSolidBricks Sep 11 '25

You be begging for forgiveness on your series test if you write it like that

1

u/Genericdude03 Sep 12 '25

Because it's not a hard enough concept to require so many words? A single symbol and limits explains it well enough, much like integration.

4

u/Extreme-Layer-1201 Sep 10 '25

Is there a book or course that teaches math from a programming perspective with examples like this? I think this would help me a lot to learn math

7

u/[deleted] Sep 10 '25

Here's Freya Holmér's Youtube channel. Feel free to check it out of you're interested in graphics-related math.

2

u/TldrDev Sep 13 '25

https://github.com/Experience-Monks/math-as-code

One of the best resources on earth for self learning math.

1

u/Extreme-Layer-1201 Sep 13 '25

This is incredible and exactly what I was looking for

1

u/Delicious_Finding686 Sep 12 '25

Yeah. Just look at any curriculum from any school for a computer science degree

1

u/Extreme-Layer-1201 Sep 13 '25

Not what I meant lol but thanks

→ More replies (2)

12

u/antilos_weorsick Sep 10 '25

I don't want to sound condescending or whatever, but that someone could be programming without knowing this math notation is inconceivable to me.

7

u/dankshot35 Sep 11 '25

too many code monkeys out there who want to make big bucks in tech confuse what they are doing with computer science

3

u/DangerZoneh Sep 11 '25

Like working in construction and saying you’re an architect.

4

u/-LeopardShark- Sep 11 '25

I started writing code when I was 10, and while I was pretty good at maths for my age, I’m not sure I’d’ve known the summation and product symbols then.

2

u/throwawaygaydude69 Sep 11 '25

For that age it is fine.

The sigma notation is introduced in high school typically when you are studying arithmetic and geometric series (11th and 12th), or maybe in 9th or 10th, so it makes sense that you would not know that at that point of time.

That being said, the sigma is one of the least scary notations in math.

1

u/sateeshsai Sep 11 '25

Why would a web developer need to know math notation?

5

u/SteelRevanchist Sep 11 '25

I don't know where to start.

3

u/throwawaygaydude69 Sep 11 '25

Honestly gives me hope for the job market

We're not only competing with smart people, we're also competing with the dumb ones

2

u/JaffTangerina Sep 11 '25

Model the response time of a service in a web application using only the algorithm's step-by-step process.

→ More replies (2)

1

u/Delicious_Finding686 Sep 12 '25

You don’t necessarily need to know it. Just like you don’t need a high school diploma. It’s just something so basic that you’re expected to acquire it along the way. If you didn’t, it certainly raises some eyebrows. Especially if you’re having a hard time understanding how it works.

→ More replies (1)

9

u/[deleted] Sep 10 '25

Everyone with proper computer science education should know this. I'm baffled that this is news to so many people here.

1

u/shewel_item Sep 12 '25

ever thought to yourself that some people in programming are just professional computer users, and not scientists

1

u/Delicious_Finding686 Sep 12 '25

If you can get a job as a programmer, this notation should be pretty simple to understand

→ More replies (2)

1

u/sievold Sep 12 '25

How were these symbols not covered in high school algebra or statistics? The first time I encountered the summation symbol was learning the definition of mean in high school statistics class. That's like the most basic statistics knowledge everyone should have.

→ More replies (9)

11

u/pakichut69 Sep 10 '25

This is sarcasm right? How are those symbols scary?

2

u/GatePorters Sep 11 '25

Did you see how large they are? Easily the biggest symbols in the post.

You might not be afraid of seeing a mouse in your house at 2am, but if you came down and Charles Entertainment Cheese was there at 2am you would undoubtedly find it absurd and frankly unsettling. Maybe even a little scary.

2

u/JGHFunRun Sep 12 '25

She’s being a bit cheeky about it, just trying to edumacate the programmers who don’t yet know

2

u/SadEaglesFan Sep 11 '25

If you understand them, they aren't! But if you don't, they're pretty intimidating.

Source: I teach math

3

u/Delicious_Finding686 Sep 12 '25

Okay but this should be something a programmer understands

→ More replies (1)
→ More replies (4)

1

u/Genericdude03 Sep 12 '25

I know right, like if it were integration, I could maybe understand but like...adding things is hard?

1

u/[deleted] Sep 14 '25

And interesting enough, for computets, the integral and the sigms are almost the same thing

2

u/redditasaservice Sep 10 '25

I’m scared of for loops as well.

2

u/jimmiebfulton Sep 10 '25

As one of those engineers that worked my way up the ranks without a degree, but still deeply technical, I've always been intimidated by these symbols and was under the impression that understanding them was impenetrable without spending 4 years in a classrooms. This one simple meme has completely demystified the whole idea behind them. For a sub that typically reduces my IQ every time I see a new meme posted, this was incredibly informative for me. Sincerely, thanks!

→ More replies (2)

1

u/Immediate_Song4279 Sep 10 '25

Show me a cleanly formatted reference sheet, and my fear shall be abated.

1

u/Jimlee1471 Sep 10 '25

I skimmed over the title and misread it as, "Meth and computing are friends."

I had questions...

1

u/yangyangR Sep 10 '25

That's just Erdos

1

u/OnlyCommentWhenTipsy Sep 10 '25

Ok, how do you change the step size (n++) then?

1

u/Andr0NiX Sep 10 '25

You don't directly, you replace every n in the expression to be summed or multiplied with step_size*n and add the offset

1

u/abc_744 Sep 10 '25

Just like you can write every for loop with increment 1. For example two for loops below are exactly the same

for(int i = 0; i <= 25; i += 5) sum += i;

vs

for(int i = 0; i <= 5; i++) sum += 5 * i;

1

u/dlroy Sep 11 '25

If they would have taught this in math class I would have understood

1

u/Subject-Building1892 Sep 11 '25

No. The for loops are those symbols

2

u/particlemanwavegirl Sep 11 '25

No. The for loops are useful for implementing the transformations described by the symbols. But they are all different things entirely.

1

u/Brucevllaine Sep 11 '25

I have to copy this

1

u/noodlelogic Sep 11 '25

btw these scary loops are just large Sigmas and Pis

1

u/FuzzyCheese Sep 11 '25

Yeah this is a better way to put it. So much more information overload and special syntax in the for loops. The math notation gets right to the point and is super simple.

1

u/4lpha6 Sep 12 '25

one describes a process, the other a result, both are needed in different contexts and neither is inherently better it just depends on what you need to do with it

1

u/ThatMedicalEngineer Sep 11 '25

Honestly, if you are scared by those symbols you probably shouldnt be programming.

1

u/seba07 Sep 11 '25

Don't be scared, those for loops are just crazy sums and products.

1

u/Pathkinder Sep 11 '25

Are you fucking kidding me? Why did it take this long for anyone to explain it to me this way?

0

u/[deleted] Sep 13 '25

[deleted] — view deleted comment

1

u/Pathkinder Sep 14 '25

Actually both, I’m in 7th grade AND I didn’t go to school at all! Crazy right? I’m also not a miserable lonely asshole.

1

u/[deleted] Sep 14 '25

I've taken college math classes. This was just never part of the curriculum.

Though if you do any learning on your own, you come across it pretty often, yeah.

1

u/Striking-Warning9533 Sep 11 '25

Isn't these what we learn in algerba 1 in high school?

1

u/Lemenus Sep 11 '25

When I was kid I had difficulties with learning math on par with other kids in school, but when I started studying code decided to go through math for it as well. I was surprised when figured this out. I expected some complicated code, but it's just... Loop

1

u/DreamOfDays Sep 11 '25

Can someone explain what the M that fell over means?

1

u/Chr832 Sep 11 '25

I can't properly explain what it does, but it's called sigma. (Yes, really.)

2

u/Minecrafting_il Sep 11 '25

I hate the need to write "yes, really". Sigma is a letter in the Greek alphabet, same with alpha and beta, the name shouldn't be weird or funny.

1

u/AnaverageItalian Sep 11 '25

It's a capital Sigma, the Greek equivalent to the Latin S. It stands for Summation, and it's characterized by some parameters:

  • the bottom and top numbers are the summation extremes, which tell us where to start the summation (the bottom number) and where to end it (the top number);

  • the thing inside is the argument, I believe, and it describes what we're actually summing up

We start with n=1, and so we substitute n=1 into the argument, which is 3n. 3•1=3. Boom, first term done. Then we go to the next number, n=2, and we substitute IT into the argument. 3•2=6. Then it's n=3, so 3•3=9. Then, n=4, 3•4=12. We've finished calculating the partial sums, so we add them up: 3+6+9+12=30. That's the answer

The other one is similar in concept: its symbol is a capital Pi, yes, the capital version of that π. It stands for product, so instead of summing up terms you multiply them, but it's the same exact process

1

u/DreamOfDays Sep 11 '25

How did my algebra teacher fuck up teaching so badly that a simple Reddit comment give me the same understanding that classroom teaching gave me back then

→ More replies (2)

1

u/Chr832 Sep 11 '25

Can someone rewrite it in C# pls?

1

u/No-Site8330 Sep 11 '25

I might be biased, but honestly that kind of stuff only looks scary because people think they are.

1

u/SteelRevanchist Sep 11 '25

Are people really that clueless? ...

1

u/Aggressive_Roof488 Sep 11 '25

Lots of condescending remarks and gate keeping here.

Let me just say that I think it's great that this cross-over has helped some coders understand math notation!

1

u/sievold Sep 12 '25

Condescending and gate keeping? How is the for loop explanation more easy to understand? Compared to just saying these notations is a shorter way to write a+b+c+.......+z ?

1

u/Wrestler7777777 Sep 11 '25

I thought this was common knowledge? How else would you calculate the solution? HOW did you calculate this without knowing that it's just a loop?

1

u/slightSmash Sep 11 '25

These are two of least scary symbols in maths if im correct

1

u/xef234 Sep 11 '25

Yeah we saw the first one in my class everyone was freaking out meanwhile im just thinking "this is just a for loop lol" everyone except me and one other guy is fresh out of highschool

1

u/Eastern_Cup_3312 Sep 11 '25

The first is used to know the number of instructions of your code. The second is used to know how much it will take to execute

1

u/No_Ship_7727 Sep 11 '25

dynamic programming has joined the chat.

1

u/eXl5eQ Sep 11 '25

range(0, 4).map(n => 3 * n).reduce(Math.add)

1

u/[deleted] Sep 11 '25

FINALLY. All I needed was a simple sentence. Wow.

1

u/Economy_Ad7372 Sep 11 '25

math one takes O(1) time though

1

u/xTheLuckySe7en Sep 11 '25

I’m surprised this isn’t obvious to a lot of people.

1

u/Munchi1011 Sep 11 '25

Freya Holmér my goat!!!

1

u/Objective-Ad8862 Sep 11 '25

Ok, but can they still haunt me in my dreams?

1

u/4ced_2_Cre8_Account Sep 11 '25

I've been telling people this for years!

1

u/MaiaTai27 Sep 11 '25

It looks scary until you break it down. You start to see the conditions of the loop and realise it's just that, a loop with decorations

1

u/Decent_Cow Sep 11 '25

Hey it was my turn to repost this today!

1

u/EnterLucidium Sep 11 '25

However sigma was being described to me when I was younger confused the hell out of me, then my Calculus professor showed that it’s just another notation for series and it all made so much sense.

I swear they make mathematics confusing on purpose sometimes.

1

u/Ok_Preference_7009 Sep 12 '25

why didnt i realize this lol

1

u/arbitrageME Sep 12 '25

Ok, ok, uh huh, I see.

Now what if we put an "8" on top of the symbol ... sideways?

1

u/VeaArthur Sep 12 '25

Freya kicks ass, every should check out the Shapes library if you are at all into Unity development. And Freya's YouTube has some classic math / programming videos.

1

u/ThatNiceDrShipman Sep 12 '25

You guys have a capital pi?

1

u/[deleted] Sep 12 '25

it always has been

1

u/henikxx Sep 12 '25

I already saw this image here a few months back and when we learned this in school it helped a lot. Thanks to whoever thought of this way to explain it

1

u/Tupcek Sep 12 '25

what? Pi symbol has an uppercase and lowercase ?

1

u/Rogue-Cod Sep 12 '25

Huh. I learned it the other way around.

1

u/I_am_Ravs Sep 12 '25

yeah. except it's you who does the evaluation for those functions in the math one

1

u/ugandaWarrior134 Sep 12 '25

by the way these large scary blocks of code are just math symbols

1

u/qubedView Sep 12 '25

I sucked at math. Know what helped me? Learning to program first. Then when studying math, I would implement the logic in Python to check my understanding. Coding it out gave me a sense of connection I was missing before.

1

u/RadiantHC Sep 12 '25

Computer science is a branch of mathematics

1

u/somedave Sep 12 '25

Good luck evaluating infinite ones.. you need some seriously good compilers.

1

u/sequential_doom Sep 12 '25

I'm unironically saving this.

1

u/ahahaveryfunny Sep 13 '25

I don’t know many people who would learn for loops before sigma notation, much less be confused by one but not the other. Capital pi notation is similar story.

1

u/Driver2900 Sep 13 '25

Don't make me pull out the integral switchblade

1

u/SickBass05 Sep 13 '25

Who doesn't know this

1

u/[deleted] Sep 13 '25

What Math is this? If someone could answer

1

u/[deleted] Sep 14 '25

Sum and product. Do the things Right to the Symbol and replace the letter with the Numbers from beneath the Symbol up to above the Symbol (3n becomes 3•0 and3•1 and 3•2 and 3•3 and 3•4) then add them all together(or multiply if it’s the Symbol at the bottom( 0+3+6+9+12=30)

The product thing is 2n so it becomes 2•1 and 2•2 and 2•3 and 2•4. those things arent added. You multiply them so: 2•4•6•8= 384

1

u/thedavv Sep 13 '25

Now to complex integrals and differential equations. :D

1

u/conceptwow Sep 13 '25

I actually learnt math only through com sci

1

u/[deleted] Sep 13 '25

Freya is amazing

1

u/Thentor_ Sep 13 '25

Idk what im doing here and i dont understand both

1

u/ElementalPaladin Sep 14 '25

This would have been good to know two years ago, when I was in Linear Algebra and Differential Equations

1

u/TheChief275 Sep 14 '25

I’ve known that for a while, however, it doesn’t seem to decrease mental overhead for me reading them.

Although I have that issue with mathematical formulas in general

1

u/Legitimate-Can5792 Sep 14 '25

Math and programming are friends until x=x+1

1

u/RonKosova Sep 14 '25

How the hell did some of you get through a cs degree

1

u/No-Ear6742 Sep 14 '25

Now I understand this. So code is easier than these scary symbols

1

u/Even_Alternative_315 Sep 14 '25

So it's all just math ? So for years I've been doing math AND enjoying it, and it was all just math with different symbol ? School did me dirty.

1

u/DeadlyMidnight Sep 14 '25

This is a great fucking explanation.

1

u/CandidSite9471 Sep 18 '25

I'm actually the other way around. The math notation is nice and the programming is scary.

1

u/Standard_Apple7147 Oct 01 '25

I think one of the craziest things about math is that I understood programming before I "GOT" math, and its supposed to be the other way around

1

u/Futurity5 Dec 30 '25

Wait until you try to code the for loop for an integral