Friday, November 18, 2011

Google's onmousedown link trickery


So you do a Google search. You find something interesting, but instead of clicking on it perhaps you just want to copy the link. Say you want to IM it to a friend or paste it into a malicious site search service. So you right-click on the link and "Copy Link Location" or whatever it is for you people on Chrome/IE/Safari/Opera/RockMelt(loljk). Then you paste it into your destination, but what you get looks like this:


Obviously Google's using some redirection trickery for some kind of internal purpose. But when you hover your mouse over the link, the url that shows up at the bottom of the window is the normal, short, non-Google link! And that hover-over url never lies, right? How is this happening?

Well, the good news is that technically the hover-over url isn't lying. It is indeed the correct url at that moment. But try right-clicking on the link, and before you do anything else, notice the hover-over url again*. It's changed! It seems Google is using some Javascript tricks (like an onmousedown event) to show us the expected url at first, then change it at the last second.

Sneaky? Maybe.
Annoying? Definitely.
Clever? Absolutely.

*A note in case you try this yourself: this only seems to happen on like 1/4 of the links on a typical page. And there's no way to predict which ones it will affect.

Sunday, November 6, 2011

What happened at 1:17AM, November 6?

I just realized a weird side effect of daylight savings. In the fall, it creates an entire hour where times are non-unique. What I mean is, if I said I brushed my teeth at 1:17AM on November 6, would you know when that happened? It could be the first time 1:17 rolled around or the second.

I only thought of this as I sent a text during those ambiguous two hours and saw the timestamp. I use Google Voice, which shows the time sent next to each text. So I wondered if I sent one at 1:25 in the first hour and then at 1:17 in the second hour, would it show the one at 1:25 before the one at 1:17? I guess so.

Of course this mostly only matters if you think about software that timestamps things. Which is one reason why Unix time was invented, I guess. But I also start thinking about things like police reports or other important documents where you might say X happened at 1:17AM on the night of November 6. That doesn't specify exactly when it happened! There's no standard way to indicate what exact time you're talking about.

Again, this is one reason computers use Unix time, though I just discovered that apparently Unix time has this problem too. Its rule is that it always increases by 86,400 seconds per day. But some days are longer than others because of leap seconds. So again, we find that some times, like 915148800, are ambiguous. Now that really seems to pose a problem for software like server logging, etc. Why would you make the same mistake, Unix guys?

Note: Hmm, I wonder when I posted this? I guess we'll never know!

Friday, November 4, 2011

Luddite Fallacy: not wrong anymore?

Smash away!

I just read this article suggesting that the current job crisis might be a symptom of a larger trend: disappearing middle class jobs. The author cites technology and outsourcing as the causes. The technology part reminded me of an idea that's been forming in my head for a while.

Technology is bottoming out the cost of anything whose price was held up by the difficulty of communication or automation. The news, music, and even postal industries all were undercut when the internet made it dirt cheap to transfer information.

Of course, it also made all those goods cheap and plentiful for everyone. For a while I thought that was part of the answer to why technology doesn't create the massive unemployment the Luddites feared. But.. lately I've realized this time might be different.

So maybe the way this is working is that there are benefits to society but the benefits don't address the drawbacks. So we get to live in a world with an abundance of information always at our fingertips but that doesn't help the fact that none of us have jobs.