- 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
Thanks you very much Mr. Ymous for your gracious wishes. The reason for schedule slippage is because we outsourced some of the project to Melanesia. Unfortunately, the code was very crudely designed. You would think it the coders were part caveman or something.
Admin
If you really want to bake your noodle, write your ASP pages in JScript. Take your pick of writing the client-side code in VBScript or outputting javascript snippets via JScript. And the true hallucinogenic fun is to be had accessing VBScript collections via JScript.
Of course you did, while I was writing my bad script tags.Admin
VBScript? Bah. Real men used javascript for their server side ASP code...
Admin
Officially, we have a new month: Dummy. It's three-letter shortcut is, well, "Dummy".
Admin
I'll get you those codes as soon as I finish my java VB interpreter. I'm pretty close - it should only take me another 3 months plus 6 months of testing (though at this point I think I'll just scrap the testing and call it good when it works).
Admin
Aye!
Admin
Simpsons already did it.
validus comment.
Admin
Admin
TRWTF is that
can be replaced by using the built-inCaptcha: facilisis - The easiest captcha around.
Admin
Wow... Yet another behemothic CodeSOD... I love this site.
Admin
I don't see the problem. It's a perfectly crommulent word.
Admin
Admin
I agree with whatever the next person just posted below.
Admin
I agree with you...
Admin
That pop you just heard was the universe starting to emplode in on itself.
Admin
beware of black holes
Admin
Hey! I resent that! You can't call me a... Oh wait, you said BLACK hole... Never mind, carry on.
Admin
At least it would be easy to move the code into a actual .js file-- just run the ASP script and save the output.
Admin
Admin
Admin
Admin
Admin
Admin
HEY! I resemble that remark!
Admin
Actually an CTC (closed timelike curve) dont cause the blow of universe.
Admin
Having spent a year (give or take) maintaining a rather large application written entirely in ASP/VBScript I can say with absolute confidence that there's nothing good, decent, or simple about VBScript. An ASP/VBScript application can't even handle basic features without installing COM objects on the server and invoking them with Server.CreateObject("COM.Name"). VBScript still gives me nightmares. That same application still exists and is still thousands of ASP/VBScript files and even after all of the work that I did to clean it up it's still a mess.
For whoever asked, ASP/VBScript does not have an include mechanism and relies on the Web server's mindless <!-- #include file="" --> directive, which will happily include a file twice, etc. If you want an include mechanism (and you do) then you have to write one yourself by manually opening the file, parsing it if need be, either Eval or Execute'ing it, and then tracking which files have been included. Yes, performance will suffer compared to the real thing, but not as much as the code quality suffers without a sensible include mechanism.
TRTRWTF is that Fog Creek Software (of Joel Spolsky fame) developed a VBScript compiler and extended it with advantaged features (instead of porting to .NET). :-X
Admin
According to theory, yes, but I collapsed the universe just next month, and came back to tell you that indeed, it does cause the universe to pull it's lower lip over it's head and swallow...
Admin
Apps notation (what a variable is used for) was the original.
Systems notation (how a variable is stored, which normally is important only when one first declares it) was the degenerate version.
Admin
It’s like a function inside a function within a taco inside a Taco Bell that's inside a KFC within a mall that's inside of your dream!
Admin
Admin
Darth to Luiz: Is that a universe in your pocket or are you just happy to se me?
Admin
Your wit is so sharp and acerbic that my eyes started watering halfway through reading your comment.
Please comment more often in the future.
Admin
This reminds me of a game I used to play. The developers did the game in their spare time. I often told them I could volunteer on it (mostly because the pace of development was very, very slow) and they always refused.
Turns out the whole thing is written using ASP. It has been that way for years, and continues to be maintained that way to this day. No wonder development is so slow, they must have to put up with a lot of the code you see in this article, but deny that it is bad at all.
The only people really playing it are the devs and friends of the devs. They have problems running it even when 30 people play at the same time, but they refuse to change from ASP.
Admin
Admin
NOT!
Admin
Admin
My god it's full of... CRAP. I've been remided of the reason we're putting the crappy ASP Classic mega-app to sleep.
It wasn't just bad ASP, it was clever ASP. Doing all kinds of clever things.
Like using Access as a database. Like separating code into a zillion small .asp files, because they load faster.
Not to mention that the code is so Chtulhu-esque that not only reading the code will make you insane, copying the root directory for the "code" will probably crash your PC for no apparent reason!
Admin
I was in a similar situation, however I was slightly (or a lot) luckier (if that's a comulant word). I had to upgrade a class ASP app to .Net, however I still needed to occasionally dig through the mounds of HTML/VBscript. It was like going into a haunted basement for something you desperately need, like water, and running the hell out of there once you got it and trying to forget about the whole thing afterwards...
Admin
Close, but not quite. Hungarian Notation is poor man's type checking.
For a language like C, you want it. This is because an assignment with mismatched types won't be caught by the compiler, but can be caught by the human if they check the Hungarian types.
For a language like C++ or Java, you don't want it. This is because the compiler will catch the type mismatch. The Hungarian type is simply noise for the human to ignore. (This is also why Microsoft deprecated the use of Hungarian Notation in .NET)
For a language like JavaScript, it's a wash. JavaScript is a dynamic language, so this kind of type-munging is almost expected. Many types are constructed (composited) at run-time, not specified fully-formed in advance like in a static language. So this kind of "type marking" is less useful than one would expect. (This is also true of Lua, Groovy, and other dynamic languages.)
Admin
Dynamic languages are not broken. They don't need workarounds. In fact, trying to force idioms from static languages into dynamic languages is working against yourself. It creates more work for you as the primary author, and endless headaches for those who are tasked with maintaining your poor code. For reference, please read up dynamic language "protocols," and check out the article "Python is Not Java," as well as PEP 20.
Admin
Arrgh, forgot to hit "quote."
Dynamic languages are not broken. They don't need workarounds. In fact, trying to force idioms from static languages into dynamic languages is working against yourself. It creates more work for you as the primary author, and endless headaches for those who are tasked with maintaining your poor code. For reference, please read up dynamic language "protocols," and check out the article "Python is Not Java," as well as PEP 20.
Admin
dep·re·cate /ˈdɛprɪˌkeɪt/ Show Spelled[dep-ri-keyt] Show IPA –verb (used with object), -cat·ed, -cat·ing. 1.to express earnest disapproval of. 2.to urge reasons against; protest against (a scheme, purpose, etc.). 3.to depreciate; belittle. 4.Archaic . to pray for deliverance from.
deprecated stuff is (by definition) still included, just no longer considered the best way to skin a cat.
Unfortunately, because so many people are so many versions behind us cool cats with the latest versions of <insert compiler/language here>, deprecated functionality is kept for backward compatibility.
Admin
TRWTF is all the people beating on VB when today's abomination is written in something far worse, VBScript. Yes, they're related. But they're not the same.
Admin
This was obviously done for optimization to reduce the number of requests the browser needs to make.
Admin
Once during a discussion, people were talking about keeping "obsolete" methods in case anyone was using them. When asked what I thought, I suggested labeling such methods as "deprecated". Several people laughed, arguing that it means the same thing; apparently the notion that two words might have separate meanings escaped them.
Since then I've adopted an inhospitable facade, and others are slowly learning not to ask for my opinion on these things.
Admin
Well, that sure looks like a royal pain in the ASP.
braces self to be pelted with rotten tomatoes
Admin
Maybe, maybe not. Having everything in a cached external file reduces download time, but may actually increase page load time if you're running a bunch of initialisation code that's not being used. Embedding one or two functions per page may be more efficient than loading a hundred of them from a cache.
Admin
It seems easier to just give it a name that makes it obvious. If there's confusion about what the variable is, maybe the type checking isn't the problem?
I use Python for a lot of code at work and at home and I only had problems with dynamic typing for a couple weeks (until I realized I was doing it wrong). At this point, types either don't matter, or they're being forced into a specific type -- casting input when I get it, using properties on classes, and using function comments and casting in functions.
To a limited degree, Pylint will also help you find problems, like if a function doesn't exist. That sort of issue exists in all scripting languages though, and has nothing to do with dynamic typing.
Admin
Why stop there? How about we replace every single piece of business logic with SQL statements in the database. Then you'd never have to build and deploy again. Just update the database.
Admin