Wen

How and why I created Wen: Chinese Character practice.

Image of farmland between mountains on a foggy day.
The view from the train window.

On a train ride from Hangzhou to Guilin, China, I began writing a program to help learn Chinese characters. The idea is simple: present a character on the screen, with or without Pinyin, and the user will input the translation. The program presents a score at the end.

This original Python iteration uses dictionary files with comma-separated components: the Chinese character, the Pinyin with tone numbers, and the definition separated by forward slashes (“/”). An example would be:

零, li2ng, 0/zero

The program then splits up each section, replaces the tone numbers with diacritics (i.e. “líng”), and compares user input to each instance of the definitions. You can look at the code for this original command-line version here.

However, this is the year 2021, and users, including myself, expect an application like this to have a graphical interface, perhaps even over the web. I would even venture to say that some among us would even launch the program on their phones. Ask no more, the online, user-friendly version can be found here, and a live version is hosted here.

What began as a curious venture into the uncharted world of JavaScript, the aptly-named Wen Online is the culmination of my week-long journey of learning the language. Wen Online features state-of-the-art drop-down menus and bleeding-edge submit and review buttons.

Rendered in the beautiful default browser font, this program is lightning-fast and just sips data at 2-3 kilobytes per chapter (excluding the > 500 word cumulative exam, clocking in at a whopping 57 kilobytes).

All jokes aside, I have worked on larger projects, and for longer, but Wen has been the one I am most proud of. Chinese is a notoriously hard language to learn, and after studying for more than 5 years, I still have light-years to go. I personally use Wen multiple times per week, and have found it to work better for rote memorization than anything else, including flashcards. I think this is because of the need for input, further securing my memory through typing.

Frank

Author: Frank

I'm the senior software engineer, systems administrator, and Chief Security Officer at my apartment in Connecticut. I write about tech I make, or find interesting.