July 2nd, 2007

Developers embed Pro-Firefox/Anti-IE sentiments in their code

As a professional web application developer, I’m well aware of the challenges involved in coding for multiple browsers (and, even worse, older/buggier versions of those browsers). I also hate it when a website won’t behave the way I want it to, so I often end up viewing the source with FireBug, then messing around with the code.

If I just need to “fix” it on a one-time basis, I’ll just edit it with FireBug, but if I need it to behave better every time I visit the site, I’ll write a GreaseMonkey script (Incidentally, I use Platypus to generate a lot of my GM scripts. So easy!).

Sometimes, in the course of viewing/hacking up their code, I run across funny things that developers left in there. Here are a few of them that I’ve run across, which express the designers/developers’ browser preferences.

From viewing the source of a last.fm page:

<span class="iesucks" style="display: block">&nbsp;</span>>

[I just liked their css class name]


A friend sent this next one to me a couple months ago. I went and tried it, at the time, and I got the error message. But they seem to have fixed it since then. Anyways, this online icon maker page, when viewed in IE, would throw a javascript error when you moved your mouse over the editor component on the page.The funny part was the error message:

'shitty_IE_needs_this' is undefined

Ooh, I just noticed that this site was featured on my favorite geek humor blog, Worse Than Failure (formerly known as The Daily WTF). They’ve got a screenshot of it, so you can still see how silly it looked.


This last one was not found in source code, so it may or may not have been written by developers, but it sounds to me like it was. From Google Reader’s FAQ (bold/italics added for emphasis):

15. What are Google Reader’s system requirements?

For the best user experience, Google Reader requires an up-to-date browser. We recommend that you use Firefox (download: Windows Mac Linux) or Safari (download: Mac), but Internet Explorer will work too (download: Windows).

February 19th, 2007

mixed signals on ebay home page

On one page, ebay both recognizes/greets me:

Hello, spugbrap! (Sign out)

and also snubs me:

Sign in to view your Favorite Searches.

It’s struck me as odd to see both “Sign in” and “Sign out” links on the same page.

ebay sign in or sign out

January 15th, 2007

Flash Element TD | Novel Concepts

Haven’t posted in a while, but have a bunch of things in my toblog.txt file, both technical and other stuff. For now, a link to a cool flash game I’ve been playing too much:

Flash Element TD | Novel Concepts

A Macromedia Flash based Warcraft TD game inspired by Elemental TD for WarcraftIII. […]

December 5th, 2006

Firebug: My new favorite Firefox extension!

I use a lot of Firefox extensions, but there’s a handful of them that I couldn’t do without. I now have another to add to that list (a list which I’ll post about here, another day): Firebug

This extension provides all sorts of useful features for web developers, and in the first 2 minutes of using it, I managed to track down a problem in a DHTML application that I’ve been working on for the past few months. I’ve been wrestling with some performance problems for the past few weeks, and have been getting increasingly frustrated as I tried one thing after another to optimize my code, but still ended up with unacceptable performance. Firebug provides a powerful Profiler feature, which clearly pinpointed the current source of my performance problems.

It’s also got a nice, big area for running arbitrary javascript code, has Watch capabilities, network performance info, realtime view of HTML, CSS, Script, or DOM, and all sorts of other features. The interface seems pretty usable and packs all sorts of power, without getting in my way when I don’t want to use it. Plus, there’s a new “Firebug lite”, which provides a small subset of the functionality (javascript console/logging) for non-Firefox browsers like IE and Opera. I haven’t tried that out yet, but I will soon.

Thanks go out to Stickman for posting about it on StickBlog this morning!

November 20th, 2006

JavaScript: list of implicit true/false values

I got tired of sometimes wondering whether I could use a particular JavaScript value effectively in a conditional statement…
For instance, if I’m in the middle of a block of JS code, and am not 100% sure what the value of a variable will be, is it safe to say:

if (foo)

or do I need to explicitly look at the value of foo, like:

if ((typeof foo != 'undefined') &&
(foo != null) &&
(foo != ''))

So, I took a little time one day, recently, and checked how various values are evaluated in JavaScript. I believe I gathered this info using IE6. Hopefully that fact is not important. Might be worth checking in Firefox one of these days, just to be sure.

false false
0 false
0.0 false
null false
false
undefined false
NaN false
true true
Infinity true
‘ ‘ true
1 true
-1 true
2 true
-2 true
0.1 true
‘0′ true
‘1′ true
‘-1′ true
‘null’ true
‘true’ true
‘false’ true
‘TRUE’ true
‘FALSE’ true