in

ASP.NET Weblogs

The Commodity Programmer

  • The Top 10 Things Web Developers Still Get Wrong After All This Time

    So, The Globe and Mail (pops) revamped their website a few days ago.  And what a wonderful train wreck it was.  And I've been meaning to write a blog post like this for a while, and using that new site was enough to take me over the edge.

    1) Not Using the Label Tag

    What is wrong with you people?  Whenever there's a checkbox or a radio button and there's text next to that control, surround that text with the label tag!!  That way, users can click on the text and it will change the state of the corresponding control!!  Wow!  Welcome to the year 2000!

    This makes a great interview question if you're the one being interviewed.  Ask the techie guy in the room if s/he knows what the label tag is.  If they don't, you can be assured that that job will consist mostly of wanting to pull your hair out.

    2) Not Making Links Look Like Links

    So here it is, 2009, and people still insist on having links that look like text.  Stop it.  Just stop it.  Come on.  What's the problem here?  Can't think of a color that goes with black?

    3) AJAXing Everything Just for the Hell of it

    Whoever coded the Profile form for the G&M needs to be shot.  This is how it works:

    1. You click the "Profile" link
    2. It takes you to an empty Profile form
    3. The page makes an AJAX request to get your Profile info, and then fills out the form using JavaScript.  Or sometimes it doesn't.

    Nothing like tying up server resources for no reason.  On the other hand it's a great excuse to get more servers.  And that's economic stimulus right there, baby.

    The comments work similarly.  Loads the page, then loads the comments.  And somewhere along the line there's a request for a URL that doesn't exist.  Because we all need more 404s.

    4) Paging for No Reason

    I find it odd that many websites load up with a zillion JavaScript files, a zillion CSS files, a zillion images, and then show, oh, five comments (and with no HTTP compression, to boot).  I suppose they've used up so much bandwidth with all the other junk that they have to conserve somewhere.

    I especially enjoy the way the G&M did it.  They show the oldest comments first, so in order to see the fresh stuff, you need to click on the paging links.  But there's no "last/first page" links.  So you need to slog through that numbered links.  Oh, and the links are javascript links.  And they don't keep history.  So if you leave the page and come back, you're back to page one.  Good work, boys. 

    5) Sorting That Doesn't Work

    Sorting's useful, I guess.  But if you're going to put in a sort, use a stable sort.  One of the few things Spolsky got right with FogBugz was stable sorting for the case list.  So if you click on case #, and then click on priority, it's still sub-sorted by case #.  Can't make it stable?  Don't know how to?  Well, umm, type "stable sort" into Google.  I know, hard, isn't it?

    6) Videos That Start Automatically on Page Load

    There's nothing like going to a web site and having some fat obnoxious dude talking right away.  Because that doesn't want to make me click the back button right away.

    7) Not Using HTTP Compression

    I know, I know.  You're working on a multi-million dollar website.  And HTTP compression products cost at least $5 billion.  Oh wait, they don't?  You mean they're sometimes free?  You mean some web servers have built in HTTP compression functionality?  What?  What?

    8) Not Rendering Line Breaks Because You Don't Know What the Hell the <br /> Tag is

    I'l let you in on a little secret.  Most programming languages have this thing where you can replace characters in a string with other characters.  You can use this functionality to replace "\n"s with "<br />".  And that way your users might not whine for 250 comments about wanting paragraph breaks in their comments.

    9) Not Knowing How To Escape HTML

    Look.  Whatever genius way you came up with to "trap" HTML is broken.  Whatever you way you find on Google to "trap" HTML is broken.  Just use your programming language's HTML escaping facility.  There's one there.  Really.  And it works.  Really, it does.  Trust me.  Maybe you want to crack open a book or two about your programming language and look.  Really.  I'll even buy you a pop.

    10) Really Small Text

    I'm not sure when this happened. Some graphic designer probably thought that using really small text made them cool or something.  No dude, no one cares, except for all the people that have monitors that have a resolution greater than 640X480.

  • The Death of IE, part Deux

    Nothing like writing a followup to a post from last year.

    Looks like I rankled a few people's nerves.  I have to admit I'm always impressed when people not from MS defend IE.  It's sorta like poking yourself in the eye, and then explaining to someone that you actually like doing it.  The folks at MS get paid to talk up IE at least.

    Well, IE8 has come (and gone), and with not a bang but with a lame whisper, it seems that people would rather down a bottle of Drano than bother to install IE8.  What a surprise.

    Even with all that pseudo-useful, snide and developers-know-better-than-users mentality that littered the comments of the IE dev team's blog, it seemed that everybody completely, totally and utterly missed the point of having a new IE release.

    And, what's this?  Rumours of Microsoft dumping the Trident engine?  You don't say. (Find the links yourself, kiddies).  My oh my, how prescient on my part.

    We could hope for MS using Gecko as the new rendering engine for the next version of IE.  Oh, and compatibility with Firefox extensions.

    But for my next trick, I'll say that MS will instead buy a small company that three other people have heard of.  This company's product will be a HTML rendering engine.  And that will be Trident's replacement.  And it will be called Dentyne.

  • The End of IE Has Arrived

    "Today marks the end of IE's domination in the browser space."

    So today Microsoft announced that IE's renderer will default to "Standards Mode".  Remember this day.  The end of IE has arrived.  It was a good run.  Why, I remember the days of IE3 when simply rendering a form would result in a memory leak.  I will always have a soft spot in my heart for the XMLHttpRequest object that IE5 introduced.  And I remember when IE6 came out.  I think it was actually still IE5 except that it said it was "IE6".

    What?!?  IE dead?

    Yup.  Consider this:  The only reason people use IE is to browse stuff that works in IE.  For many web developers, that's Windows Update.  Other than that, there's really no reason to even load it up other than to test your website for IE's quirks.  Even Windows Update is moot, because Vista has made it clear that IE will not be the vessel that Windows Update will use anymore.  And once IE behaves like other browsers, you won't even need it to test your website.  That's right, see you later IE.

    Consider this as well: Firefox has a plethora of addons.  IE will never match the sheer volume of these addons.  Even if tomorrow MS released a simple scripting language to compete with Firefox's, it would take a monumentous effort to translate all those addons for IE.  And I somehow have the feeling that the addon authors don't really care about providing a version for IE.  Of course, MS could just implement XUL for IE, but that's too obvious of a path, and MS has an amazing ability to rationalize any decision they make, however wrong. (and yes, I know about XUL for IE.  But it's ancient.  I almost expect to find the thing fossilized in the Burgess Shale bed next to a troglobyte).

    Truth be told, standards adherence means absolutely nothing (yes, nothing) to the average web browsing individual.  It's the perception of improved security that Firefox offers that draws people in, and it's the addons that keep 'em interested.  The feature set of FF is so great, and IE so far behind, that the only way that MS will ever catch up is for Billy Gates himself to travel back in time and tell his past self to make a better browser.

    But you didn't consider the Corporations!  They need ActiveX!  ActiveX!

    Corporations don't decide standards.  They merely entrench them.  Firefox has XUL.  There's stll Java (via Java Web start, not applets), and even .NET apps via that .NET download thingy (I'd like to add Flash to the list, but then I'd feel dirty), so if you really, really need local access, it's still available.  It'll be a boon for us programmers anyhow.  Think of all the ActiveX apps we get to convert!

    What's in it for Microsoft?

    Part of me wants to think that someone at MS has thought this far and has realized that this is a fairly logical and likely outcome.  On the other hand this is the company that brought us Bob and that damned paperclip, so who knows.  But here's a scenario that could pan out:

    Microsoft can't even sneeze without some governing body examining which brands of tissue paper they're using and making sure they're not buying too much of one brand.  MS getting out of the browser business would be a sign to those meddling powers that they're not interested in Ruling The World.  Why, they could even package Firefox with their OS.  Oh sure, they'll still have IE kicking around, but no one would use it.  It'll be like Notepad for the 21st century.

    It's ironic, really.  By making IE more like the standard, they've actually removed any reason to keep IE around.  To most people, including developers, Firefox is good enough.

    The Atrophy of the Web - Part II

    Unfortunately for us, I believe that once Firefox does become the entrenched browser, all innovation will cease once again in the web space.  There's simply no incentive to progress.  But we'll leave that to another blog post... 

    (And yes, this is my first post.  And no, I don't have an about me page yet.  But really, what's there to know that you care about?  Besides, I'm still trying to figure out how to use this thing.)

More Posts