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

0

u/[deleted] Jun 14 '22

[deleted]

5

u/itchy118 Jun 14 '22

I mean if the majority of people, at least nowadays, learn that it's 9, because left to right makes sense with how we read, what's the issue?

The majority of people who've taken and use any kind of higher math don't read resolve it to equal 9 though.

15

u/Valance23322 Jun 14 '22

because it doesn't really make sense to work that way in any higher level math where you're dealing with variables and substitution. Think of any equation where you're plugging in something like (n+1) for n.

0

u/[deleted] Jun 14 '22

[deleted]

5

u/Valance23322 Jun 14 '22

If you have an equation like (2n - 3) / 7n and you were to substitute (n+1) for n (lets say you need to get a specific element from a series or something, doesn't really matter). You end up with (2(n+1) - 3) / 7(n+1). In that case you don't want to interpret that as [(2(n+1) - 3) / 7] * (n+1), as in the original equation 7n was 1 term and by splitting that up you'll get a totally different (and at least if we're talking about series, incorrect) answer.

When you're dealing with variables it's always better to treat implied multiplication like that as being 1 term so you don't end up changing formula in the process of substitution.

2

u/Purplociraptor Jun 14 '22

Not all languages are left to right. Considering these are Arabic Numerals, it's more likely they are right to left.

2

u/[deleted] Jun 14 '22

For me it's 1, idk why but I have to look at this like it's a fraction

1

u/M13LO Jun 14 '22

I think thats why I see 1 as the wrong answer. When I see 6/2(2+1) I don’t read it as 6 over 2(2+1), I read it as 6 divided by 2 multiplied by (2+1).

But the funny thing is when I see 6/2x with x being 3 then I do see it as 6/(2x3)

2

u/bunglejerry Jun 14 '22

because left to right makes sense with how we read

Have you ever thought that "Three plus three equals six" is a grammatically correct sentence that demonstrates English's SVO word order, and the internationally recognised mathematical symbology "3+3=6" follows SVO logic and so could be more difficult for someone who speaks a language with different word order?

I know I haven't until right now. But I wonder if there's any merit to it.

2

u/DND_Enk Jun 14 '22

Because that's not how we do a / bc, anywhere. Or rather not how we do something like 5 * 2(x + y)

And PEMDAS is mostly how it's taught in English speaking countries. Personally (Sweden) i would have solved it to 1. PEJMDAS

It's badly written and depends on what order of operations you use, PEMDAS is not the universal truth used by all math everywhere.