 |
Tags: programming work rant
Published : 1 year, 2 months ago (Fri, 02 Nov 2007 18:39:11 PDT) Searched: http://phreakhead.livejournal.com/64457.html 0 links Related posts
VBScript is a horrible, terrible, mud-stained language that couldn't save a variable if it's calculations depended on it (okay, it might be a little early for the puns. Sorry.) It's like Microsoft just went ahead and said, "You know what, let's just throw out anything that these 'computer science' people have learned designing languages for the past 40 years, and make up our own way to do it!" And then Bill Gates said, "YEAH!" and Steve Balmer jumped around screaming like a monkey, or whatever he usually does. Here's a list of the crap I have to deal with every day:
Zero vs. One Based Indexing
Many programs have been plauged by bugs and progammers plauged by confusion because the programmer confused his indices. Some languages start counting at 0, and some start counting at 1, so it can be trouble when a programmer used to language X figures his indexing will work in lanuage Y, when in fact they use different indexing schemes.
VBScript just goes out and makes the problem SO MUCH WORSE. VBScript - either because it's designers are sadists, crackheads, or just plain retarded apes - uses both zero and one based indexing, in the same language! WOW! Now I have to remember which does what and when - am I using an array? Zero-based. Am I using a string? One-based. Am I going to mix those up? YES. A LOT.
Including Files
The designers of the C Preprocessor, PHP, and numerous other languages realized that you may like to include files with common functions in other files. They also realized that you may include the same file in several different files, both of which you may end up including in the same file at some point. This is why we have things like #IFDEF in C, or include_once() in PHP.
Microsoft, however, saw no such need for such a frivolous feature. So what ends up happening is we have to remove all our helpful, bug-fighting variable declarations in all our files (say goodbye to "Option Explicit"), because VBScript will whine if the same variable is declared twice, which is exactly what happens when you have to include the same file twice!
No Pagination
MySQL has this amazing little keyword called LIMIT, where you can decide, instead of sending 400,000 records to the client each time, you only send a subset of that. Then if the client wants more, you can send it the next subset (or page, as it's called), so you only get a humanly-digestible amount of records at once. I mean, imagine if Google showed you ALL 10 BILLION MATCHES ON ONE PAGE. It would take forever to do a search; you'd type in "brittney spears nip slip" and have to come back next year to jack off to your results!
That's why Google uses open-source technology: because Microsoft has no concept of "pagination", or "efficiency" in general. Surely this is MS SQL's fault, so I can't directly blame it on VBScript, but those two things pretty much go hand-in-hand.
No Useful Functions, At All
Most languages now have some kind of library for basic data structures, like lists, dynamic arrays, etc, so highly-paid programmers don't have to waste their time re-implementing all the trivial things they learned in undergrad.
Unless, of course, you're a VB programmer. You don't get any of that stuff. You want to push something onto an array? TOO BAD! Write your own damn function! You want the 3rd character of some string? Here, use this ridiculously slow and inefficient string function! We wrote three different implementations of it, but it's all the same slow crap.
The thing that really gets me though is that this wouldn't be THAT bad because of the good old internet: if I have the need for this really simple function that SHOULD be included in the language, probably A MILLION other programmers have also needed that so they wrote a little something and maybe even felt nice enought to post it on their blog afterwards. The problem is that since Microsoft is all about money, the programmers who would be doing this are not as big on sharing as the FLOSS programmers, but when you get lucky and they do share, it's some horribly-implemented, most bass-ackwards algorithm possible because the guy ONLY KNOWS VB and the only programming method he learned was to brute-force everything. Yeah, thanks for sharing dude, but really, learn what a frickin' for loop is and get back to me.
Worst Interpreter EVAR
It's not enough that you have all these inefficient functions floating around the internet that must have been written by some script-kiddie-turned-Microsoft-certified-professional-programmer, the innards of the language are so badly implemented that it's impossible to make an efficient program without a TON of workarounds. For instance, the empty string ("") vs. the null string (vbNullString) fiasco. They are the same thing, but if you use "", it is WAY slower. VBScript actually allocates memory for that string, taking up a valuable 6 bytes of RAM and wasting a bunch of CPU cycles, just so you can do a comparison or whatever!
VBScript also, perfectly in-line with the Microsoft way, doesn't really pay any mind to efficient string operations. It bascially copies every frickin' string that you concatinate, wasting away memory with constants and the like.
There's much more wrong with this language but I am tired of capping on it; it's too easy. Maybe in a while I'll feel the energy to rant again. |