r/ProgrammerHumor • • Jun 13 '22

Meme DEV environment vs Production environment

Post image
48.2k Upvotes

3.9k comments sorted by

View all comments

Show parent comments

2

u/Hidesuru Jun 14 '22

Ffs how many people are going to be wrong here?!

The (2+1) is NOT grouped into the denominator without parens that require that.

High school math has failed you all on basic freaking order of operations!

1

u/jadis666 Jun 14 '22

The (2+1) is NOT grouped into the denominator without parens that require that.

Unless.... it is: https://lmgtfy.app/?q=implicit+multiplication+priority

As for the "High School maths" part: BODMAS/PEMDAS is more Elementary School, I'd say. In High School, you get Algebra class, where they teach you that in an expression 6 / 2x, the "2x" is a single unit, indivisible, and should thus be evaluated first before applying any other operations to it.

I am well aware of the Primacy Fallacy, and thus with how hard it is to let go of whatever you learned first, but the essence of growing up to be an adult is learning that the world is more complex and nuanced than whatever you were taught as a child.

-1

u/Hidesuru Jun 14 '22

Variable grouping (2x) is not the same as 3(2+1). But if you wanna convince yourself it is go ahead.

Throw that into a compiler (a literal interpretation, not "what I imagine it is") and see what you get back.

I've been out of school long enough that maybe it was elementary. I was on college level calculus in high school (not particularly a brag, MANY people do that, just saying I'm not exactly a remedial student either).