- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Guten Tag. Oh the fun they are going to have when they query the date at multiple different places and it just ticks over to a new day at 00:00:00.
Admin
For those wondering: Tag is German for day.
Admin
Only benefit seems to be the translation, so if you want der Tag, you don't need to remember the English translation. Of course, you do need to remember "get". Could have used "holTag" , "holStunde", usw.
Admin
And monat means month, which means that most of these internals have falsely named variables.
@sibtrag I am wondering how he is handling getting VAT numbers
Admin
Whatever they hired, it was not a C# developer - looks to me more like a Java developer pretending to be a C# developer, a pretty common sight.
String is written in lower case (keywords always are and preferred over types) and method/property/type names are always PascalCase no matter the visibility.
Admin
I've done code reviews of an in-house project being remodeled by a co-worker. This is no criticism of his work; it's fine. But the parts he didn't write were like this:
Guess the programmer's native language.
Admin
Gibberish?
Admin
"Datum" is a singular of "data" from Latin, it's not the same as "date(s)".
Admin
"Datum" here is German for "Date"
Admin
It's always the C# or PHP guys...
Admin
C/C++? Not knowing auto properties and using snake_case smells like it :-)
Admin
The word "Datum" has basically two meanings in German: Primarily it's a date (like 23.4.2025 or 2025-04-23), but it's also the generic term for any data (here: a specific, singular piece of data), even though that (rather uncommon) meaning is "for IT use only"; meanwhile, german programmers are well known (in Germany) for mixing German and English; getDingenskirchens(), readAntwort(), or pushSteuernToFinanzamt() aren't the exception, they're the norm.
Admin
That's a given.
Admin
It is in German.
Admin
I'm guessing this developer was taught C, or something older, given the variable declarations, then assigning values to the variables, then returning the variables, instead of simply returning DateTime.Now.Whatever directly (assuming the wrapper methods were somehow easier to use or necessary in the first place).
Admin
Since nobody has called it out so far: This idea of splitting a timestamp into multiple methods will not work.
Think about 23:59:59 as an simple example, and what happens if the clock ticks to the next timestamp during processing (yes, DateTime.Now is fast but it is also expensive because it not only generates a new UTC timestamp using a system call, is also has to localize the timestamp according current localization settings).
´´´ getStunde() // 23 // Tick getMinute() // 0 // Result 23:00 ´´´ or ´´´ getMinute() // 59 // Tick getStunde() // 0 // Result 00:59 ´´´
So yeah, this implementation is nonsense on every level. Which is not a surprise for Denglish code.
Addendum 2025-04-24 04:13: Well, darn, I mess up the formatting again.
I wonder if d-wtf every gets a preview or a property edit button.
Admin
Not naive about the language at all. They may have written code prior to C#4 or they may understand that auto properties are simply code candy and do not the solve of getters and setters
Admin
So much could be said about this. Like how I had to run Excel in an English context to get English function names, and now it sorts all wrong. These people are clearly the demented demon worshiping hellhounds behind that insanity from the very start. (Though it's hardly the first nor last Microsoft insanity that has been cheered on by the depraved masses...)
Or the funny thing where the programmer is so scared of null they do the "DateTime datum = new DateTime(); datum = DateTime.Now;" thing. Because null kills.... or something...
Admin
This made me think of, what conventions could possibly have spawn if programming had developed in a German centric era. Mind you, English is uniquely well suited, given its simple grammatical constructs and strict sentence structure to guide the conventions and allow reusing the same letter sequences in different grammatical context while making sense sometimes.
In English,
getX
can be understood as "take the value of X from somewhere" or "be given the value of X". In German, I can't think of a direct equivalent, so what would likely end up being the convention?