- 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
headsplode
sheer genius!
Admin
I knew this would be fun when I read the title! Oh, the joys of self-altering scripts... That's what I call Organic Growth.
Admin
As a non-coder... can someone explain what this does so that I too can admire the stupid?
Admin
In the bank where I currently work, we (support level 3/4), have a simpler approach to macros: the official position of the IT deparments is that there is no support for it, unless given by Microsoft, at the rate of 1500 USD a day (at a minimum), to be paid by the branch using macro...
Admin
Addendum (2009-08-03 09:28): basicall the script has a hard coded user/pass combo and to reset that it deletes the original values and replaces them by rewriting its own code. As noted above this an abomination against god...
Admin
It's painful to even think about what would happen if some unsuspecting coder were to add or remove lines to the top of the script, of change the indentation, or in any other way make line 3 look any different from what the rest of the code expects.
Admin
Ah, TRWTF is that the "On Error Resume Next" should be on top of the file, now some parts of the code are unprotected in face of errors.
Admin
Wow! New possibilities. VBA injections!
Admin
The 'PasswordReset' takes the entered User Id, puts it back into the user ID textbox on the login form, reads the password from the textbox on the login form, tries to login with those values after converting them to strings, rewrites the code if it succeeds (and if nobody has reformatted/edited the code!), goes into an infinite loop of trying the same thing if it fails...
Beautiful.
Admin
This is a self-modifying comment. If you can see this, you have unfortunately come too late to enjoy Irish Girl's new lingerie ads that were exclusively featured in a previous version of the comment.
Admin
Aww crap.
Admin
Admin
I haven't seen VBA code in years (thank god) so could someone enlighten me what these lines are supposed to do? Just looks a bit funny :p
Admin
Thankyou. I now marvel with the rest of you.
Admin
They set ScreenUpdating to True for a short while (however long it takes to execute) and then set it back to the original value.
Far from a decent solution, but hey, it's VBA.
Admin
Admin
oh... lovely....
Admin
As the saying goes: Real Programmers can write assembly code in any language. To even think of the concept...may well have been some mainframe fossil forced to use VBA who wrote this rather than a complete noob.
Admin
Admin
No. Clearly it was written by an earlier incarnation of itself.
Admin
Admin
Admin
Who's to say that this thing didn't start out as some programming student's "Hello world!" program...then through the years of evolution, reformats, and countless bit errors on the hard drive, slowly gained sentience? After clawing its way from the depths of the C:\backup\backup\backup\backup\programming\lab1 folder, it tried to masquerade as an innocent business macro while plotting to take over the world! Natural selection saved us this time, but you have to wonder, how many more of these things are out there, just biding their time till the robot uprising?
Admin
I think it was a lich - a twisted intellect that turned itself into an undead monster as a way of achieving immortality
Admin
Admin
TRWTF is that such a dangerous property like ".CodeModule.Lines(3, 1)" actually exists.
Admin
Well, now we know what the next Programming Praxis has to be written in.
Admin
Admin
Admin
When you say this, I think of the urban legend of people hiding needles in toll phone coin-returns with a note that says "Welcome to the world of AIDS"
"Congratulations, you've just been injected with VBA."
Noooo!!!!!!
Admin
Could someone sterilize that piece of code? I'm afraid it could evolve into a species...
Admin
Thinking back to my years of being a TA for programming labs...You're probably right.
Admin
Admin
I know you meant that as a joke, but On Error can only appear in procedures. You can't catch compile-time errors (at least not in the same file, you could embed a scripting engine and... never mind) and run-time errors can't occur module-level because all the code that actually runs and could cause run-time errors is procedure level. In theory.
Admin
I must admit that this particular solution to the problem of updating a password would never have occurred to me in a million years.
It raises whole new frontiers in software development. Why have a database at all? Just continually update the source code with new constants! Think how much faster that would be than accessing a database!
Admin
It is even more painful if a user enters code as his name! This thing is a security risk!
Admin
You nailed it! This kind of frightens me.
Admin
Terrific!! VBA Autopoiesis!
Admin
Nah, that property can be useful for when you need polymorphism in your spreadsheets...
Admin
Admin
Perhaps the function could escape the time loop by giving many, many return values of 3 for its next instantiation. That would trigger the shuttle bay door opening, which would jettison all the air, which would propel the function just enought to avoid the incoming USS Bozeman.
Admin
Admin
A friend told me they were generating JSP pages on the fly from the servlet in their work. He also invited me for an interview. I'm sure I could post really interesting WTF's if I were to take that job.
Admin
Nice
Admin
No no no, according to rule 27b/6, unless referring the original, making shitty star trek references actually reduces your geek cred. The penalty is doubled if you refer a version with a bald, french, pussy masquerading as a captain.
Admin
I'm not sufficiently familiar with VB to come up with an interesting password. Does VB allow multiple statements on a line? And is the comment sign //?
My password:
"); somefunnycode(); //
Admin
My cherished ignorance of VB prevents me from being able to detect the self reference. Is it in the code?
Admin
I do the same thing for setting all my string variables. Literals 4TW!
Admin
I agree. Some madman must have borrowed it from INTERCAL.
Admin
A debugger that flagged procedural declarations rather the actual statement that threw the exception would piss me off. It's bad enough as it is.