A journey of a thousand miles

千里之行,始于足下。

“A journey of a thousand miles begins with a single step.”

Chinese is an ancient language, and a lot of people have said a lot of things. Occasionally, someone says something brilliant, and people start repeating it. After enough repetitions, some of them become a 成语 (chéng yǔ) — roughly “fixed expressions” — and become a part of the language itself.

A chengyu is typically four characters long and taken from a longer piece of text. They usually make an astute observation about something specific. They are like idioms in English, only more concise and richer in context. With a little bit of explanation, even English speakers can enjoy their brilliance.

For good omens, let’s start with one that talks about beginnings.

Continue reading “A journey of a thousand miles”

More frustrating conversations with Google Home

Hey Google, start a 100-second timer.

1 minute and 40 seconds. And we're starting... now.

(about a minute later)
Hey Google, stop the timer.

All right, I cancelled it.

Hey Google, how much time was left on the timer?

It looks like you don't have any timer set at the moment.

Continue reading “More frustrating conversations with Google Home”

Frustrating conversations with Google Home

Hey Google, set a timer for 60 minutes.

Sure. 16 minutes. Starting now.

Hey Google. Not 16 minutes. 60 minutes.

Second timer, 1 hour. starting now.

Hey Google. Cancel the first timer.

You have two timers. A 16-minute one and a 1-hour one.
Which one do you want to cancel?

The 16-minute one.

Sure. The 16-minute timer. With 15 minutes and 27 seconds left.
Cancelled.

Continue reading “Frustrating conversations with Google Home”

Working With Chinese Text

Note: This post is not about Unicode.

Loosely speaking, most languages have some kind of an alphabet. The written word, roughly or precisely, spells out how the spoken word sounds. Some languages use a ~consonant-only script (e.g. Arabic); some languages use a script that spells out whole syllables at a time (e.g. Cherokee). They may not be “alphabets”, strictly speaking, but they all have a small set of symbols that make up the entire written language.

Designing a keyboard, then, is easy: make a key for each possible symbol. Maybe add a few dead keys (combination keys) for åcćeñtş. Voila.

That’s simply impossible for Chinese text. A high school graduate in China knows about 4,000 to 5,000 Chinese characters, and there are no easy ways to further break down a character. Clearly we can’t have a keyboard with 4,000 keys on it?

Continue reading “Working With Chinese Text”

“羊肉串”用英语怎么说?

答案:Lamb kebab。

Lamb我认识。啥是kebab?

英文中有很多词表示“串”。程序员熟悉的“字符串”,英文叫做string。一般用string表示串,重点在于“连续”,比如a string of questions 一串问题、a string of lies 一串谎言,若强行想成实物,一般回归本意,表示毛线、棉线等。

想要表达羊肉串中间那根棍,一般使用skewer。在图片搜索引擎上查skewer,出现的结果大多是串类食物或者竹签等。那,为什么羊肉串不叫lamb skewer?或者skewered lamb?

Continue reading ““羊肉串”用英语怎么说?”

PEMDAS is incomplete

Parentheses, Exponents, Multiplication, Division, Addition, Subtraction. Order of operations. 4th grade math.

Elsewhere in the world, parentheses are called brackets, and exponents could be called orders or indices. So depending on where you went to school, you might have learned BEDMAS, BODMAS, BIDMAS, or something similar.

Hang on — is it PEMDAS or BODMAS? Is it MD or DM?

Equal Precedence

My first bone to pick with PEMDAS (and the like) is that on the first glance, it’s six things, when it should only be four.

Continue reading “PEMDAS is incomplete”