Main

February 15, 2009

First things first: if you use version 20080728.280 of my AVIM extension, upgrade to version 20080728.306 now.

Last Friday, Adblock Plus developer Wladimir Palant refuted five typical excuses for calling the eval() function in JavaScript. I remembered that function well: take any string, pass it into eval(), and the string gets executed as though it were ordinary code. When I took Stanford’s hacking class last spring, we developed an exploit that targeted a fictitious website’s generous use of the function. eval() is the most easily abused function available to JavaScripters, because it’s such a tantalizing shortcut. Why bother learning DOM Level 3 when you can call one function and move on?

Were you to conduct a comprehensive survey of computer programmers, I’d suspect that nearly all of us would rate ourselves “above average” programmers who keep particularly good best practices in mind at all times. Like, to avoid eval() at all costs. But I called that function – once – and Wladimir caught me.

Continue reading "Wrong" »

December 9, 2008

In July, when I last wrote about AVIM, it was a Firefox extension that let you easily enter fully-accented Vietnamese into any webpage, as well as most of Firefox. It also supported a few well-known Firefox extensions.

Since then, AVIM has gained French and Chinese localizations and added support for all of Firefox. More importantly, the extension now supports a number of Mozilla-based applications, including Songbird and Flock. AVIM’s also been downloaded nearly 30,000 times and serves over 1,700 people as of last month.

Mozilla Messaging today released the first beta of Thunderbird 3. Since it runs on Mozilla 1.9, AVIM supports it too. It’s a boon for Vietnamese speakers who still use a desktop application for reading e-mail and news feeds.

You can download AVIM for free and drag the file into Thunderbird’s Add-ons window. Alternatively, you can use Thunderbird 3’s new Add-ons Manager to install an older version of AVIM hosted by Mozilla.

One thing you’ll notice about AVIM is that, even though the extension is intended for Vietnamese speakers, the extension’s menus aren’t necessarily in Vietnamese. If your copy of Thunderbird is in English, for example, AVIM is also in English. That’s because I designed the extension to blend in with the application as much as possible.

Unfortunately, efforts to translate Thunderbird into Vietnamese aren’t complete yet. In the meantime, you can force AVIM to display in Vietnamese anyways. Regardless of AVIM’s interface language, the extension will continue allowing you to type in Vietnamese.

You might’ve noticed that AVIM is essentially in maintenance mode. I’ve implemented all the big changes I have planned, and I really don’t have much time to work on the software in the near future. However, you’ll continue to see AVIM support more and more applications as they upgrade to Mozilla 1.9. Someday, I’ll get around to writing an operating system–level IME, so you’ll get AVIM’s well-known flexibility no matter which application you’re using. Someday.

As always, I welcome any contributions to the AVIM project, whether in the form of code or translations, or by spreading the word. Working on AVIM’s code require little more than a working knowledge of JavaScript and Vietnamese. For any code or translation contributions, you’ll receive due credit on a widely-used piece of software and the satisfaction that you’ve helped real people in a measurable way. If you’d like to help out, please contact me.

July 5, 2008

Vietnamese computing is a very fragmented experience. Not only are there several character encodings for Vietnamese, but Vietnamese computer users must also choose between several popular input methods. As you’ll recall from November, an input method is a procedure for typing in a complex, often non-alphabetic writing system. An input method editor (IME) is software that intercepts your keystrokes and translates them into more complex characters, such as Chinese characters, on the fly. Today’s major operating systems provide IME for most complex writing systems, notably Chinese and Japanese.

Vietnamese is alphabetic, unlike Chinese, but because of its large set of letter–diacritical mark combinations, it’s impractical to simply assign each key to a letter or accented letter, as with French or Spanish. Making matters worse, operating systems have historically provided poor support for Vietnamese input. Microsoft Windows and Mac OS X (until 10.5 Leopard) don’t include an IME for Vietnamese, so each Vietnamese-language website is expected to embed one using JavaScript. Webpages, ordinarily the least powerful of computing technologies, thus end up implementing one of the operating system’s core responsibilities: text input. Predictably, there are at least a dozen such IMEs, and each site uses a different one.

It’s a situation no one likes, but it’s not easy to convince operating system vendors to ship good support for Vietnamese, since the market for it is still relatively small. As a stop-gap solution, three of these IME’s authors have released Firefox extensions that provide Vietnamese typing support on any webpage within the browser. Since the Web browser is pretty much the application that users keep open all day, it’s not an entirely bad solution.

Back in November, I released a keyboard layout for Vietnamese, to improve the Vietnamese typing situation on the Mac. Although the keyboard layout provided support for every application on the system, it was far from ideal, because very few Vietnamese speakers use Mac OS X. Now I finally have a way to show non-Mac users some input method love too.

In 2006, I made a number of modifications to one of the IME extensions, Hiếu Đặng’s AVIM extension. However, because the original extension was a kludge and I didn’t yet consider my version to be of release quality, I hung onto the modifications for nearly two years. Recently, I briefly encountered a curious phenomenon known as free time and began shaping AVIM into a much more presentable extension.

AVIM for Firefox

Since it was introduced to the Vietnamese Wikipedia in 2005, AVIM has turned a very poor editing experience into a pleasant one. My productivity at the site increased dramatically, as I could begin to write and edit articles from directly within the site, rather than copy-pasting my composed text from another program. I hope that this extension will give you the same dramatic increase in productivity, no matter what site you frequent.


  1. Wrong
  2. AVIM not just for Firefox
  3. AVIM for Firefox
  4. Almost done
  5. Catching up
  6. Misplaced zeal
  7. DevEdge is coming back!
  8. Here’s a cupholder