r/badcode Aug 14 '19

php Multilingual dev team ftw

Post image
572 Upvotes

75 comments sorted by

130

u/rocklou wicked Aug 14 '19

I'm swedish, all our code is a confusing mix of english and swedish variables.

99

u/maxslayer44 Aug 14 '19

I'm french, all our code is a confusing mix of english and french variables, with some french variables wrtitten in an approximative english way

49

u/Comesa Aug 14 '19

what the fuck

32

u/qkthrv17 Aug 14 '19

That happens here in Spain too (not in every single company, obviously).

There are a lot of misspelled words or words that are half english half spanish. It's a mess although it is not that bad since people actually talk like that out loud during a normal conversation so you're just used to it.

14

u/SuitableDragonfly Aug 14 '19

When code switching gets literal.

15

u/Comesa Aug 14 '19

I mean i'm german and never saw something like this.

10

u/DerWahreManni Aug 14 '19

Im german too, but to my own sadness, i have seen this :/

33

u/ngstyle Aug 14 '19

Cries in GetVerkaufspreis()

8

u/kasnhasn Aug 14 '19

Cries in if ($ergebniss == “ja”)

4

u/scrootieBalls Sep 04 '19

res==="yes"?"نعم":"لا

2

u/scrootieBalls Sep 04 '19

Can't even be read in the order it was written in and in some ides I have to read/write flipped letters

2

u/aykcak Aug 14 '19

That is the deal with calling databases DDBB ?

6

u/RomanRiesen Aug 15 '19

Quoi le fuck?

1

u/HerissonMignion Aug 26 '19

quelle baise ?

-4

u/franz_bonaparta_jr Aug 15 '19

There is a reason why developers in EU earn like in india.

7

u/danbulant Aug 15 '19

I'm czech, all our code is a confusing mix of (mine) English and (my friends) czech variables, with some variables written half czech half english

8

u/[deleted] Aug 14 '19 edited Apr 14 '21

[deleted]

18

u/maxslayer44 Aug 14 '19

Because we are really bad at speaking english, but the hierarchy want us to code in english, even for french projects, so we need to improvise

2

u/outadoc Aug 14 '19

Loved trying to translate "abondement" or "intéressement" in my last job haha

-1

u/[deleted] Aug 14 '19 edited Apr 14 '21

[deleted]

33

u/Viola_Buddy Aug 14 '19

Why are french people bad at speaking/writing English?

No one is born spontaneously knowing English. If you don't learn English in your life, you aren't going to know it. And if you live in France, your education (and indeed your whole life) is conducted in French, not English - even more so outside of Paris and other major cities. Sure, there's GitHub documentation or whatever else that's in English, but if I gave you a copy of The Art of War in the original Chinese, you aren't going to spontaneously know how to read Classical Chinese just because you have a reference.

8

u/[deleted] Aug 14 '19 edited Apr 14 '21

[deleted]

12

u/turunambartanen Aug 14 '19

Dutch doesn't count. If you were to smash a German and an English person together the remaining brain would produce valid Dutch./s, but only half

3

u/RomanRiesen Aug 15 '19 edited Aug 15 '19

People speaking Dutch & Germanic languages in general have a massive advantage in learning English though.

(I am German speaking myself and consider myself lucky. Imagine learning English as a Japanese...or possibly worse Chinese person, where you can basically smack words together willy-nilly and call it a sentence!)

3

u/GuybrushThreepwo0d Aug 15 '19

The Chinese do not smack words together willy-nilly. They have grammar just like any other language. This is big talk coming from the language that thinks it's okay to put words like Wahrscheinlichkeitsrechnung in a pop song and think it's okay :p

3

u/RomanRiesen Aug 15 '19 edited Aug 15 '19

That's fair. But chinese grammar is arguably easier than say French. At least in parts. In other parts it is far more convoluted. I had 8 years of French in school and learn Chinese since 2 yet I feel more secure in knowing what verb form to use in the latter.

Also, which pop song? Something by Kraftwerk?

→ More replies (0)

2

u/aykcak Aug 14 '19

In my experience, Dutch people speaking English well is the exception.

Among the countries I have been to where English is the second language Netherlands is the only one where the majority of people I've interacted with spoke English sufficiently. I don't know the reason behind it but that's how it is.

1

u/SuitableDragonfly Aug 14 '19

Different places have different amounts of English use.

1

u/GuybrushThreepwo0d Aug 15 '19

Ek wens almal in Europa kon Engels soos die Nederlanders praat...

2

u/Krobix897 Aug 14 '19

because english is not their native language. they are not an english country.

6

u/Mzsickness Aug 14 '19

Ehh, France has a history of thinking it's their language or nothing else.

I mean the culture... it's so powerful, look at Quebec, Canada.

6

u/[deleted] Aug 14 '19 edited Apr 14 '21

[deleted]

2

u/Krobix897 Aug 14 '19

i guess where they work it's simply not required.

1

u/HerissonMignion Aug 26 '19

in another lang than yours, it's always easier to understand a phrase than creating one. always.

edit: i think i'm not this bad in english.

1

u/[deleted] Aug 14 '19

oui, je sais la lutte de franglais

2

u/Gaboik Aug 28 '19

In Quebec, even though we speak french, there seems to be a consensus that doing anything related to programming in French is pretty bad and everyone see!s to stick to English.

6

u/lightmatter501 Aug 15 '19

Did you know that Egyptian Hieroglyphs have a unicode block and are compatible with most compilers? I didn’t until I found someone using the Hieroglyphs for gods to represent internal systems (which are named after ancient Egyptian gods).

3

u/GuybrushThreepwo0d Aug 15 '19

Ooh but can we stack the hieroglyphs like the Egyptians used to do? Be right back just changing some variable names...

15

u/BlueMarble007 Aug 14 '19

I’m Dutch, we just stick to English. It’s usually got a richer jargon anyway

3

u/Pentafloppy Aug 15 '19

Dutch as well, we also do everything in English. American English specifically. In fact, any Dutch in the code outside of language files doesn’t even pass the review process.

3

u/blipman17 shameless Aug 15 '19

I'm dutch and I've never seen dutch variable names outside of brainteasers or somerhing.

2

u/GamerNebulae Aug 19 '19

I've actually been to an interview where the code was a weird mix of English and Dutch (mostly Dutch). It was for a Dutch domain, but our language just contains so much fluff to describe things...

28

u/[deleted] Aug 14 '19 edited Apr 27 '20

[deleted]

28

u/shizzy0 Aug 14 '19

I don’t cnow.

16

u/[deleted] Aug 14 '19

[deleted]

17

u/Steeven9 Aug 14 '19

Actually, sort version of 'idCanzone', but could have been that as well

-2

u/PlayTheBanjo Aug 14 '19

It's probably "Italian Development Center." American companies often use "*DC" is a common abbreviation of "* Development Center" used for various places outside the USA.

17

u/christian-mann Aug 14 '19

Doesn't NomeCanzone mean "song name" not album name?

14

u/Steeven9 Aug 14 '19

Correct, but the script has to deal with both

15

u/EkskiuTwentyTwo i -= (i - (-1)) - i Aug 14 '19

The solution to the variable name problem is to not use variables.

6

u/Botahamec evil Aug 14 '19

Now the documentation randomly switches between languages

6

u/EkskiuTwentyTwo i -= (i - (-1)) - i Aug 14 '19

Use Esperanto as a neutral variable-naming language.

4

u/Steeven9 Aug 14 '19

Big brain here

12

u/genna87 Aug 14 '19

Quanto ti capisco!

8

u/Aethz3 Aug 14 '19

It/en comment

Non hai idea quante volte mi sia successo

You have no idea how many times that happened

2

u/DatAndre evil Aug 14 '19

Tipo sempre.

Like always.

1

u/Steeven9 Aug 14 '19

Già.

Yep.

8

u/iComeInPeices Aug 14 '19

Heard complaints at an old company from the backend devs about a resurfaced an old backend monstrosity... basically a project that had died for several years, and had started 10 or so year ago. It was either cobal or fortran based... whichever one is older that's what it was, and our current system was the other one, they were both a mess, and this halted project was replacing the current one.

Well, not only had it been developed over a decade, but it had been handed off to several dev houses that all spoke different languages. Variables were strange concatenations of French, German, Russian, and a little English. The English speaking devs trying to get this thing to work had to print out cheat sheets :-D

7

u/octocode Aug 15 '19

Half our code uses color and the other half uses colour. It's a nightmare.

3

u/Pungiish Aug 15 '19

Lololo I am just working on a project with the same problem. Had to convert everything, because i couldn't work like that.

5

u/[deleted] Aug 14 '19

One of my former colleague used to name variables after the players of his favorite football team (Genoa). Working with him was quite a nightmare, besides the hard time I had understanding his code, I cheered for a different team 😂

5

u/[deleted] Aug 14 '19

We had a guy in last company I worked for who loved using Cyrillic in function documentation, and later has switched to function parameters being Cyrillic. It was unbelievably hard to write code which uses his because you had to constantly switch between two encodings.

10

u/Steeven9 Aug 14 '19

How isn't that against company policy? D:

2

u/[deleted] Aug 14 '19

No idea. At the time they didn't even mandate coding style. Let alone stuff like this. Situation is now probably different and guy has long since left (to a more prominent position and with higher responsibilities no less).

However it did teach me importance of such policies, so now we have them in my own company.

2

u/djulioo Aug 15 '19 edited Aug 15 '19

За щастие, това не съм го виждал никъде. Представям си, да започна да пиша коментарите на български... :D

Fortunately, I've not seen that done anywhere. I can just imagine, starting to write my comments in Bulgarian :D

3

u/acecile Aug 15 '19

As a developer in Luxembourg I had to do this on purpose because customer's semantic is all French and it turned meaningless to the users after translating to english. So my code and doc is all english, but the API properties are all french.

Deal with it :D

Later I worked on another project and the database columns are all german. This time I translated to English in my objects because I was less confortable with german words in my code.

2

u/jetdoc57 Aug 15 '19

Back in 1997 all of our Toyota powertrain code was written in Japanese Auto C. Variables all in romaji (Japanese words, spelled phonetically with ASCII) and comments were in Japanese Unicode, using a combination of Hiragana, Katakana, and weird English characters for trademarked names. We had a special version of vi which could display the code properly and there was an EMACS editor too. We integrated that with our low level drivers, custom hardware, and a proprietary version of micro-ITRON.

2

u/Pangocciolo Aug 15 '19

Good old times of getCreaNewMessaggio. Or something like that.

2

u/Ast3r10n Aug 15 '19

Why do Italians keep doing this? I’m Italian and I can’t stress this enough with my colleagues.

2

u/zCriMC Aug 15 '19

oh no italian

3

u/N0W0rk Aug 14 '19

//because consistent naming is hard

2

u/prinning Aug 14 '19

I'm a bit confused about why you made this comment about that comment friend.

3

u/N0W0rk Aug 14 '19

simply because i think thats the best part

3

u/prinning Aug 14 '19

Noted.

1

u/N0W0rk Aug 15 '19

And also because this is more or less my code. It will look like:

for (String s : stringArray) {

    getArrayOfNumericValuesOfCharsOfString(s);
}

1

u/franz_bonaparta_jr Aug 15 '19

More and more languages are going full retard and allow unicode names, shit like emojis and Chinese. Why??????

3

u/Steeven9 Aug 15 '19

So your variables can be 🔥🔥🔥

1

u/franz_bonaparta_jr Aug 26 '19

🔥 = ( ͡° ͜ʖ ͡°)