Thursday, April 29, 2010

Recommend Books to learn Mandarin

I've got a pile of books, but only two have been useful so far:
  • Mandarin Chinese phrasebook & dictionary (pocket book from Berlitz)
  • Reading & Writing Chinese, Simplified Character edition (William McNaughton, Tuttle Language Library

Recommend websites to learn Mandarin



Trying to learn Mandarin without knowing Pinyin is like trying to learn English without knowing the alphabet. Start here to get the basics.

MDBG Chinese-English Dictionary

The word dictionary "Look up all chinese words in a text" is particularly powerful and produces beautiful results. It also has facilities to create your own quiz.


This works great to annotate entire article as you can provide a URL.


Really great and well made videos... Check out "Lesson #1: Vegetables" and go from there. I thought I would go crazy with the same music track over and over but I didn't so you should be safe!


Good article to read before embarking on the adventure... From it:
I have seen highly literate Chinese people forget how to write certain characters in common words like "tin can", "knee", "screwdriver", "snap" (as in "to snap one's fingers"), "elbow", "ginger", "cushion", "firecracker", and so on.
It really is true; I've tested those words on my Taiwanese born wife and she wasn't able to write down a single one...

One point to think about however before giving up: I think with the advent of various supporting software and portable computing devices such as Android mobile phones with on board translation software it is becoming increasingly feasible to learn Mandarin in a "reasonable" amount of time.

Writing Chinese characters with pinyin, auto-translating text and the ability to look up instantly every word in a text removes some of the barriers of learning Chinese. This means you should "cheat" your way to learning Chinese at every opportunity.

Otherwise, yeah, learning Chinese is definitely one of the crazier adventure someone can embark in!

Recommended PC software to learn Mandarin


Flashcards on steroids with pictures and audio. It keeps track of "stale items" and makes you review them based on how much trouble you had remembering them in the first place.

What I don't like is that it won't take inputs from the Microsoft IME as-is right now in my copy of Windows 7 but apart from that it's great.

The 13 free flashcards decks will take about 25 hours to master so I would recommend starting with those before buying the full version.


MDBG Chinese Reader is a PC client version of the very useful MDBG website (or is it the other way around?). When it hovers over Chinese characters it shows up you instant definitions and romanization. Another trial software, but very well made and I'm tempted to buy the full license as I'm relying it more and more.

Rosetta Stone

If you can afford it, I think it's an environment that works very well and is very complete. I love the fact that it's web based! I've had access to a license at work for a while and I'm looking forward to find an affordable license again...


Recommended Android Software to learn Mandarin

I personally use these everyday as I'm learning Mandarin/Chinese on my Motorola Droid.

Search for these on Android Market:

Google Pinyin

This is an IME, so once installed you need to enable it in Language & keyboard. Long press a text field to select it. Use ctrl-space to switch between Chinese and English, which makes the Android default keyboard unnecessary (except if you need to input a third language...).

Very smooth, easy pinyin input with good suggestions and clear, readable fonts.

Google Translate

Although complex sentences translation is generally poor, the interface is quick and fun to use with a tons of little features (such as copy to clipboard on tap, voice recognition, suggested translations, romanization, pronunciation, etc)

Hanping Ch-En

Great to look up individual words and star them offline (example: if you're travelling to Taiwan or China...). Much more reliable definitions than Google Translate since it is based on the well-known CE-DICT dictionary. Buy the Pro version, worth the (small) price of admission.

MortPlayer

Great to play audio books (such as the Pimsleur audio books). It also helps keeping your audio books apart from your music player.

Sunday, March 14, 2010

List of English words I can't pronounce...

Partly because I've learned English by reading and partly because of my French native tongue, I have enormous problems correctly pronouncing some words - especially those with a th sound

I'll update as I'm reminded of those I can't say correctly:
  • threaten
  • three/tree
  • earth
  • analytics

Friday, March 5, 2010

O Canada!

This is Canada. This is Canadian culture. Rick Mercer is Canada. Or at least Anglo-Canada, as I bet very few French-Canadians would know about Rick Mercer.

But they should, as all should you: funny but also deeply opiniated, Rick Mercer is at ease interviewing anyone. Manitoba trappers, roller derby players in Montreal, the prime minister and the fantastically interesting mayor of Mississauga - everyone gets the treatment but usually comes out more human, more Canadian.

A must-see, must-subscribe and must-follow kind of show for the Canadian expats and those who want a funny but informative outlook on Canada. Based on the very low view count, this is an unrecognized show...

in reference to: http://www.youtube.com/user/MercerReport (view on Google Sidewiki)

Monday, March 1, 2010

Intel VTune tools are broken on Windows 7 64-bit

If you want to profile C++ executables on Windows 7 64-bit with an Intel CPU, don't bother downloading Intel VTune or Intel Thread Checker or Intel Profiler (AFAIK, all the same thing) - they all crash as of these versions:

"Intel(R) VTune(TM) Performance Analyzer 9.1 Build:385" and
"Intel® Thread Profiler 3.1 Build:0.27583"

...with this uninformative error message:

SERA_Set_Platform_environment() Failed

For those like me having the same problems who are still looking for a free profiler that works and can't wait for Intel to fix VTune, check out AMD's CodeAnalyst.

And yes, the time-based profiling for this AMD product works for an Intel CPU (i5 in my case) on Windows 7 64-bit as I've just confirmed... and the download size is a fraction of VTune. You can also see this blog post if you don't believe me!

In CodeAnalyst, you can get functions level percentage by clicking your application process cpu usage bar in the system graph - it will then open a separate tab with function level samples.

Interesting that the trial software from a big company like Intel doesn't work as well as a free (as in beer) software from a company one tenth the size. The fact that Microsoft can't be bothered to provide such a basic development functionality except in their very costly Visual C++ premium edition is unforgivable... Doesn't Microsoft want to show off the fastest apps on their platform?

Note also how much of a pain and expenses are involved in profiling on win32 compared to apt-get'ing gprof and running that on any Linux box!

It's frustrating to have to go through registration screens, Internet Explorer specific sites and a few hundreds megabytes download to discover these facts...

Tuesday, February 23, 2010

Need privacy? Use Enigmail!

  • Do you want to send love letters that only your spouse should be able to read?
  • Do you want to make sure that emails you received are indeed sent by the person it is supposed to come from (and not some impersonator)?
  • Do you want to store confidential information at an untrusted location (on a network drive for example) without anyone else having access to that information?
  • Do you want to exchange sensitive information such as passwords, personally identifying information or proprietary secrets?
  • Do you want to limit the ability of hostile party to impersonate you electronically?
...then you need PGP (Pretty Good Privacy)!

First, a quick explanation of why PGP encryption is so interesting:

PGP, based on principles of public-key crytography, is a way to hide messages using a private (or secret) "key". The "hidden" (or encrypted) message can only be then returned to its original form using the public key. The reverse is also true: a message transformed by the public key can only be read by the private key.

That has all sorts of really interesting and sophisticated applications but two stand out:

First, you can digitally sign data by encrypting the result of a computation uniquely representing the data with your private key. Since only the public key can open that result, this can be used to prove that the data received matches the data sent.

Second is to create and send a message that can only be read by the person receiving it by using that recipient public key.

An email client to securely exchange email is a great start to add more privacy to your life. Best way to go about sending encrypted email is a combination of the following set of software, all OpenSource, free and cross-platform:
There are other tools, such as gpg4win, that will give you additional feature but they all use GnuPG.

BTW, on Windows installing gpg4win also installs GnuPG. The equivalent on Mac is MacPG. On Linux, these tools are generally all part of the distribution (look for Seahorse on Gnome for example).

Also note that Enigmail can be installed from inside Thunderbird by using Tools > Addons.

I'd also like to add that configuring Thunderbird 3 with Gmail is actually very easy; as soon as you enter your email as being @gmail.com, it sets the correct settings. In addition, everything is kept on the gmail IMAP server.

The Enigmail documentation is very good (better than what I wrote above!) and has an example that you can practice with.

Don't forget that when you send an email out you want to encrypt it with your recipient public key so that he can read the message.

When sending an email to someone that has a public key, make sure you've correctly imported the person's key here:

OpenPGP > Key Management > Display All Keys by Default

You can retrieve keys through the key servers:

OpenPGP > Key Management > Key server > Search for keys

However, make sure you exchange and verify the fingerprint for your keys through a secure channel to ensure you've got the correct key!

I would also recommend change the setting to use email addresses to decide intelligently which key to use (just make sure you verify that the key fingerprints you import indeed match the peer they are supposed to represent!)

OpenPGP > Preferences > Key selection > By email addresses

In Thunderbird, don't forget to save your drafts locally, and not on the server, otherwise there is a danger you would store your sensitive message as clear-text in the cloud:

Tools > Account Settings > Copies & Folders > Keep message drafts

I would also suggest disabling automatic decryption as you don't want to accidentally have someone see your encrypted emails over your shoulder:

OpenPGP > Automatically Decrypt/Verify messages

Use the menu option instead:

OpenPGP > Decrypt/Verify

A few things to remember:
  • be generous with your public key; you can and want to share it with everyone and distribute it through any public servers
  • be very protective of your private key: although this is itself encrypted with a key phrase, losing or exposing it to untrusted software should be prevented
  • don't lose it: your public/private key pair should become a way to enforce your identity
  • one weak point in all this is the software you use to manage and use your keys; be sure you trust the source and where you got it from!
Some settings that might satiate your extra paranoia:

Don't store emails locally where they are vulnerable to getting stolen:

File > Offline > Offline Settings > Message Synchronizing

Don't send emails with subjects:

OpenPGP > Preferences > Sending > Don't warn about subject line

Don't add more information on your setup than you should:

OpenPGP > Preferences > Advanced > Add Enigmail comment in OpenPGP signature

Use the Web of Trust (key signing parties!) by unchecking:

OpenPGP > Preferences > Sending > Always trust people's key