Coding that makes you say WTF!

Every so often you pick up a project that has been coded by somebody else and encounter something and you can’t help but wonder what the f**k they were thinking, often it’s down to naivety or a lack of knowledge, or even a use of old outdated coding methods but then sometimes it’s just mind boggling bizarre.

Here’s a few examples I’ve come across recently but I’m sure there’s plenty of you with more to share. Continue reading

Things That Shaped the Web Design Industry in 2010

Some of you may have noticed that I’ve not done any writing for a while, well it’s kind of a new years resolution for me to get back into it. I’ve got lots of half articles strewn around which I’ll look at finishing off but I thought I’d kick off with a look back at last year.

I wrote a looking ahead to 2010 piece for Six Revisions last year so before looking ahead to 2011 I had a quick look back at the piece and 2010 and you can have a read here – Things That Shaped the Web Design Industry in 2010.

I’ll be following it up with a look ahead to 2011 soon!

How good will IE9 have to be?

Microsoft have rolled out an IE9 beta, you can have a look for yourself over at http://www.beautyoftheweb.com/. I can’t haz IE9 as I’m still on Windows XP (I didn’t upgrade to Vista and haven’t got around to Windows 7 yet) so I’ve have to just have a look at the various round ups and reviews (such as this one – IE 9 gets back in the game)

But as I read over the various improvements in the interface, the new support for up and coming standards and the use of hardware acceleration amongst many other advances, one thought stuck in the back of my mind – how good will IE9 have to be to offer a chance of growing it’s market share again? The answer obviously is pretty damn good.

IE will no doubt maintain the majority share of the browser market for a long time given the large number of users who neither know or care which browser they use, or are quite happy to stick with IE out of comfort. The growth of Google Chrome has shown that users are not unwilling to switch their browser if a better alternative is available. But even if IE produced the best browser by a country mile I’m not sure how much it would effect it’s standing as a browser. Could you see web designers and developers recommending it to their clients? Sure there are plenty of fair minded sensible people out there who would hold their hands up and say yes it is a great browser, but it’s become cool to hate Microsoft and IE and to bemoan their problems. There are many for whom IE would have to show something really really special before they would consider doing anything other than picking at it’s faults.

Still we don’t live in a one browser world and it’s nice to see that Microsoft are finally taking up the baton and producing a more modern browser that supports the standards and innovations that designers and developers like me want to see.

JQuery val() quirk

I’ve had a good solid day of coding, probably my first in quite a while. Whilst I was playing round some JQuery I came across a quirk I’ve never noticed before. I call it a quick because it’s certainly not behaviour I’d expect.

When working with some HTML form elements I used the JQuery method val() to set the value of a select box. So as an example here’s a select box and the JQuery to set it.


<select name="DavesSelectBox" id="DavesSelectBox">
<option value="0">Zero</option>
<option value="1">One</option>
</select<


$(DavesSelectBox).val(1);

Now the problem arises when the form is submitted using a normal submit button and post method. I noticed whilst it visually seemed the select box was being set to the value, the posted value didn’t reflect this and posted the original value.

So after some looking around it turns out that if the element has the same name and id then .val() can sometimes be a little problematic. So the quick fix to change the name and id to different values. Strange!