This page is not available in 繁體中文, as a result the English (en_US) version is shown instead.
HTTP_REFERER

Google recently announced that it will enable secure search for all the login users. More HTTPS usage is in general a good thing, but it does have a side effect:

keyword: not provided

Apparently RFC 2616 specifies that:

Clients SHOULD NOT include a Referer header field in a (non-secure) HTTP request if the referring page was transferred with a secure protocol.

Makes sense.

HTML5 also has a new "noreferrer" (with the correct spelling this time) that can be used to instruct the browser to never send HTTP_REFERER to the destination URL.

For my own amusements, I can still correlate those visits from Google with the landing page to guess what people are interested in when visit, so it's not too big of a deal.

by khc on Sun Oct 30 19:15:45 2011 Permlink
Tags: computer

Fun with Google Translate

A conversation at work reminded me to try out the Google Translate Android app's new Conversation Mode, which I did tonight. I spoke this conversation to the phone, first as custom clerk in English and Jim in Chinese (Mandarin):

Me: Hello can I see your passport please
Android: 你好可以,我看你的護照,請
Should be: 您好,請出示您的護照

Me: 給你
Android: You
Should be: Here you are

Me: What is the purpose of your visit
Android: 您訪問的目的是什麽
Should be: 您旅行的目的是什麽

Me: 觀光
Android: Tourism
Should be: Sightseeing

Me: Where are you staying
Android: 你是在哪裡停留
Should be: 您將在哪兒住宿

Me: 中國大飯店
Android: China world hotel
Should be: China world hotel

Me: How long will you be staying in china
Android: 多久你會留在中國
Should be: 預計在中國停留幾天

Me: 六天
Android: Six days
Should be: Six days

Me: Okay have a nice trip
Android: 好有一個不錯的行程
Should be: 好,祝您玩得愉快

"Should be" is the reference translation on the website, which I have to say, is sometimes a bit odd. The entire "conversation" took about six minutes, with most of the time spent on 「給你 (gĕi nín)」. I noticed that when I tried hard to pronounce the tonal change in gĕi, most of the time it will be recognized as two words (either as 「電影 (dìan yĭng)」or 「捷運 (jié yùn)」). So I tried to drop the tonal change, and Google would translate it as "gay". That's another thing I noticed, Google tries too hard to recognize English phrases within Chinese, and there's no way to tell it "Yes I really am speaking Chinese, only!". Lets not forget that it translated「給你」incorrectly. At least things are (sometimes) better when it has more context to work with, so longer sentences are (sometimes) both recognized and translated better (ex: 「我有一樣東西給你」is translated to "I have a thing for you"). Context is both a blessing and a curse though, if what you are trying to say sounds similar to a common noun (which probably means it's searched on Google often), then good luck trying to make Google return what you really mean.

There are other relatively minor problems as well. Most sentences took multiple tries to be recognized correctly. I am not sure if it recognizes English better or my Mandarin is worse (probably both), it has a much easier time "understanding" English sentences. If Google thinks it recognized a word correctly, there's no way you can tell it otherwise (that is, using the built-in correct option, you can edit it out and start over). And if it recognized a Chinese word incorrectly, even if it's not sure (those are shown as blue), you can't correct it either.

Just for fun I tried to speak the conversation the other way. I am not going to post the conversation here, other than that Google insists 「預計 (yù jì)」is "wiki" and I couldn't find a way to get past that. Did I say Google is trying too hard?

by khc on Mon Oct 17 23:29:24 2011 Permlink

New (work) laptop and other things

My work laptop's harddrive was unhealthy last Friday. At first I thought it could last a little longer but when I returned to work Monday morning it was returning various read errors and firefox wouldn't even start. I was able to start some more backup (as part of eating our own dogfood I've started backing up some of the stuff to it, but not all), but eventually rsync was having trouble reading the files too.

The new laptop is a ThinkPad X220, which is a little bit of an upgrade compare to the old X200 (quad core i5 instead of Core Duo). Unfortunately our PXE server only has Fedora Core 14, which isn't new enough to support the network card (which is a little problematic when you are trying to install over network). Downloaded and extracted the Fedora Core 15 bits to the PXE server, but that didn't work either because of some kernel OOPS which caused udevd (iirc) to die. Gave up, went home, put the install image to a USB drive and it installed fine from that.

Battery life is pretty good, the battery indicator said I had about 4 hours left, consider that I wasted a lot of time trying to do the install earlier and it was never plugged in. I mostly do my work on a shared server though so the laptop is mostly just a dumb terminal.

Gnome Shell worked okay. After disabling the braindead mutiple monitor/workspace preference it was even tolerable. FC16 is coming out in a month or so, hopefully the extensions that I rely on will still work. The new Evolution (3.0.3) also works much better than whatever I had. Not having to kill it 20 times a day is definitely an improvement. Openvpn didn't work out of the box because of SELinux, and by default the firewall blocks mDNS. Strangely port 22 is by default open, even though sshd isn't running by default. Coming from a Debian/Ubuntu world that confused me a little.

In other news, I just bought a PS3 from Amazon and it should be here on Friday.

by khc on Tue Oct 4 23:50:47 2011 Permlink
Tags: computer

Random quote

Why We Believe What We Believe:

Negative states stimulate intensive limbic activity, and this causes the hippocampus to embed the experience into long-term emotional memory. Pleasant experiences, however, do not trigger as strong a connection. That is why they are harder to remember than unpleasant ones... if you stay in a negative state for an extended period of time, the stress chemical will physically damage and atrophy different parts of your brain, such as the hippocampus. Over time, you might even lose your ability to return to a calm, peaceful state. Then your emotions, not your logic and reasoning, will predominate.

by khc on Mon Sep 19 20:58:53 2011 Permlink
Tags: urandom

難得的衝動

經常有人會說,「做人不要太衝動」,有些時候,衝動卻是動力的源泉。也有一個說法:「一時衝動」,也就是說,衝動只是一時的,如果只靠它來推動自己,能堅持多久可想而知。因此把衝動的心情寫下,作為衝動過後對自己的鞭策。

最近聽到一個朋友說,要想有人注意就一定要有自己的故事。想來也是。地球上六十多億人,每一個都獨一無二。Always remember that you are absolutely unique, just like everyone else. 因而自問,自己的故事是甚麽?

今天從Google Reader的Explore區域裏看到一個陌生人的網誌。其中一篇說:「目標是找個目標。」因而得到了啓發,尋找故事不也是一個故事麽?

by khc on Wed Aug 17 23:31:21 2011 Permlink
Tags: chinese
Older Posts