justira ([personal profile] justira) wrote2007-02-02 03:12 pm

Microsoft adventures, abbreviated

Earlier this morning as I was in another frothing rage over Microsoft (this time directed at IE7 and ASP.NET) I was all geared up to produce another voiciferous diatribe about Microsoft, programming, web development, and whatever else was annoying me at the moment.

However, after about two hours of wrestling with IE7, I ran out of energy.

There, wasn't that exciting?

ETA: Boring, really. An actual case of ASP.NET's retardeness: An application we're working on had a list of locations with two columns of checkboxes next to them. The left column is intially disabled. The right column is for selecting locations to engage in a teleconference, whilre the left one, the intially disabled one, is for selecting a single location to be where the presentation takes place. The checboxes on the left become enabled only when the corresponding checkbox on the right does, so that you can't select a location to be the main (presentation) one if it's not already in the list of teleconferencing locations.

Why is the left column radio buttons, then, if only one can be selected? Because ASP.NET is an ass. It was an unavoidable consequence of how ASP.NET works with lists of radio buttons. While this is stupid, it's not my main problem.

The problem comes from how the checboxes ar disabled. To enable them after their partner is clicked, we have to call on JavaScript to remove the "disabled" property if the user clicks the right checkbox. So far so good. Now, my officemakte is the one working on that script, and after taking a look at the code the ASP.NET parts of the page spat out (and this was one of them) he saw that the "disabled" property was not actually applied to the checkboxes, but that ASP.NET generated a span around the checkbox with the class "disabled". This is really retarded, by the way, and a classic case of code bloat. But we still haven't reached the ridiculous part.

And what is the ridiculous part? Well, seeing that span tag around the checkboxes, my coworkeer did the intuitive and sensible thing and told the JavaScript to, upon the suer clicking the right checkbox, find the parent element of the left checkbox and take away the disabled class.

The problem?

The span is not always there.

So, if you were, say, editing a conference with some locations already selected (and their corresponding extra checboxes initially enabled) and wanted to change the locations and the presentation location, the span tags wouldn't be there on the checboxes that were intially enabled. Result? The parnet entity then became not the span tag, but the entire table cell, a td element, and the entire thing, left checkbox, right checkbox, and location name, gets disabled.

This is not gravy.

This occurs because not only does ASP.NET apply a retarded and unnecessary behaviour (generating span tags around things that are perfectly capable of accepting classes), but it engages in stupid behaviour inconsistently. It only generated the span tag if the checkbox was initially disabled.

Fortunately for that sanity of my poor officemate, who had been staring at his perfectly good JavaScript code in consternation and then, when we both discovered the inconsistend span generation, wilted in dismay at the logistics, I'd encountered this span-class behaviour before, and suggested a deeply unintuitive fix: add a dummy class to the ASP.NET checkbox generating code. Since ASP.NET refuses to apply classes to the checkboxes themselves, it is forced to always generate the span tags. Now his perfectly fine JavaScript works excellently. Part of the problem with this behaviour is that "disabled" is a real live property of the checkbox tag, and intuitively, you would think that when you tell the ASP.NET mystery engine to generate checkboxes for you and tell it to have a propety "disabled", that it would use the checkboxes native faculties for that. Instead, ti slaps it on as a class. This is stupid, counterintuitive, and inconsistent.

In general, though? I hate ASP.NET. Thanks to my job, I can now wade competently through a lot of ASP and have even acquired another language, C#. Bully. I hope I enver have to use them again.

ASP.NET spits out ridiculously awful HTML code. While the new code from the 2005 version mostly validates, it does something that I think is far worse than not validating: TAG SOUP.

WHY.

WHY DO THIS.

Why spit ot random span and table tags everywhere? Why pile on inline styles? WHY? Not only is it not semantic, the code is poorly formatted so that when I try to wade through the code my coworkers' ASP.NET controls spit out, I can hardly tell what the hell is going on.

I just.

I am really tired of ranting about Microsoft. I'm a fairly easygoing person. Few things get me truly angry. Well, okay, that's a complete lie. Almost everything about life angers me, deeply, because people are involved in life and people are assholes to each other a distressing amount of the time. My solution is to just not think about it if there's nothing I can do.

I guess it all comes back to idiocy. I can't stand people doing things in an idiotic fashion, and pretty much every time I butt heads with a Microsoft product I see that they've discovered some new and different way to be morons about what they're trying to do.

Someday I'll write a coherent essay about Microsoft, including actual examples of bad coding and predatory economic practices. For now, I'll sum it up this way: IE7 sucks because it's a Firefox copycat that fixed almost none of IE6's problems and introduced a shitload of new ones. Possibly what pisses me off more is that people who've never tried or heard of Firefox think IE was somehow being innovative with their new features. Screw you, Microsoft.

Seriously, y'all who talk to me regularly, I don't generally get well and truly pissed easily, but somehow retarded practices get me every time

[identity profile] lambspam.livejournal.com 2007-02-02 09:25 pm (UTC)(link)
I fully expect your plans for internet beautification to reach fruition. Also, if you could bring Microsoft down in the process, that would be great.

(PS - Did you catch the Daily Show interview with Bill Gates?)

[identity profile] justira.livejournal.com 2007-02-02 09:31 pm (UTC)(link)
Screw the Daily Show -- where can I get more pics of you like in your icon? HAWT.

Also, when the hell are my CDs getting here? I need to drive down there and see you >=(

Seriously, though, Daily Show did Bill Gates? DO TELL

[identity profile] lambspam.livejournal.com 2007-02-02 09:47 pm (UTC)(link)
Aw. You make me blush. *squee*

Your cds are getting there really, really soon. I'm working on about twelve million theme cds and a few completely random mixes, so I'll send you the four best ones within the next week.

Yeah, totally. I have it on TiVO; I'll save it for you. Jon Stewart asked about the F12 button. The whole thing was pretty funny, especially because it's so obvious that Bill Gates is a huge nerd.

[identity profile] lambspam.livejournal.com 2007-02-02 11:48 pm (UTC)(link)
[Also, if you're actually looking for pictures of me, there are a ton on facebook (though most of them are beyond horrendous).]