Google Translating Search Queries on the Fly

The most popular post on this blog, by far, is Where Does Google Chrome Store User History, Profile and Bookmarks. I had the good luck to be the first person on the Internet to post an answer to this question (even before Google did so in their documentation), just a few days into the original Chrome Beta release. The vast majority of hits come from Google searches that include one or more of the following keywords: Chrome, History, Profile, Bookmarks, Cookies, Save.

I mention this because I saw something very interesting in my site stats today. Someone got to this page by searching for “שמירת סימניות בכרום”. This is Hebrew for “Save Bookmarks in Chrome”. If you searched for this term in English you would see a link to my post on the subject somewhere in the range of the 5th-10th link. However, they searched in Hebrew, and even so, a link to this post showed up (number 8 in the results when I tried it).

So they must be taking the Hebrew, and while they are processing results in Hebrew, the search algorithm also translates it on the fly, searches on the term translated into English, and integrates relevant English results into the result set. This is very cool, and in a world where the bulk of technical literature and answers to questions like this are in English, it is very smart. There is a good chance that someone searching for this in Hebrew will still find an answer in English to be useful. Looks like the Google Search team still has a few tricks up their collective sleeve.

I Love it When Technical Book Authors Have a Sense of Humor

I am going through Pro ASP.NET MVC 3 Framework by Adam Freeman and Steven Sanderson (@StevenSanderson) (Apress). Enjoying it so far – good technical writing, good level of detail mixed with useful examples of different implementation options.

And most importantly, they have a good sense of humor. From Page 381 (my highlights):

Quote from Pro ASP.NET MVC 3 (Sanderson & Freeman), page 381

If you don’t want to click on the link, they are talking about best practices for url schemas using MVC, and give an example of a link to Amazon as something not to do (I realize the irony of my linking to Amazon above). They then include in an aside:

Note To be very clear, we have only the highest respect for Amazon, who sells more of our books than everyone else combined. We know for a fact that each and every member of the Amazon team is a strikingly intelligent and beautiful person. Not one of them would be so petty as to stop selling our books over something so minor as criticism of their URL format. We love amazon. We adore Amazon. We just wish they would fix their URLs

.Another good one: The authors are talking about using MVC to create a REST API, where the same action name in a given controller can be overridden to handle HTTP Get/Post/Delete requests (page 476, my emphasis):

Now each StaffMember entity in our application can be uniquely addressed using a URL of the form Staff/123, and a client can use the GET, POST, and DELETE HTTP methods to perform operations on those addresses. This is called a RESTful API, except by people who claim to be experts in REST, who will tell you that nothing is truly RESTful except their own code. (We joke—sort of).

Gotta love it.

Web Surfing Helps at Work

I have been claiming this for years. Web Surfing Helps at Work, Study Says:

According to a new study, Web browsing can actually refresh tired workers and enhance their productivity, compared to other activities such as making personal calls, texts or emails, let alone working straight through with no rest at all….Because Web-surfing can aid productivity, the researchers caution employers against over-restricting workers’ Web access. They recommend that managers allow time for limited personal Web browsing “since it has a salubrious impact on employees’ productivity,” while limiting access to personal emails.

It has happened to me many times that I am stuck on a problem and just come up with a solution. Then I spend a few minutes “wasting time” on some website and the answer comes to me. Nice to see it substantiated in a study.

Protect Yourself from Copyright Trolls

For blogs and online forums that excerpt content from other sites and post third-party content (like content), in order to enjoy “safe harbor” status under the DMCA, the site must register a contact for takedown notices. Costs $105 (plus postage) but can end up saving a bundle down the line. See this Wired article, which talks about a company called Righthaven which is buying up the rights to old newspaper material with the sole purpose of suing those who posted quotes from it online, and is targeting sites that do not have a registered DMCA Takedown contact:

Under the Digital Millennium Copyright Act, a website enjoys effective immunity from civil copyright liability for user content, provided they, promptly remove infringing material at the request of a rightsholder. That’s how sites like YouTube are able to exist, and why Wired.com allows users to post comments to our stories without fear that a single user’s cut-and-paste will cost us $150,000 in court.

But to dock in that legal safe harbor, a site has to, among other things, register an official contact point for DMCA takedown notices, a process that involves filling out a form and mailing a check to the government. An examination of Righthaven’s lawsuits targeting user content suggests it’s specifically going after sites that failed to fill out that paperwork.

“The DMCA is a good deterrent from being sued,” says Kurt Opsahl, a staff attorney with the Electronic Frontier Foundation, “Complying with conditions of eligibility for the safe harbor is a good thing to do. It probably will prevent somebody from suing you in the first place.”

(Hopefully that excerpt is short enough to be considered fair use, combined with the citation and link. Would be kind of ironic if I exposed myself to a legal troubles by quoting from an article that talks about how you can avoid such things). An alternative is to use a hosted service for your blogging, who will have already registered a takedown contact and will handle all DMCA notices.

Handling SSN Input Properly

I just logged into my Google Adsense account. After 5+ years, I finally earned enough to get a payment. Only to discover that I had forgotten to update my mailing address, and that the check was sent a month ago to an address to which I no longer have access (if you find yourself in this situation, just cancel the check, and set up electronic funds transfer – much easier). In the process of updating my Adsense account, I put in my social security number so that the proper tax forms can be filed. I just entered it in the format of 123456789, since after all, a social security number is nine digits long. When I submitted the form, I got the following validation error:

So they want me to insert dashes into the SSN so that it is in the format of XXX-XX-XXXX (the format in which a social security number is normally written). That is not so hard for me to do. But why should I have to do that? They are already validating that I have the proper number of digits. So once they know that I entered nine digits, why can’t they just enter the dashes for me? No reason to bother the user with inanities like this. (One could also ask why they need to store the SSN in this format – storing them as nine digits in an int field is probably more efficient than storing them in a text field.)

Hot Computer = Slow Computer

I have had a Dell Latitude D830 laptop for the past couple of years. Core2 Duo, 2.5 Ghz, 4GB RAM, Vista64. In the beginning it was flying. Fastest computer I have ever had. But then as the months went by, it started to slow. Recently, performance has been horrible. Looking at the system resource, memory was OK. But sometimes in Visual Studio I had to wait for the IDE to catch up with what I had typed (running Firefox with 20 tabs, Visual Studio 2008, Outlook, Excel and Sql Management Studio, but I used to have no problem with all of them open at the same time).

After some Googling, I saw that the first thing to check in my case would be the system temperature. If the system is overheating then the processors cant run to their full potential. And lo and behold, when I lifted up the laptop, there was dust all over the Fan intake (and the laptop was so close to the desk that even with it clean hardly any air would get in). So I cleaned off the desk and underside of the laptop, and propped up the back of the computer (I knew that I would get some good use out of this). Downloaded and installed Speed Fan and watched all of the core temperature numbers drop. Computer performance immediately went up. (I also took off the keyboard and checked to see if there was a buildup of dust inside the fan, but it was clean. Ran the fan diagnostic and it was ok as well). The computer is still running hot (still something to work on), but I have definitely learned my lesson – high performance laptops really suffer in the heat. Keep them cool!