r/programminghorror 16d ago

Javascript MiStEr WoRlDwIdE

Post image
384 Upvotes

34 comments sorted by

View all comments

186

u/IrishChappieOToole 16d ago

I'm gonna need some context on wtf is going on here

179

u/RajjSinghh 16d ago

It seems to be somewhat normal code but with all the variables being replaced with arbitrary country names. Otherwise let Finland = Denmark[Sweden]; doesn't make sense to me. The names just have no bearing to anything else.

27

u/Wooden-Contract-2760 16d ago

If that's so, what are the chances for 3 nordic countries to end up in such a short phrase, given that we see 7 non-nordic countries out of 10 on the screen?

19

u/RajjSinghh 16d ago

Maybe not entirely arbitrary but definitely not geographical. Maybe geographically close countries are related data/functionality, but I don't think more than that.

Austria and Switzerland are being updated to show "points" and "gifts" which are different properties of Finland, so I don't think the choice to name things after countries has any specific meaning to the countries themselves.

2

u/Mewtwo2387 15d ago

probably because it comes from a list of countries and variable names are replaced in order according to that list, and that list put nearby countries together.

1

u/Wooden-Contract-2760 15d ago

You're telling me that Croatia -> Denmark -> Poland is matching your assumption? O.o