- 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
Ugh, WTF!
Admin
Before anyone asks, the WTF here is the comments. I mean, they are useless, almost like they are in some foreign language or something.
Admin
ARGH! My other eye!!
Admin
is this really the actual source code, or did the creator of this mess pipe the code through an obfuscator to get follow-up orders?
Admin
BWHAHAHAH-COUGH-COUGH-GASP-GASP-MUHAHAHAHAHA-GASP-THUMP (fall over dead on floor)
Know I know why that damn place lost my reservation........ (just kidding) What a f*'n nightmare! I would DEFINATELY quit if I were handed this piece to repair.
Admin
Once again:
SWEET JESUS!
Admin
> is this really the actual source code, or did the creator of this mess pipe the code through an obfuscator to get follow-up orders? <
It's definitely real code. Everything in the system was written this way. And in the beginning of every file there's a loooong list of DIMs for variables like LS1, LS2, LS3 (strings) or LRS1, LRS2, LRS3 (for resultsets) etc. and there are comments after the DIM where and whatfor these are being used.
Admin
Owwww my back up brain.
Admin
Uh, oh, this comments are written in german ;). But the comments are more or less usable. can't say anything worse about that.
I just say that the WTF for me are these strange forms which look like some accident or something.
Admin
wow...
Me![WTF].Visible = True
Admin
Thank you -- this does not disappoint in the least. I would have hated to see novice one-eye-on-the-manual code behind yesterday's forms. This guy knew what he was doing, and did it anyway. Beautiful!
Admin
Sounds like time to build a new app or buy one [http://www.imagichotelreservation.com/] - $200
Admin
--- Aaaaaaaaaaah, the PAIN. ---
Naw, seriously.
Who doesn't understand what "f z tgab 0101 1 1" does? Or "f z tgab 0101 2 1 4 1". Welcome to the world of self-explanatory variable names.
I hate having to read our designers HTML (and I code in PHP/Perl), but this makes his code look like a slight lack of punctuation in a regular sentence.
Admin
This "system" of naming forms reminds me of programming a SAP R/3-System...
Admin
That's one application his boss isn't going to ship off to Mumbai for maintenance. I think the guy knew exactly what he was doing.
Admin
Yesterday I couldn't understand the complexity but today.. the details are alot better.. and I now reverse what I said yesterday.. this is THE system from Hell! My deepest regrets to whomever is responsible for taking care of this monstrosity. I myself have to handle a piece of software that takes data from multiple sources.. into arrays.. then puts it into a listview to be sorted.. back into an array.. then into another array... ahhhhhh!!!
Admin
> It's definitely real code.
Holy **** !!! Nikolay, you really have my sympathy.
Admin
PS: sorry for spamming, but I have to add that I really like the last comment in the code:
> 'Zählervariable erhöhen (= Increase Counter)
> LI3 = LI3 + 1
Captain Obvious to the rescue!
Admin
ok, WTF WTF WTF
WISKEY TANGO FOXTROT, ROGER!
I think i need my jaw readjusted, since it fell down after the first screenshot and me trying to comprehend it. I may never again eat food without it coming trough a tube of somekind.
Admin
Here we go...
This is a WTF because?
The names?... I could agree those names there are crazy. But at least they are consistent. It would be kind off dull to find out table names like reservation, customer, etc. in this system.
The SQL?... besides a few IIF's and the funny names the SQL is pretty simple.
The sub-sub-reports? Does that scare you?!... What can I say that doesn't sound rude?... hmmm... I'll keep silent.
The code? Again... funny names out there but it seems quite normal VB code, some controls going invisible, some dynamic positioning, a good amount of German' comments,
Is this Hell code?... damn it... where does that puts me? I thought Hell was the worst place to be... where am I then? Hell' Hell? :)
BTW... Shane you turncoat bstrd... Shame on you ;)
Admin
Moral of the story:
Germans are bad programmer.
Admin
hmm okay. i luckily come from switzerland, so i don't have to take this personal ;).
"Chuchichäschtli" rules.
btw: has anyone ever seen code like this:
XYZQuery->Active?XYZQuery->Active=false:NULL;
Borland C++ Builder, XYZQuery is of type TQuery*.
Admin
@Thinker.
SAP R/3 is a WTF all on its own!
Admin
hmmm, you should never be able to do an assignment in a shorthand conditional... theres just something so WTF about that, too
what is this SAP R/3 you say?
Admin
Guano, you just don't get it do you? This is supposed to be a site where we all take the pss out of crappy and incomprehensible code, and have a bit of a laugh while we do it. Your defending of this sort of thing just kind of ruins it. I mean, what is the point? Are you seriously trying to tell us that you wouldn't be too bothered to be faced with maintaining this? That you are such a genius programmer, that you can deal with anything?
"And this is a WFT because?" - Do you realise that this makes you sound like the most pompous self-absorbed twt in the world?
Admin
> "And this is a WFT because?" - Do you
> realise that this makes you sound like the
> most pompous self-absorbed tw*t in the
> world?
No it doesn't. I agree with Guano. This is hardly a WTF, so it's complicated - maybe it has to be.
This site isn't funny, you have all turned into a bunch or moaners!
Admin
When are you going to show us bitches the spec for this system? I for one would love to see the requirements document that spawned this beauty, so I'd be sorely disappointed if there wasn't one.
Admin
> so it's complicated - maybe it has to be.
Complicated and comprehensible aren't mutually exclusive, you know.
Admin
The poor bloke who wrote it - he had probably just come out of college and got a job writing this thing without any decent spec and with constantly shifting requirements befor he realised he was completely out of his depth!!!
This app has all the hallmarks of 'ohhh, wouldn't it be cool if...' that you learn to run a mile from as you mature. As he got further and further out of his depth, he must have been worrying more and more, and then thought 'I know, unbind all those form objects, maybe that will make it faster' before realising there was nothing he could do from here - I will bet a pound to a penny that this whole app is so full of bodies the cheapest quickest fix is a rewrite.
Never give a complex job to a fresh graduate - you only start learning once you're out in industry!
Admin
@Spidedy
First of, It's Guayo. You may like bat sht all you want but that's not my nickname.
I'm ruining your fun?... damn!... I'm so sorry your fun is so linked of what people post here... this certainly gives a whole different perspective to post a comment in the daily WTF. Now instead of just post about the snippets 'll have to remember about your fun. The responsibility feels overwhelming. :)
Yes I could be bothered of maintaining this, the objects names certainly are crazy (like an abridged Hungarian notation) and I kind of agree that's a WTF... however I don't agree about the uber complexity of the rest of pictures posted. I don't agree that this system is more complex that it should be because the obvious, I don't have the specs.
I'm certainly not agree with the OMG! OMG!, Ohh my eyes! My brain hurts! Posts here not because I don't understand the Halloween mood or the concept of joke. It's just that those posts seems to portrait this to be one of the bigger WTF here and I don't think that's true.
I can perfectly understand that this could be a terrible system to maintain and if that's the case I feel sympathy for Nikolay but the screenshots post doesn't show me that (maybe just hint it).
I sound like the most pompous self-absorbed twt in the world?... Now you hurt my feelings... :)
Admin
Whether the requirements are complicated or not really doesn't mean that the code needs to be unreadable/uncomprehensable or not. There is no connection.
You all know the story: Progammer A writes code so complicated, so intricate, so far beyond normal comprehension that it takes a genius to understand. Programmer B writes code that does the exact same thing as Programmer A's code, but it's so simple that even 10 year old could understand.
Which programmer is truly the genius?
Admin
spidey -- sorry, just realized I said basically the same thing as you !
Admin
Is it spidey or Spidedy? How about spididy! Get it? Like P-didy? You don't get it do you? Sometimes I wonder about you guys...
Admin
Jeff, to answer your question about Programmer A and Programmer B...the answer is Programmer A. This is because he has the ability to think at a far superior level. Programmer B should be writing code for those "Learn something in 24 hours for dummies" books. It takes a true genius to obfuscate code. Any wannabe programmer can write a quick app in 10 seconds and publish it on the web, but it takes a true programmer to write complex code.
Admin
yikes, Mike, I hope you are joking ! Talk about missing the entire point. You keep on confusing "complicated" and "complex" with obfuscated and confusing. Again, there is NO RELATION BETWEEN THE TWO. A simple requirement can result in convoluted code (i.e., rounding numbers), and a complex requirement can result in simple code in the hands of a capable programmer who thinks ahead, plans carefully, writes efficient algorithms, and knows the language they are working in well.
A computer science degree can't hurt, either.
Admin
Dude, that's harsh man. How did you know about my lack of a degree? Is it that obvious?
Admin
I am going to set up a new site: TheDailyWhatTheHell. I think many contributers to this site will enjoy a different perspective on programming techniques.
In "TheDailyWhatTheHell", users will submit short, efficient code that accomplishes complex tasks. Viewers will read the submissions and submit their criticisms and respond like this:
"Yikes! only 3 lines! I can do that in 5,000!"
"This guy will put us all out of jobs if others find out how easy this stuff can be!"
"Using existing libraries??? that's for wimps! I write my own!"
"Hasn't this guy ever heard of VARIANTS ???"
"No endless loops? Not even one? At least this guy could add some delays or SOMETHING"
"What's up with those variable names? 'SalesPrice' ?? Come on !! anyone can figure out what THAT means!! Where the hell is the prefix??"
I will get to work on this site immediately so those who don't quite understand the code submitted here will have a place they can enjoy. Stay tuned!!
Admin
That was a shot at us non-degreed programmers, wasn't it JDog?
Admin
Whether you agree with the WTF or not, you gotta admit that the comments section on this site has definately become just as entertaining as the entries themselves. How about creating a section of the site where the most WTF comments are listed? :)
Admin
Actually, a quick defense of one aspect of this:
In Access, you cannot create controls at run-time using code (though you can open a form in design view, edit it, and save it using code, but that really isn't the same).
So, if you want to "create" labels and textboxes and such using at run-time using VB -- which IS sometimes required -- you need to put a bunch of stuff on the form at design time, make it all hidden, and use existing controls in your code, setting properties, and moving the controls where you'd like. So if you ever might possibly need to create 100 textboxes in your code, you need to find a place for 100 textboxes on the form during the design stage.
That's probably what this guy ends up doing. This form, when the app is executing, may very well look quite nice and organized.
That still doesn't excuse the naming conventions and such, however. Just thought I'd point that out.
Admin
This code looks much like it' been first build in GWBasic or some host system (only 2 char's of variable names) and ported to Access a long time ago.
It also seems the author has a thick reference manual where all those acronyms are explained (the query names sound like some form of chapter numbers); maybe the doc's are well organized - this wouldn't show up in the code.
I would guess that the current maintainer is not the original coder, because the comments make sense, but the code is quite obscure.
But who of you would have rewritten an application like this if you were to port it to "a windows platform" and had only a small hotel as a customer ?
(Prakash: I wouldn't agree, some of the most beautiful programs come from germany, e.g. SAP R/3)
guenter from Frankfurt/Germany
Admin
I don't really see anything 2 bad in here actually. This is what production code often looks like.
Without intellisence to give you the full name of a variable short names just save time when creating a system.
When you know what they mean and they are a coding standard it's really no problem.
When you have to work on such a program you will soon see a pattern in the things that where created.
Admin
The names?... I could agree those names there are crazy.
Sadly, this was considered the canonical way to name forms and modules in the business systems development world back in the mid to late 1980's by the same type of people who inhabit the VB business apps development world today.
{History lesson and personal tale of dev woe commencing here}
I went through an Information Systems undergraduate curriculum in the mid-1980's that definitely encouraged this naming convention. And then I (in the worst possible career decision, as an ACM Programming Contest regional winner who surely would have had better to pick from if he'd just bothered to look) joined a tiny VAR in town run by folks who'd graduated from the same curriculum 5 years earlier when they came to the college computer center, asked for the best unix geek there and the profs pointed at me. You guessed it. I encountered hundreds of modules (and I do mean closer to 1000 than to 100), all named xxxx{p,f,r}nnn, where xxxx was the name of the subsystem such as RIMS, ACMS, PRMS, AFMS, the next character was a token describing the type of executable it was (p = generic process, f = forms process, r = report process), and the nnn was the next available number on the list when the program was designed.
The idea was that if you have 300 modules and 8 characters in which to uniquely name them, as was the case on IBM mainframes of the day and on DOS-based PC's, you won't be able to come up with good descriptive 8 character names for all of them, so rather than deal with acronyms like nxtcsordg, you might as well keep a big table of name tokens and descriptions. For example, IBM MVS (which ran on mainframes) had programs named like "IEFBR14" (allocate disk space), "IEBGENER" (copy a file), "IEBCOPY" (copy an archive library, but not a file, no I am not kidding), "IKJEFT01" (run the command interpretper in batch mode so that command interpreter scripts could be executed). Folks really liked the descriptive-acronym-prefix idea back in the day. Since it's easier to *manually* (automation? no, that's for customers, we still do things manually here ;-) look things up on a list when it is in obvious sorted order, such as numeric, you might as well name these tokens numerically so that the manual lookup to answer the question of "wtf is rimsp103?" is as efficient as possible.
Of course, things degenerated. Since 4 characters were being wasted with the name of the application system, and one character was used to indicate type of program... within a given system and type of program, there could be 999 names to look through, if you were just trying to find out "wtf is the name of the module that does conflict search?". This was eventually judged Inefficient, and The Second Great Renaming (the first being that of the Usenet hierarchy, several years prior) ensued, where the first of the 3 numerical digits was reassigned to mean something special (for example, conflict-search related code had a first digit of 5, general ledger related code had a first digit of 3, timekeeping related code had a first digit of 2) so that you'd only have to look through a list of 99 descriptions to identify the magic module number you needed when the boss asked you to add some random new feature to search. NOW.... Not only is the name full of magic tokens. BUT, WAIT, THERE'S SO MUCH MORE! Since the naming convention wasn't dramatically changed, and there's no way to tell 'new names' from 'old names' .... imagine how fun the (of course, manual) process of renaming things was.... and how many months elapsed before (knock on wood) the last of the incorrectly-renamed or overlooked-during-renaming modules was found.
I was so relieved when that business failed. I was perplexed for the longest time that it was managing to stay just 3 steps ahead of the racing waters of karma trying to lap at its feet. It galled me that the founder got a fully-paid half million dollar house (back in 1988) on the river out of it, though.
Once I'd spent 4 years there (silly me, I thought I could get the place to See The Light... ahh, the optimism and folly of youth), I'd pigeonholed myself as a lower-end-business-records-and-accounting-apps drone and spent the next 4 years convincing the tech community to trust me with real Computer Science projects.
{end}
Admin
The real WTF are people who think commenting code in another language is a WTF. I mean, seriously. If you have another language than english as your mother language, then you'll use that language even at your workplace. It's much simpler to get things done if you use your first language to do things. Or else you'll get people who are bad at english (yes, some people aren't really good at speaking different languages. I mean, I like to think my english is pretty much OK, but in reality I just suck at it) trying to comment code and in the end you understand nothing. If you work in a foreign country, then it certainly doesn't hurt to speak the main language (or one of them, in case there are more than one official langauges). And you should expect people at your workplace to converse in other languages than english as well. I never understood the audacity of some people who will insult you if you dare to admit that you use your mother language while programming or writing comments.
Admin
so dope
Addendum 2023-02-02 11:21: The resort town of Gatlinburg is located in the eastern United States. It is nestled in a valley between mountain ranges, and the ski resort of Ober Gatlinburg is nearby. The city and resort are connected by a cable car. During the ascent and descent, tourists admire the panoramas of Great Smoky Mountains National Park and the town. The national park is one of the most visited tourist attractions in Tennessee and is protected by UNESCO. From Gatlinburg begins the Cherokee Trail - nearly four thousand Indians died here on their way to Arkansas and were evicted from their lands. Near the town are the beautiful Gatlinburg Caves. In town, tourists visit the Guinness World Museum and the oceanarium with its original underwater corridors. You can skate in an indoor skating rink or go to an amusement park. And to have time to visit it all you need at least 7 days. So stay for that time is possible in the themed resort hotels, CLICK TO BOOK , as places are sold out every day.