Comment On Choose Your Own Include File

It seemed like a simple request. "Please add 'MAINT-CNTRL-ADMIN' to the cost center dropdown for client #876." It was also Scott A's very first assignment, having recently started as a web developer for the B2B merchandise reseller. [expand full text]
« PrevPage 1 | Page 2 | Page 3Next »

Re: Choose Your Own Include File

2008-11-24 09:06 • by 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!

Re: Choose Your Own Include File

2008-11-24 09:06 • by 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!

Re: Choose Your Own Include File

2008-11-24 09:07 • by 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.

Re: Choose Your Own Include File

2008-11-24 09:07 • by 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.

Re: Choose Your Own Include File

2008-11-24 09:07 • by DOA
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.

Re: Choose Your Own Include File

2008-11-24 09:10 • by apaq11 (unregistered)
Somehow with everything that was included I was still left out. It's like highschool all over again.

Re: Choose Your Own Include File

2008-11-24 09:18 • by Monkey (unregistered)
TRWTF is that the monkey is kicking the seeds out of the pickle with a wooden leg!

Re: Choose Your Own Include File

2008-11-24 09:23 • by LightStyx
230589 in reply to 230584
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!

Re: Choose Your Own Include File

2008-11-24 09:25 • by 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.

Re: Choose Your Own Include File

2008-11-24 09:29 • by dkf
230592 in reply to 230590
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!

Re: Choose Your Own Include File

2008-11-24 09:31 • by Yaos
Every letter should be it's own file, this is the acme of code portability.

Re: Choose Your Own Include File

2008-11-24 09:32 • by Schmitter (unregistered)
for that much code, a picture taken on a wooden table would be more efficient.

Re: Choose Your Own Include File

2008-11-24 09:35 • by DaveAronson
230595 in reply to 230593
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.

Re: Choose Your Own Include File

2008-11-24 09:35 • by campkev
230596 in reply to 230583
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].

Re: Choose Your Own Include File

2008-11-24 09:36 • by campkev
230597 in reply to 230595
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

Re: Choose Your Own Include File

2008-11-24 09:37 • by Gieron

layout.display29-1.inc.asp

Is this file really necessary?

Re: Choose Your Own Include File

2008-11-24 09:41 • by rohypnol
WTF were you thinking when you posted that? Some of us TDWTF readers have heart issues.

Re: Choose Your Own Include File

2008-11-24 09:43 • by 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...

Re: Choose Your Own Include File

2008-11-24 09:47 • by Horamash (unregistered)
230601 in reply to 230599
rohypnol:
WTF were you thinking when you posted that? Some of us TDWTF readers have heart issues.


We have a heart? O.o

Re: Choose Your Own Include File

2008-11-24 09:50 • by tekiegreg (unregistered)
230602 in reply to 230583
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.

Re: Choose Your Own Include File

2008-11-24 09:53 • by Kozz (unregistered)
230605 in reply to 230593
Yaos, you forgot to use your "TopCod3r" account. ;)

Re: Choose Your Own Include File

2008-11-24 09:54 • by ayla
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.

Re: Choose Your Own Include File

2008-11-24 09:55 • by 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!

Re: Choose Your Own Include File

2008-11-24 09:55 • by Lothar (unregistered)
230609 in reply to 230596
ASP.NET?

Re: Choose Your Own Include File

2008-11-24 09:56 • by Lothar (unregistered)
230610 in reply to 230596
.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?

Re: Choose Your Own Include File

2008-11-24 10:02 • by xtremezone
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.

Re: Choose Your Own Include File

2008-11-24 10:05 • by bitblit
Last include must've been lost in transmission. Please add to the bottom of the listing...

FileNotFound.obj.inc.asp

Re: Choose Your Own Include File

2008-11-24 10:09 • by 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."

Re: Choose Your Own Include File

2008-11-24 10:22 • by 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.

Re: Choose Your Own Include File

2008-11-24 10:25 • by 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

Re: Choose Your Own Include File

2008-11-24 10:33 • by memals (unregistered)
WOW! now thats MODULAR !

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

Re: Choose Your Own Include File

2008-11-24 10:33 • by Addison (unregistered)
230618 in reply to 230616
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.

Re: Choose Your Own Include File

2008-11-24 10:35 • by 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....

Re: Choose Your Own Include File

2008-11-24 10:35 • by Jorrit (unregistered)
At least he knows the concept of modular programming :p

Re: Choose Your Own Include File

2008-11-24 10:36 • by 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...

Re: Choose Your Own Include File

2008-11-24 10:37 • by 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.

Re: Choose Your Own Include File

2008-11-24 10:38 • by Sunday Ironfoot (unregistered)
This looks like someone attempting OO programming (or at least code reuse) in ASP classic (not ASP.NET)...badly.

Re: Choose Your Own Include File

2008-11-24 10:39 • by VrIgHtEr (unregistered)
! ! !

Guess my IP will be banned now...

Re: Choose Your Own Include File

2008-11-24 10:48 • by Charlie (unregistered)
Wow?!

It's like the ship from Spaceballs!

Re: Choose Your Own Include File

2008-11-24 10:51 • by 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.

Re: Choose Your Own Include File

2008-11-24 10:52 • by 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

Re: Choose Your Own Include File

2008-11-24 10:54 • by Vic Tim (unregistered)
230630 in reply to 230623
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?

Re: Choose Your Own Include File

2008-11-24 10:56 • by EatenByAGrue (unregistered)
230631 in reply to 230628
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.

Re: Choose Your Own Include File

2008-11-24 10:59 • by 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.

Re: Choose Your Own Include File

2008-11-24 11:02 • by bobzilla
230633 in reply to 230589
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'. :-)

Re: Choose Your Own Include File

2008-11-24 11:04 • by McBain (unregistered)
Ze goggles! Zey do nothing! AAAAAGGGHHHH!!!!

Re: Choose Your Own Include File

2008-11-24 11:16 • by Jo Bob (unregistered)
230636 in reply to 230633
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?

Re: Choose Your Own Include File

2008-11-24 11:17 • by 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!

Re: Choose Your Own Include File

2008-11-24 11:17 • by 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.

Re: Choose Your Own Include File

2008-11-24 11:25 • by halcyon1234
230640 in reply to 230617
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!
« PrevPage 1 | Page 2 | Page 3Next »

Add Comment