- 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
+1 to anyone who can accurately summarize the business logic in 30 words or less.
Admin
Nein, nein, nein, nein!!!!! </adjust monocle></witch moustache>
Admin
Was zum Teufel!
Admin
Hear me know and believe me later, readability is for little baby losers.
Admin
Looks pretty standard to me for a big company.
Admin
TRWTF is the German variable names. Everyone knows that English should be used.
Captcha: consequat - I think I'm going to suffer them soon.
Admin
I can summarize this business logic in one word, but it isn't a very polite one.
I can also summarize it in 20 polite words, "a bunch of indecisive managers have been throwing different requirements at a team of overworked programmers for far too long."
Admin
Darn akismet, won't let me post as a URL.
www.netlingo.com/word/das-blinkenlights.php
Admin
Then again, if the softwar's got anything to do with the German tax code, I can see why it's that complicated.
Fun fact: The German tax code is as large as ALL other countries' tax codes lumped together.
Admin
TRWTF is German tax legislation.
Admin
It's not that bad, actually. The entire first part reduces to pseudo-code of:
if(t17Date < MaxDate(#1/1/2005#,ende,anfang) && Math.Abs(amount) > 250)
The complication comes from parsing and converting the same text over and over rather than using locals and a few simple methods. Whoever posted this could have refactored it into something decent in less time than it took to write up the bogus framing story. (Then again, maybe not).
Admin
Admin
appears 27 times in the source.
Admin
There are heaps of common subexpressions. For example, the same three date specifications are parsed upmteen times each, and comparisons between them repeated ad nausaeam. Apparently the developer has never head about using local variables to give names to meaningful intermediate results.
Admin
Meine kopf ist kaputt.
Admin
Imagine if Hitler had used these guys; a lot more people would be alive today.
Admin
Admin
Ahha I see, TRWFT is that it should be inline yeah?
:)
Admin
The bigger the company, the worse the code.
Wow, I didn't realize your company was THAT big!
Admin
Admin
TRWTF is that Chrome decided to translate the page...
And unwrapped the code to a single line, without adding a scrollbar...
Admin
a = (DateTime.Parse(Convert.ToString(table17["T017_txt_addChangeDate"])) b = DateTime.Parse("01.01.2005") c = T012_lbl_AenderungVorsteuer100EUR e = T012_lbl_Berichtigungszeitraum_Ende.Text g = T012_lbl_Berichtigungszeitraum_Anfang.Text h = T012_lbl_AenderungLaufJahrEUR p = T012_lbl_AenderungGanzesJahrEUR d = DateTime.Parse(e) f = DateTime.Parse(g) q = GetRoundedDate(a)
flag = FALSE; if ((a < b) && ((c >= 250) || (c <= -250)) && (a <= d) || (e == "")) && ((q) <= d) || e == "") && ((q) > f) || (g == "")) flag = TRUE;
if (a >= b) && ((c >= 1000) || (c <= -1000)) && (a <= d || e == "")) && ((q) <= d || e == "")) && ((q) >= f || g == "")) flag = TRUE
if ((g == "") && a < b) && (c >= 250) flag = TRUE
if (a < b) && ((h >= 250) || (h <= -250)) && (a <= d) || (e == "")) && ((q) <= d) || e == "") && ((q) > f) || (g == "")) flag = TRUE
if (a >= b) && ((h >= 1000) || (h <= -1000)) && (a <= d || e == "")) && (q <= d || e == "")) && (q >= f || g == "")) flag = TRUE
if ((g == "") && a < b) && (c >= 250)) flag = TRUE
if (a < b) && ((p >= 250) || (p <= -250)) && (a <= d) || (e == "")) && ((q) <= d) || e == "") && ((q) > f) || (g == "")) flag = TRUE
if (a >= b) && ((p >= 1000) || (p <= -1000)) && (a <= d || e == "")) && ((q) <= d || e == "")) && ((q) >= f || g == "")) flag = TRUE
if ((g == "") && a < b) && (c >= 250)) flag = TRUE
if (flag) T012_lbl_VorsteuerKorrekturErfolgt44.Text = "ja"; else T012_lbl_VorsteuerKorrekturErfolgt44.Text = "nein";
I made a few mistakes with parens, but that's basically it. It looks like the same basic logic over and over again.
Admin
Admin
"Marginal Shittiness?"
Admin
Admin
No, no. You are way too fat. No more cookies for you.
Admin
Se habla aleman?
Admin
I see the problem. They forgot the brackets.
Admin
Admin
At least nobody can blame the developers for being lazy. They code and code and code and code...
Admin
It takes me back to my own days of financial report-writing. Urgh.
And "a bunch of changing requirements on deadline with a junior developer thrown in" sounds about right for this.
Admin
Admin
So much for German engineering.
Admin
You are sooooooo wrong that it's easier to drag you out to the street and shoot you to relieve your suffering, instead of trying to explain where exactly you are mistaken about XML and databases.
Captcha: idea - see the system agrees, that this is a good idea
Admin
Admin
And what's wrong with copying straight into WWWRoot?!
Ok, we're not that bad [any more]... Just a quick SVN Update directly on WWWRoot instead :-)
(Just checked, I can't browse into .svn folders on our website - Phew!!)
Admin
T012_lbl_VorsteuerKorrekturErfolgt44.Text = "frist";
Admin
We Anabaptists speak it, you English dummkopf.
Admin
Admin
Admin
Captcha: eros. Erm, some kind of statue thingy?
Admin
TRWTF is internationalization
Admin
<sarcasm>Yeah right... f**k databases. Why do we need them if there's excel around.</sarcasm>
Admin
This is the exact same code, three times in a row.
All it does is to check if some tax correction is needed. Here's some pseudo code:
Admin
I love this stuff:
So, "T017_", right? Probably means it's in table17? Because even though I'm already accessing the field from the "table" I want, I need the additional precision that comes from specifying the "table" I want in the field's name.Forget about readability for a moment and just think about the pattern above, its inevitable recurrence throughout the codebase, and the effects it might have on maintenance. Then weep.
Admin
Oh boy we have an Excel Fanboy, someone who's written a few lengthy formulas and think they're a developer.
captcha: illum, a word a redneck uses when trying to speak gangsta.
Admin
Oh wow Rnd. XML is far better format than CSV for many circumstances. Maybe it's not for importing to excel, but for many OTHER circumstances. If you're only importing data into excel, yeah, maybe it's a WTF. I've yet to successfully import data in from a XML file to Excel, but I've yet to care to figure it out, either, since I've got a lot better tools than Excel to do most of what I need done.
Admin
+3 to anyone who can find the 9 bugs in that conditional.
Admin
Jeez, you guys are such code Nazis.
Admin
FTFY