- 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
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.
Edit 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
Edit Admin
Are you sure this is the actual System.Collections.ArrayList? You can only index it by int, not by string
Edit 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.