The concept of foreign languages in code confuses and frightens me
Programmer Humor
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
Ich will das! 😍 Zurück 0;
I worked with one of the authors of the Brazilian SQL. It was exactly what it looks, every reserved word translated to Brazilian Portuguese.
Oh god. I still have nightmares about that time I had excel formulas in Portuguese, I refuse to think about SQL.
Don't forget the keyboard shortcuts. Office products would change shortcuts according to the language, so it would be more mnemonic. Ctrl-F for find and Ctrl-B for bold would be reassigned to whatever initials that language had. Fun! /s
Pretty sure druckef
should be drucked
. printf
means print
(to) f
ile. "File" is valid German, but it is non-standard and "Datei" seems to be the preferred form.
I could also argue that that d
should be capitalised, but I'm already overstepping my bounds considering I know very little German.
I wouldn't want to say which should take precedence between C's preference for all-lowercase keywords and functions and German's Rule to capitalise all Nouns.
I think druckef
is correct, the f
means format
. fprintf
would b ddruckef
or DdruckeF
Are you sure the f
is supposed to mean file
and not format
, as in print a formatted string?
Blödsinn. Richtig heißt das "druckefuck".
Du hast vollkommen Recht :)
Nee, de f in printf staat voor format, niet voor file.
nederlands ees nur duits met veelen dooppelbuuchstaaben, ooder?
If you think German C is bad imagine Czech PHP.
Had to refactor an entire custom Magento plugin written in it.
I found a random PHP file online and recreated your trauma:
<?phpcz
jmennýprostor Itb;
třída OvladačUživatele
{
soukromá §větev;
veřejná funkce akcePřihlašovacíhoFormuláře()
{
§poleParametrů = [
'názevStránky' => 'Přihlašovací formulář',
];
§vzor = 'domov.html.větev';
§html = §toto->větev->vykresli(§vzor, §poleParametrů);
vypiš §html;
}
veřejná funkce zpracujPřihlašovacíAkci(§uživatelskéJméno, §heslo)
{
když(§toto->platnéÚdajeSprávce(§uživatelskéJméno, §heslo)) {
§_SEZENÍ['uživatelskéJméno'] = §uživatelskéJméno;
§poleParametrů = [
'názevStránky' => 'Vzorový formulář',
];
§vzor = 'domov.html.větev';
§html = §toto->větev->vykresli(§vzor, §poleParametrů);
vypiš §html;
} jinak {
§poleParametrů = [
'názevStránky' => 'Formulář chyby přihlašování',
];
§vzor = 'chybaPřihlášení.html.větev';
§html = §toto->větev->vykresli(§vzor, §poleParametrů);
vypiš §html;
}
}
soukromá funkce platnéÚdajeSprávce(§j, §h)
{
když('admin' == §j && 'admin' == §h){
vrať pravda;
}
jinak když('staff' == §j && 'staff' == §h){
vrať pravda;
} jinak {
vrať nepravda;
}
}
veřejná funkce jePřihlášen()
{
když(jenastaveno(§_SEZENÍ['uživatelskéJméno'])){
vrať pravda;
} jinak {
vrať nepravda;
}
}
veřejná funkce uživatelskéJménoZSezení()
{
když(jenastaveno(§_SEZENÍ['uživatelskéJméno'])){
vrať §_SEZENÍ['uživatelskéJméno'];
} jinak {
vrať '';
}
}
}
Is this what it looked like? (I also took the liberty of replacing $
with §
because of the Czech keyboard layout; FYI: yes we do have a $
available as AltGr
+ů
but §
is in the base layer; I would also replace the backtick/grève `, which is obtained by pressing AltGr
+š
once or twice (OS-dependent), with °
).
BTW my first code was in the "Imagine" program, a Logo IDE with Czech localization (including syntax: do
, vz
, vp
, vl
, puntík
, smaž
, domů
, příkaz
, konec
, piš
etc.). The documentation was piss-poor, I never learnt about arrays or code comments. The textbook I had didn't even mention variables, I only learned about them in a short PDF guide I found online.
Had my 10yo self received a Python runtime instead, I wouldn't be stimied by the "you don't need to pass arguments if every variable is global" mindset I'm still struggling to overcome.
Thanks now I’m having flashbacks
There is something like this? 😂
Well, in PHP you cannot #define new words from some new language to mean basic language keywords.
#beinhalte
My German teacher: any usage of the verb 🦵-halten in your essay is a point off.
zurück 0;
What's wrong with beinhalten?
Overuse and lack of elegance, in her opinion.
We still loved her though.
It doesn't fit very well in this context, the idea behind "beinhalten" is that the subject "includes" the object (i.e. the object is part of the content of the subject), but the #include command in the C preprocessor isn't about describing that kind of situation, it's a command "I want to include one file in another", a better verb in German for that is "einbinden". (I realize this isn't a very good explanation, but I'm a native speaker of German and can tell you that no one would use the verb "beinhalten" in this context.)
The previous commenter's German teacher likely prefers "enthalten" instead of "beinhalten", which has the same problem in this context though.
Maybe incorrect rebracketing? It's supposed to be be-inhalten, not bein-halten. Otherwise maybe a writing style thing...
You are missing the Neuzeil at the end of the Schnur.
Well, you can Code in a real German syntax: https://ddp.im/en/
DDP has the following data types: Zahl (long), Kommazahl (double), Buchstabe (char), Text (string), Wahrheitswert (bool) und Listen (list)
Gottimhimmel, that would drive me crazy, and I'm German.
The code screenshot is pretty nice though. Actual grammar in there, full sentences that "Goethe would be proud of".
The code screenshot is pretty nice though. Actual grammar in there, full sentences that "Goethe would be proud of".
The syntax and all these Wenn
reminds me of Cucumber/Gherkin
Why yes I always dreamed of writing code like a full on novel.
Forget that the real evil is that the first character of Int or Ganz in this case is capitalized
German has a word for it: Substantivgroßschreibung
Quellcodeanglizismussubstastivbeispielersatzgroßschreibungsregel
Most fucked up thing here is
<type> <name>
{