Friday, November 30, 2007



The kindle by Amazon looks pretty cool, but I can't figure out if it will be a niche market for a long time, or whether this is the breakthru product that will make ebooks really take off. I don't think it will be for commuters, but maybe for people who are on the road a lot of the time. I can see avid readers who don't like killing trees or storing used books to buy into this big time as well. But I just don't know if that's a big enough market to make it really take off. What do you think?

Tuesday, November 27, 2007

I searched for good cross-browser code that will disable backspace when in a drop-down element. Before you say that's bad design, don't disable shortcuts the user may want, know that it's a requirement that I cannot talk the business analyst out of. I first tried attaching the event to the drop-downs themselves, but was having issues with that. So now it runs for the entire document.

Here is my solution:


function noBackspace(evnt)
{
if (window.event) // IE
{
evnt = window.event;
if (window.event.keyCode == 8 && evnt.srcElement.type == "select-one")
{
evnt.cancelBubble = true;
evnt.keyCode = 0;
evnt.returnValue = false;
return false;
}
}
else if (evnt.which) // Firefox/Netscape/Opera
{
if (evnt.which == 8 && evnt.target.type == "select-one")
{
evnt.stopPropagation();
evnt.returnValue = false;
return false;
}
}
return true;
}
window.onload = function () { document.onkeydown = noBackspace; };

Thursday, November 15, 2007

Optical illusions forwarded in emails usually don't get much of a response out of me, but for some reason, this one really amazed me. Enjoy!

Follow the movement of the rotating pink dot. The dots will remain only one color, pink.

illusion

Now, stare at the black " + " in the center. The moving dot turns to green.

Now, concentrate on the black " + " in the center of the picture. After a short period, all the pink dots will slowly disappear, and you will only see only a single green dot rotating.

It's amazing how our brain works. There really is no green dot, and the pink ones don't really disappear. This should be proof enough; we don't always see what we think we see.