Thursday, 30. October 2008, 11:30:06
competition
Regarding the competition in the
last post, I decided to refactor it into two categories: the shortest and the best.
The shortest valid entry was as far as I can see
qwo's
alert(frames);. While the toString() output usually just exposes the browser's internal classes without showing real compatibility issues, this case is actually interesting because it gives away that in some browsers, "window.frames" is just an alias for "window". Opera doesn't do this, and guess what - it does cause us real compatibility problems and we have a bug on fixing it!
BTW qwo, it could be even shorter without the semicolon

.
The entry that packed the most "real" quirks into the least code was
arantius'
setTimeout(alert,0). I liked the minimalness of just passing the built-in alert method directly to setTimeout() - though perhaps it would expose the same quirks and be even shorter
without the '0' argument?
Congratulations, and thanks to everyone who contributed. And before I forget: the winners need to PM me their snail mail address if they want to receive the price

.
Friday, 17. October 2008, 13:04:43
coding, compatibility, competition
We all know that the interoperability situation on the Web has been abysmal. Web developers everywhere are vocally voicing their complaints of wasted time and money due to browser differences. Standards bodies that are meant to solve the interoperability problem become battle grounds of special interests, or create ivoryish spec-monsters that end up fragmenting the web even more. The dazzling bells and whistles of plugins threaten open standards..
So, let's have some incompatibility fun.Here's a challenge for JavaScript-skilled readers: Who can come up with the
shortest possible JavaScript that produces 4 different results in the top 4 engines?
(For the purpose of this exercise let's define the top 4 browsers as IE, Firefox, Safari/WebKit and Opera - latest available final versions).
The winner gets fame and fortune. (Well, I think I can afford a reward of ISK1000 these days if anyone is interested - certainly our friends in Iceland really need someone wanting to buy their money..

So the grand price is a souvenir 1000 krónar bill from
Jon's country of origin.)
Ladies and gentlemen, post your answers in the comments.