• Taran Alvein (unregistered) in reply to Addison
    Addison:
    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.

    You seem to like to punch things, Addison. Are you secretly... CAPTAIN FALCON?!

  • pedant (unregistered) in reply to Jo Bob
    Jo Bob:
    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 consonants their rightful place in Acronyms?

    FTFY

  • ShatteredArm (unregistered) in reply to Jo Bob
    Jo Bob:
    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?

    I'd point out that it's "consonants", but I wouldn't want Murphry's Law to come into effect.

  • (cs)

    It's a fractal. The deeper you examine it the more it looks like infinite recursion.

    Simply tell the client 'MAINT-CNTRL-ADMIN' is not an option for their cost center.

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

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

    There's 3 though

  • jim (unregistered) in reply to ShatteredArm

    [quote user="ShatteredArm]I'd point out that it's "consonants", but I wouldn't want Murphry's Law to come into effect.[/quote]

    Shouldn't that be "Muphry's Law"? LOL

  • Vic Tim (unregistered) in reply to Jo Bob
    Jo Bob:
    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?

    I know this site is all about the code, but it's not constants. It's definitely consonants.

  • MR (unregistered)

    I was kind of hoping that the developer was trying to make ASP a little more object oriented (or something) the same way you might fake it in JavaScript.

    But after reading through some of the file names...probably not...

  • Vic Tim (unregistered)

    wow, i'm slower than evar. Maybe I included to many. Poopy time.

  • dolor (unregistered)

    That's a typical ASP design pattern. So where's the WTF!?

  • Ape Monkey (unregistered) in reply to Trevor D'Arcy-Evans

    I once served as a Delphi-User, in a truly legacy CRM Software (it was so legacy probably because my ex-boss never learned anything else than Delphi, and never something about OOP; it goes so far that I told hime the difference between iterative and recursive, blah...), where there were pages over pages of "uses" statements, all thanks to the magic of RAD.

    ...

    Ummm, ..., you wrote nested functions 7 levels deep?! SEVEN?? And I though I had a nasty time. 7, naynay....

  • (cs) in reply to HypocriteWorld
    HypocriteWorld:
    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!

    It's brilliant! He's reusing comments. Personally, I've opted for a comment class with setters and getters for each comment.

    Eg.

    comment = new comment; comment->set(1, "bubble sort the 120,000 rows from the database"); comment->get(1);

    Then when I bubble sort the same data later on in the code I can just call comment->get(1); to re-use the same comment. See how efficient that is?

  • (cs) in reply to Jo Bob
    Jo Bob:
    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?

    Hey! Consonants have their rightful place in 4-letter TLAs, too!
  • zaphod (unregistered)

    The file catalog.display.productlist1.inc.asp is missing.

    There's your problem.

  • (cs) in reply to Addison
    Addison:
    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.

    Anger management, anyone?

  • Buddy (unregistered)

    Once had to do an on-line survey for a large client. The major distinctions - irregular hierarchy, temporal dependencies, major and minor differences by division and geography, bilingual with unilingual subversions, regular and short versions, extremely complex branching, and added to that, five separate contests. All of this unified into a single equally complex real time on-line reporting interface.

    All of this layered organically onto an initial project of much simpler scope. The client blew through years of change requests in months. Did we ever say "No" to the client? Not once. We were whores, they knew it, and we knew it.

    The resulting beast was a masterpiece, akin to one of Hieronymus Bosch works, beautiful as a whole, but grotesque in its details. To maintain it was to slowly feel your soul, sanity and sentience ebb away as you became one with the Evil.

    So many after me have cursed me and my creation, that surely in my Hell awaits the Beast and its faithful minions -- the client and the ever present never ending change order queue.

  • Addison (unregistered) in reply to cparker
    cparker:
    Addison:
    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.

    Anger management, anyone?

    I considered what it looked like before I posted. But the comedy seemed at the right balance to risk being viewed as some kind of alcoholic wife-beater.

  • Jo Bob (unregistered) in reply to ShatteredArm
    ShatteredArm:
    Jo Bob:

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

    I'd point out that it's "consonants", but I wouldn't want Murphry's Law to come into effect.

    That's what I get for trusting a random Google page. :)

    And I won't bother mentioning that it's Muphry's Law. (Wiki)

  • WinformsC#SQLDevGirl (unregistered) in reply to Steenbergh

    oh i am SO there. I freaked at my last place when I came up against this sort of thing.

    I managed to write quite nice, easily traceable ASP (even though it's never been my primary skillset). You know, using functions and stuff and using VB rather than HTML for the heavy lifting.

    The German sysadmin (utterly NOT a programmer at all let alone a web programmer) guy a few jobs back wrote better ASP than that heart-attack WTF.

    (OK so it was one huge monolithic 133 page, and the variable names were all in German - but it was easy enough to modualarise into functions - with the aid of a web translator page...)

    I DETEST things that work by 'include' type mechanisms (MSBuild, anyone...?).

  • ciph3r (unregistered)

    O hai, Im in ur includes, destroyin ur layerz

  • ShatteredArm (unregistered) in reply to jim

    [quote user="jim"][quote user="ShatteredArm]I'd point out that it's "consonants", but I wouldn't want Murphry's Law to come into effect.[/quote]

    Shouldn't that be "Muphry's Law"? LOL[/quote]

    Muphry's Law came into effect.

  • Jay (unregistered) in reply to tekiegreg
    tekiegreg:
    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.

    A wise man once said, "A determined developer can write a FORTRAN program in any language."

    Substitute ASP, Javascript, whatever language you hate for "FORTRAN", and the statement remains true.

  • Bernie (unregistered)

    Here at the ASP headquarters at SNL, we make include files. We will work with you to make as many include files that you want.

    If you come to us with one 1000-line file, we can break it into a thousand 1-line include files, if you want. Or we can make ten 100-line include files. Or one 500-line include file, twenty 10-line include files, and one hundred 3-line include files. We will make the include files that you need.

    How do we make money? We do one thing and we do it well. Our advanced algorithms can break one 5-line file into five million 42-line include files. We are that good.

  • (cs) in reply to pedant
    pedant:
    Jo Bob:
    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 consonants their rightful place in Acronyms?

    FTFY

    I would actually say the PC term is...

    African American Copulation Prestidigitation (AACP)

    Therefore the NAACP would be the National African American Copulation Prestidigitaors

    Illusion Intercourse is what we call porn... ... sorry pr0n

  • (cs) in reply to Bernie
    Bernie:
    Here at the ASP headquarters at SNL, we make include files.

    Live from the ASP Headquarters in New York... it's SATURDAY NIGHT LIVE!

  • Chiper (unregistered)

    I bet if you did a trace on any CakePHP project you'd find the same. There's two dozen includes on every request just to load the framework.

    God I hate CakePHP.

  • (cs) in reply to Chiper
    Chiper:
    I bet if you did a trace on any CakePHP project you'd find the same. There's two dozen includes on every request just to load the framework.

    God I hate CakePHP.

    It's because the Cake is a lie

  • Occasional ASP debugger (unregistered)

    There is a better way to find out all the include files in an asp page. (learned this from page 1053 of Professional Active Server Pages 3.0 published by Wrox circa 1999).

    Copy an .asp page to a name with a .stm extension and issue a request for it from your browser. The Server Side Include processing will bring in all of the #include files, but the scripting engine will not be invoked to process the script. Instead, the code will be returned to the browser for viewing. What you will be viewing is the script plus all the included script exactly as it would be given to the script engine for processing.

    Obviously don't do this on a production server, and delete the .stm file as soon as your done.

    Having inherited some classic asp written by a madman this has been invaluable for figuring out where everything is.

  • Anonymous Coward (unregistered)

    Well this isn't fair. First it's ONLY 280 lines, second, if you ignore the redundant includes, that brings it down to a mere 195!

    The original developer should be commended for writing granular modules. If probably gave him a much better defined architecture and far fewer conflicts in revision control

  • (cs) in reply to cparker
    cparker:
    Addison:
    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.

    Anger management, anyone?

    Anger management makes me want to punch a hole through a baby!
  • NH (unregistered) in reply to LightStyx
    LightStyx:
    //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!

    Use of ASP, JSP, PHP and all those languages that produces an intermix of HTML, code, JavaScript, CSS and possibly even more obnoxious features should be penalized by required rewrite of everything in assembly using only a book and a hex editor.

    It's really not the easiest thing to track such code, even if you wrote it yourself. It also results in non-compliant code, which means that it may behave different in different browsers.

    The only remedy is to actually analyze the functionality of the system and then rewrite it without delving too deep into the existing code.

  • Jim (unregistered) in reply to Occasional ASP debugger

    And for the version 1.0 just add a $ at the end of the url

    mypage.asp$

    And you dump all the code from any pages. Of course there shouldn't be a lot of server running this version out there :)

  • (cs) in reply to DaveK
    DaveK:
    cparker:
    Addison:
    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.

    Anger management, anyone?

    Anger management makes me want to punch a hole through a baby!
    With BRAWNDO you'll be able to punch holes in TEN THOUSAND BABIES!
  • Vic Tim (unregistered) in reply to DaveK
    DaveK:
    cparker:
    Addison:
    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.

    Anger management, anyone?

    Anger management makes me want to punch a hole through a baby!

    That's because you used Microsoft ActivePsych. Use OpenPsych and things will go a lot smoother.

  • offended (unregistered) 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!

    Can I get an apology from the commenter? In this day and time, you don't sit around a message board, where you have diversity, and refer to black f-ing magic.

    http://www.youtube.com/watch?v=20a-exAW6qc

  • Edward Royce (unregistered)

    Hmmmm.

    I've had to do the same thing many times in my career just to figure out the relationships between programs, include files and whatnot.

    The worst was a COBOL based application that had 600+ separate program files averaging about 5,000+ lines each. And all involved in a crazy incestuous relationship where programs would chain to various labels (execution points) in other programs. So a single program could execute and complete an action by itself, chain to another program or be chained to by another program ... or all three in succession and in any order imaginable.

    Code reuse is nice but for God's sake! I wanted to strangle the bastard that wrote that.

  • Edward Royce (unregistered) in reply to apaq11
    apaq11:
    Somehow with everything that was included I was still left out. It's like highschool all over again.

    Ok.

    Red rover, red rover send apac11 over!

    Feel better? :)

  • Edward Royce (unregistered) in reply to Addison
    Addison:
    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.

    Actually trying to use a Find/Grep isn't necessarily going to work. If you're trying to figure out where a particular object is being used or which function is being called it's entirely possible that variations of the same functions and with the same name will be littered throughout the application in multiple source files.

    You could be looking for "TrapXYZ()" only to find out that instead of referencing one function definition the silly bugger copy & pasted the same code 500+ times.

    There are no shortcuts when trying to unravel a crappy design and implementation. It's when you think you've got a shortcut that you find out later on that you were wrong.

  • Edward Royce (unregistered) in reply to LightStyx
    LightStyx:
    Chiper:
    I bet if you did a trace on any CakePHP project you'd find the same. There's two dozen includes on every request just to load the framework.

    God I hate CakePHP.

    It's because the Cake is a lie

    There is no cake?

  • Scott (unregistered) in reply to Vic Tim

    Yes, the Scott that posted this article.

    Update: I am fine (after a few months in a mental institution). Actually, about 2 months after working with this code I told the President of the company that it was a steaming pile and that it needed to be re-written. It took all of 6 seconds of him looking at this include tree to give me to go ahead. 6 months later I have 95% of the code re-written in ASP.net, and this time I only used 200 include files. :-)

    Oh yeah, and the reason for the display20-1.inc and display22-1.inc... was that each customer that wanted the catalog to look different got their own special include file added to the mix. Thank GOD this company only had 30 or so active clients when I started.

  • Maximus (unregistered)

    Wow. I don't know anything about asp but I'm pretty sure that ANY page that even references that many files cannot be a good thing!

  • Alex (unregistered)

    What 2 say?

    ...

  • grep_monkey (unregistered)

    He could have called grep on that file list and easily found what he was looking for...

    But I guess he'll just have to open EACH ONE INDIVIDUALLY and search, because, you know, that's the Microsoft Way(TM).

  • Vic Tim (unregistered) in reply to Scott
    Scott:
    Yes, the Scott that posted this article.

    Update: I am fine (after a few months in a mental institution). Actually, about 2 months after working with this code I told the President of the company that it was a steaming pile and that it needed to be re-written. It took all of 6 seconds of him looking at this include tree to give me to go ahead. 6 months later I have 95% of the code re-written in ASP.net, and this time I only used 200 include files. :-)

    Oh yeah, and the reason for the display20-1.inc and display22-1.inc... was that each customer that wanted the catalog to look different got their own special include file added to the mix. Thank GOD this company only had 30 or so active clients when I started.

    Woohoo, closure!

  • Konrad (unregistered)

    What makes this even worse (if it was ASP) is that ASP does not support conditional inclusion. ie

    all include files (even thouse inside if statments are always included. every time the page is veiwed the server has to parse every single file.

  • (cs) in reply to WinformsC#SQLDevGirl
    WinformsC#SQLDevGirl:
    I DETEST things that work by 'include' type mechanisms (MSBuild, anyone...?).

    I don't know, it's pretty nice for including a common side banner on each page. But then that's possibly one of the include directive's intended uses.

  • (cs) 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

    Personally I would have used Kerrigan's mottosearch . But I'm not sure how grep would have found CostCenter in the name of a file. Are you piping ls into grep?
  • Dave (unregistered)

    grep -r

    done.

  • /Arthur (unregistered)

    I'm pretty sure if you look into the files you will find a lot of hardcode in the files

  • (cs) in reply to campkev
    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].
    \[lisp, or derivative thereof\].

    Or, maybe Z80 (memory is such a limitation).

    Or common sense.

    I'm going to write a parser for that some day, but nobody seems to agree on the lexical tokens.

Leave a comment on “Choose Your Own Include File”

Log In or post as a guest

Replying to comment #:

« Return to Article