• (cs)

    include comment.inc.asp

    -- in comment.inc.asp -- include comment2.inc.asp

    -- in comment2.inc.asp -- include comment3.inc.asp

    -- in comment3.inc.asp -- WTF!

  • (cs)

    //first... edit... second =\

    ASP should die... well at least the old version of ASP, I'm having to go through one of our applications made by entirely ONE person 8 years ago and there's so much inline SQL and VB.... it's not even funny. BAD CONSULTANT! BAD BAD CONSULTANT! Overpaid and lazy!

  • Chrisos (unregistered)

    Seems OK to me, why code, when you can have one or two includes in the code and everything is magically just there!

    Clearly, if you can't undestand the magic and/or maintain massive trees of information in your head, you should get out of the kitchen... or something.

  • aehiilrs (unregistered)

    Yikes. Not much different than a lot of the classic ASP I've had to maintain, though.

    Something I don't miss is the fake XMLHTTPRequest created by iframes.

  • (cs)

    I was just about to suggest he writes a script to display all the included code on one page. Then I scrolled down.

    Now I think he should simply search the code for that particular select by name. Then he should search a job offer list.

  • apaq11 (unregistered)

    Somehow with everything that was included I was still left out. It's like highschool all over again.

  • Monkey (unregistered)

    TRWTF is that the monkey is kicking the seeds out of the pickle with a wooden leg!

  • (cs) in reply to Chrisos
    Chrisos:
    Seems OK to me, why code, when you can have one or two includes in the code and everything is magically just there!

    Clearly, if you can't undestand the magic and/or maintain massive trees of information in your head, you should get out of the kitchen... or something.

    It's all BFM - Black F***king Magic!

  • crxs (unregistered)

    Nice progressive disclosure there. First page: Well, that still could make sense. Page down: Ok, that's a bit excessive. Page down: I see why someone would consider it a WTF. Page down: Still going on? Page down: OMG. Page down: WTF.

  • (cs) in reply to crxs
    crxs:
    Nice progressive disclosure there. First page: Well, that still could make sense. Page down: Ok, that's a bit excessive. Page down: I see why someone would consider it a WTF. Page down: Still going on? Page down: OMG. Page down: WTF.
    We need a UML tool just to visualize the include graph!
  • (cs)

    Every letter should be it's own file, this is the acme of code portability.

  • Schmitter (unregistered)

    for that much code, a picture taken on a wooden table would be more efficient.

  • (cs) in reply to Yaos
    Yaos:
    Every letter should be it's own file, this is the acme of code portability.
    As in, Wile E. Coyote would buy such a system from ACME.
  • (cs) in reply to LightStyx

    yes, this is obviously all ASP's fault. There's no way someone could write something this f'ed up in [insert language of choice].

  • (cs) in reply to DaveAronson
    DaveAronson:
    Yaos:
    Every letter should be it's own file, this is the acme of code portability.
    As in, only Wile E. Coyote would buy such a system from ACME.
    FTFY
  • (cs)

    layout.display29-1.inc.asp

    Is this file really necessary?

  • (cs)

    WTF were you thinking when you posted that? Some of us TDWTF readers have heart issues.

  • blub (unregistered)

    I guess the consultant had to do this, because otherwise the script would have reached the max file size limit of the filesystem...

  • Horamash (unregistered) in reply to rohypnol
    rohypnol:
    WTF were you thinking when you posted that? Some of us TDWTF readers have heart issues.

    We have a heart? O.o

  • tekiegreg (unregistered) in reply to LightStyx

    Once again,it's not the language it's the developer...I can think of some lousy ways to code just about any language you wish.

  • Kozz (unregistered) in reply to Yaos

    Yaos, you forgot to use your "TopCod3r" account. ;)

  • (cs)

    I worked on something similar (but not quite this bad) before. The big difference was that was an embedded video lottery terminal!

    No web app should be this complicated!!!! I work on ASP.NET web apps now. I am happy to say they don't have anything like this monstrosity. :D I would have to start looking for a new job immediately if the web app I was maintaining/updating had a structure like this.

  • Seb (unregistered)

    "I can think of some lousy ways to code just about any language you wish. "

    Ooooh, I think you just got yourself a job!

  • Lothar (unregistered) in reply to campkev

    ASP.NET?

  • Lothar (unregistered) in reply to campkev

    .oO(wrong reply-button)

    campkev:
    yes, this is obviously all ASP's fault. There's no way someone could write something this f'ed up in [insert language of choice].

    ASP.NET?

  • (cs)

    I wonder if files were being included with the...

    <!-- #include file="path/to/file" -->
    ...server mechanism or with a dynamic mechanism written in an ASP-supported language:
    <!-- #include file="path/to/dynamic/include" -->
    <%
        Include("path/to/file")
    %>
    The former is easier to debug, but considerably more difficult to maintain, IMO.
  • (cs)

    Last include must've been lost in transmission. Please add to the bottom of the listing...

    FileNotFound.obj.inc.asp

  • Anonymously Yours (unregistered)

    This kind of reminds me of that scene in Event Horizon where Dr. Weir looks at the captain with empty sockets and says, "Where we're going you won't need eyes to see."

  • PseudoBovine (unregistered)

    TRWTF is having catalog.display1.product.inc.asp through catalog.display6.product.inc.asp PLUS catalog.display19.product.inc.asp.

    Having 7-18 too would be overkill.

  • Richard (unregistered)

    And he couldn't find order.display.2.CostCenter.inc.asp through a file search why? Not saying that its the culprit, but its a pretty good place to start looking...

    Sigh. Those who do not understand the power of a find/grep, and all that

  • memals (unregistered)

    WOW! now thats MODULAR !

    WARNING! 2 exclamation points detected in post, one more that your IP is [banned]

  • Addison (unregistered) in reply to Richard
    Richard:
    And he couldn't find order.display.2.CostCenter.inc.asp through a file search why? Not saying that its the culprit, but its a pretty good place to start looking...

    Sigh. Those who do not understand the power of a find/grep, and all that

    It's not about being able to use the find functionality of your development environment. It's about having to jump around 100 times in order to get anything done. And while a find makes that simpler it certainly doesn't make it bearable. Trust me, after using find for an hour solid you pretty much want to punch a hole through your monitor.

    And who the HELL thinks it necessary to have that many includes? Seriously. Makes me want to punch a baby.

  • starlite (unregistered)

    this kind of stuff looks an awfull lot like MFG/PRO, a progress based manufacturing software suite.

    In one of my debugging sessions, I made a similar script. it traced all includes recursively and wrote them to a file. I even made it so that it would only trace into each include only once.

    The result of a simple screen: 90KB of output... The result when it traced into all files each time: I cancelled the program after the output reached over 5 megs...

    The worst part: I still use the tool daily, because they are too cheap to buy a debugger license....

  • Jorrit (unregistered)

    At least he knows the concept of modular programming :p

  • Steenbergh (unregistered)

    And the most sorry thing is, my current assignment isn't all that different than this code snippet.

    I come from ASP.NET, backed by VB. Always write code with Option Strict ON explicitly defined at the top of my files.

    But in this classic ASP app you can see includes working on variables defined in the main page, calling functions from even other includes, who do exactly the same.

    Makes debugging a p@in in the @ss...

  • St Mary's Hospital for the Uncurable Damned (unregistered)

    Alex:

    Next time you post some insane ludicrous code (or for that matter, a Choose your own Include File story), please tell us what happened to the poor IT guy.

    After reading the whole opus and finding no conclusion, I assume he passed away while waiting for the Choose your own Include File story to end.

  • Sunday Ironfoot (unregistered)

    This looks like someone attempting OO programming (or at least code reuse) in ASP classic (not ASP.NET)...badly.

  • VrIgHtEr (unregistered)

    ! ! !

    Guess my IP will be banned now...

  • Charlie (unregistered)

    Wow?!

    It's like the ship from Spaceballs!

  • (cs)
    The ecommerce application he was hired to maintain was ASP-based and had been developed over the course of several years by an outside consultant.

    If you ever hear that an application is A) Based on Classic ASP, and B) Been developed over the course of several years (bonus for being by an "outside consultant") then RUN AWAY SCREAMING. It's NEVER worth the hassle of dealing with a monolithic swamp of spaghetti code.

  • Mateo_LeFou (unregistered)

    This is great coding practice, as it prevents any of your code files from being too long .. like, say, more than three lines

  • Vic Tim (unregistered) in reply to St Mary's Hospital for the Uncurable Damned
    St Mary's Hospital for the Uncurable Damned:
    Alex:

    Next time you post some insane ludicrous code (or for that matter, a Choose your own Include File story), please tell us what happened to the poor IT guy.

    After reading the whole opus and finding no conclusion, I assume he passed away while waiting for the Choose your own Include File story to end.

    Yeah, where's the unhappy ending? Are you just gonna show me a severed head and roll the credits, or is the killer gonna get killed by the retired alcoholic cop?

  • EatenByAGrue (unregistered) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    The ecommerce application he was hired to maintain was ASP-based and had been developed over the course of several years by an outside consultant.

    If you ever hear that an application is A) Based on Classic ASP, and B) Been developed over the course of several years (bonus for being by an "outside consultant") then RUN AWAY SCREAMING. It's NEVER worth the hassle of dealing with a monolithic swamp of spaghetti code.

    It is if you're young and desperately need the money / experience.

    Not that I ever stooped to that level. PHP is as low as I've gone.

  • Vic Tim (unregistered)

    The only webapp I ever "made" was made of a few CGI scripts... written in bash. It barely worked, but at least a child could have understood it enough to fix it after about 5 minutes... after seeing this, I don't feel so weak.

  • (cs) in reply to LightStyx
    LightStyx:
    Chrisos:
    Seems OK to me, why code, when you can have one or two includes in the code and everything is magically just there!

    Clearly, if you can't undestand the magic and/or maintain massive trees of information in your head, you should get out of the kitchen... or something.

    It's all BFM - Black F***king Magic!

    I think the Politically Correct term is 'African American Intercourse Illusion'. :-)

  • McBain (unregistered)

    Ze goggles! Zey do nothing! AAAAAGGGHHHH!!!!

  • Jo Bob (unregistered) in reply to bobzilla
    bobzilla:
    LightStyx:

    It's all BFM - Black F***king Magic!

    I think the Politically Correct term is 'African American Intercourse Illusion'. :-)

    AAII?!?! What are you a Vowel elitist? Why do you want to deny Constants their rightful place in Acronyms?

  • JarFil (unregistered)

    Let me guess...

    Just copy the tree, overwrite whatever customized files there need be, and there ya go: per-customer version support, with no need for some fancy shmancy source control!

  • Trevor D'Arcy-Evans (unregistered)

    I once had to maintain a similar WTF in Turbo Pascal. It heavily used the nasty construct of nested functions - seven levels deep! Add duplicate variable names into the mix, all with different scope, and it was a case of fix one thing, break two others.

  • (cs) in reply to memals
    memals:
    WOW! now thats MODULAR !

    WARNING! 2 exclamation points detected in post, one more that your IP is [banned]

    What is that about! That's silly!

Leave a comment on “Choose Your Own Include File”

Log In or post as a guest

Replying to comment #:

« Return to Article