- Feature Articles
- CodeSOD
-
Error'd
- Most Recent Articles
- Lucky Penny
- Mike's Job Search Job
- Teamwork
- Cuts Like a Knife
- Charge Me
- Que Sera, Sera
- Hot Dog
- Sentinel Headline
-
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
Huh? ArrayList is a list type not a map. You have to index it by number not by string
Admin
Sweet! If you plan carefully, you can set the parameters for multiple calls efficiently, especially if you share parameter names that always have the same error. A revolution in decoupling and DRYness.
Admin
While I haven't seen this particular WTF, it's probably somebody who was trying to use MVC but got told they had to use shitty WebForms, and they didn't know about or didn't want to use MVP, so they tried to emulate MVC as best they knew how. A WTF to be sure but the idea seems at least based on "Structure the code so it's not a pile of garbage," even if they missed the point a bit.
Admin
using a single session object instead of different singletons and global variables is not a bad practice... if its a real object not a dictionary
Admin
Are you sure this is the actual System.Collections.ArrayList? You can only index it by int, not by string
Admin
As mentioned before, it cannot be an ArrayList, it is more likely the old Hashtable which had System.Object as type for key/value and the indexer added new entries for non existing keys.
Admin
I highly doubt that this
ArrayList
isSystem.Collections.ArrayList
too, but there is absolutely no reason why this can't beclass AcmeCorp.Collections.ArrayList extends System.Collections.Hashtable
. Which makes this worse. But not as bad as the "but I liked the classic VB procedure dance" they've managed to re-create here.Admin
Usually we pass functions arguments via the stack, but when you think of it the stack is just a global shared sort of hash map in a session after all...
I'll see myself out now.
Admin
a not so good news is that session will expire... you don't know when but be sure it will, without notice
Admin
Either Remy obfuscated the submission in a hurry, or some PHP coder had his way with ASP.