- 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
Better luck, and less wasted effort, next time. Assuming you're worth it. Plz Send meh teh evdienz.
Admin
Don't you know you should never look at 'files' at work. And stop calling me Shirley.
Admin
Correct me if I'm wrong (not an asp developer), but isn't the real WTF here going to be that you've got so much Disk I/O that under any reasonable load the application is going to crumble under the pressure?
Admin
IMO, seeing that many includes for ASP is rarer than PHP pages.
In an average size PHP project, it's not uncommon to see hundreds of .inc files... just that the nested level in this story is still uncommon.
Admin
sadly... My boss, who can code classic ASP but has never taken a actual programming class, has written sites like this. His solution to not knowing about fuctions is to use includes as fuctions. Also to create a new DB connecton for EACH query. and never close them. and recreate the connectionstring EACH time. we just ported to a new box...
pity me.
Admin
42
Admin
Admin
All of this reminds me of QUITE a bit of HTML email. I get a bunch of my email in text form (not displayed by the browser). Just to say a couple of words so much JUNK is added. If you want to see the verbiage that gets produced attempt to look at the "plain text" version of an email. It ends up being almost 100x of the "real text" that gets transmitted.
All in all HTML and by reference CSS should be banned for life, and a death penalty should be imposed for their use.
Bring back "plain text"!!
Admin
In soviet russia, Baby punches hole through you.
Admin
Probably not; IIS can cache all those files, so they only load once. It's still a maintenance headache.
Admin
I had forgotten about Progress, and you just brought back a lot of traumatic memories.
Like: inclusion is done with stupid { } syntax, an include can contain substitutions to be inserted into the file as it is included, the difference between &scoped-define and &global-define, ...
Come on, post some Progress WTFs, you must have hundreds if you work with MFG/PRO
Admin
Admin
This reminds me of when I did a recursive include in coldfusion to solve a website navigation problem..
Admin
Ignorance is bliss:
http://javascript.crockford.com/javascript.html
Is JavaScript object-oriented? It has objects which can contain data and methods that act upon that data. Objects can contain other objects. It does not have classes, but it does have constructors which do what classes do, including acting as containers for class variables and methods. It does not have class-oriented inheritance, but it does have prototype-oriented inheritance.
The two main ways of building up object systems are by inheritance (is-a) and by aggregation (has-a). JavaScript does both, but its dynamic nature allows it to excel at aggregation.
Some argue that JavaScript is not truly object oriented because it does not provide information hiding. That is, objects cannot have private variables and private methods: All members are public.
But it turns out that JavaScript objects can have private variables and private methods. (Click here now to find out how.) Of course, few understand this because JavaScript is the world's most misunderstood programming language.
Some argue that JavaScript is not truly object oriented because it does not provide inheritance. But it turns out that JavaScript supports not only classical inheritance, but other code reuse patterns as well.
Admin
Admin
Clearly the original developer thought includes worked in ASP just like they do in C++.
Admin
A guess now we know why things like this happen:
http://www.wtvh.com/home/related/34891569.html
Admin
/me wishes for the blackout panic sunglasses from HitchHiker's Guide to the Galaxy.
/me gouges eyes out as he transforms into a SteelDragon to fly away
Admin
Sorry, that is not funny, and a tasteless comment. Please leave this board and don't come back.
Admin
Admin
Best comment ever.
Admin
Admin
Admin
It must be the not so widespread "Include-file oriented programming".
Admin
Not an ASP problem. Our ASP site is all stored procedures. Whenever I'm reading a book on .Net where they show examples of doing a database call and they build up in-line sql I just shudder. Which is again, not a .Net problem, just a coding problem.
Admin
variables.code.lifesuck.inc.asp
Admin
And to think I scrolled through that quagmire only to find that there are no hilarious problem resolution antics.
Shame on you WTF (and you too Scott A)
Admin
What I find tasteless is people joking about punching babies. My comment was not meant to be funny.
Admin
Just to do the inconceivable and come up with an on-topic comment:
This sort of thing is why I usually use magic comment tags to document dependencies and include the entire list in the correct order in the main file. And yes, generating that list can be done automatically using a small shell script.
Ok, at about a page not that small, and it was awk, but hey. Yes, it accepted both magic tag comments and regular include statements. It also helps to regularly review the dependency requirements, but arguably that's part of code refactoring which should be an ongoing effort on large and/or old enough projects anyway.
Admin
or maybe his own "tree-generation" code was whacked? :p
Admin
Result (warning: 21997x2747 image)
WTFs visible from here:
Every file that includes catalog.display.product.files.inc.asp also includes catalog.display.productADD.inc.asp.
order.display.2.inc.asp and order23.display.2.inc.asp have a largely overlapping set of includes related to billing. Moving this list of includes into an order.display.billing.inc.asp or somesuch, and including that from both order.display.2.inc.asp and order23.display.2.inc.asp would simplify the include dag.
Similarly for Object2.0a.obj.inc.asp and Object2.1.obj.inc.asp including a bunch of Storage stuff.
Admin
In general, writing reusable web applications, where the same code base will be installed onto multiple sites, is difficult. Most developers are never involved in such development as the vast majority of web development is for a single installation or website. Doing this type of development in ASP Classic is even more difficult IMO because it requires even more discipline than ASP.NET to do it correctly as evidenced by the include hell in this WTF post.
Admin
Without seeing what is actually in the include files I can't be sure, but guessing from the naming convention used, the designer is overcoming the lack of MVP capability in Classic ASP by putting methods into these include files and then wrapping them with a class definition, thus:
Class PageView
<!-- #include="includefilename.asp" -->...ditto ad infinitum... End Class
The includes would have subs that managed the presentation only, with data supplied by a Data object passed via Session scope:
Sub DisplayPage() ...output html here... End Sub
Calling like this:
Dim pageView set pageView = new PageView() select case action case "DisplayPage" call pageView.DisplayPage() case "AnotherDisplayPage" call pageView.AnotherDisplayPage() case ... end select
Or maybe not.
Admin
3 months late with this.
NO! You will not get an apology because that whole situation is just stupid, silly, and just plain idiotic.
It's like saying I want the sound of a car horn to be changed because people refer to it as "HONK" which then in term means HONKY which further means all white people yell at others when they others are in their way.
Black magic is a term that is well over 600 years old and has absolutely NOTHING to do with color and on top of that. Stop with all of the PC bulls**** and spend some of your time doing something constructive. And further more I'm sick of people using the term "racist" which is a socially engineered term which clearly ignores the fact that WE'RE ALL THE SAME RACE!
Addendum (2009-03-30 12:31): That video still makes me LOL
Admin
Hey guys,
I wrote a PHP function wrapper library. It has every function of PHP in a single file so you can include a single function without overloading the server <- WTF???
Seriously... even a bad content management system doesn't have that much of includes.
Admin
Successful troll is successful