• Slava (unregistered)

    Ugh, WTF!

  • df (unregistered)

    Before anyone asks, the WTF here is the comments. I mean, they are useless, almost like they are in some foreign language or something.

  • Dave Mays (unregistered)

    ARGH! My other eye!!

  • necroyeti (unregistered)

    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?

  • cm (unregistered)

    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.

  • Adam G (unregistered)

    Once again:

    SWEET JESUS!

  • Nikolay Simeonov (unregistered)

    > 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.

  • Lore Weaver (unregistered)

    Owwww my back up brain.

  • Stefan Vetsch (unregistered)

    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.

  • George Prado (unregistered)

    wow...
    Me![WTF].Visible = True

  • Stan Rogers (unregistered)

    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!

  • Hassan Voyeau (unregistered)

    Sounds like time to build a new app or buy one [http://www.imagichotelreservation.com/] - $200

  • daxxar (unregistered)

    --- 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.

  • Thinker (unregistered)

    This "system" of naming forms reminds me of programming a SAP R/3-System...

  • Rich (unregistered)

    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.

  • Shane (unregistered)

    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!!!

  • necroyeti (unregistered)

    > It's definitely real code.

    Holy **** !!! Nikolay, you really have my sympathy.

  • necroyti (unregistered)

    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!

  • black (unregistered)

    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.

  • Guayo (unregistered)

    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 ;)

  • Prakash (unregistered)

    Moral of the story:
    Germans are bad programmer.

  • Stefan Vetsch (unregistered)

    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*.

  • Rob (unregistered)

    @Thinker.

    SAP R/3 is a WTF all on its own!

  • Eric Newton (unregistered)

    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?

  • Spidey (unregistered)

    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 tw
    t in the world?

  • Jeff (unregistered)

    > "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!

  • tinoh (unregistered)

    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.

  • Spidey (unregistered)

    > so it's complicated - maybe it has to be.

    Complicated and comprehensible aren't mutually exclusive, you know.

  • Cliff (unregistered)

    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!

  • Guayo (unregistered)

    @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 tw
    t in the world?... Now you hurt my feelings... :)

  • Jeff S (unregistered)

    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?

  • Jeff S (unregistered)

    spidey -- sorry, just realized I said basically the same thing as you !

  • smartypants (unregistered)

    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...

  • Mike (unregistered)

    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.

  • Jeff S (unregistered)

    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.

  • Mike (unregistered)

    Dude, that's harsh man. How did you know about my lack of a degree? Is it that obvious?

  • JDog (unregistered)

    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!!

  • Mike (unregistered)

    That was a shot at us non-degreed programmers, wasn't it JDog?

  • Alex B. (unregistered)

    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? :)

  • Jeff S (unregistered)

    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.

  • guenter (unregistered)

    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

  • Mischa Kroon (unregistered)

    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.

  • (unregistered) in reply to Guayo

    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}

Leave a comment on “The Hotel (reservation system) From Hell, Continued”

Log In or post as a guest

Replying to comment #:

« Return to Article