in

ASP.NET Weblogs

The Commodity Programmer

May 2009 - Posts

  • 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.

More Posts