Archive for December, 2005

What’s in a name

“What’s in a name? That which we call a rose by any other word would smell as sweet.” So says Juliet in Shakespeare’s Romeo and Juliet.

Actually, in many parts of the world, people’s names are used and written in a way that probably could surprise Shakespeare. Allow me to explain from my own Chinese perspective:)

In China, Japan, Korea, and probably Vietnam, the terms last name and first name can be confusing, as they are not synonymous with given name and surname used in the West. In these countries, people use surname first, followed by his/her given name. So when somebody in China calls me, s/he would call me Ji Haidong, not Haidong Ji, because Ji is my surname and Haidong is my given name.

Chinese names usually are composed of 3 Chinese characters. Surname, in most cases, is just one character, whereas given name usually has 1 or 2 characters, with 2-character given name probably more common. Given name almost never has more than 2 characters. In my case, my given name is 海东.

Sometimes the first character of the given name indicates the generation of the person. This is more true in older times and is rarely practiced nowadays, probably only in rural or remote areas. If I were named that way, the first character of my given name would have been Guang 广, not Hai 海.

In translating names to English, different countries have different conventions, although they are not strictly enforced. Most Chinese names are translated into English following the English convention, given name first, followed by surname. My name is translated that way. However, sometimes famous people get different treatment;) Yao Ming is a good example. Yao is his surname. Ming is his given name. Mao Zedong is another example.

Mainland China translates names into English using the Pinyin system. (I think Taiwan, Hong Kong, Singapore, and other Chinese speaking regions are probably doing the same now. They used a different system or systems before.) If a given name has more than one Chinese character, the translation of the characters will be combined to form one word. In my case, Haidong is actually the combination of Hai 海 and Dong 东.

Chinese women don’t change their last names to their husbands’ after marriage. Children usually use their father’s surname.

I believe Korean names generally follow the same rule. But it appears that when translating into English, the surname is still placed in the front, unlike Chinese name translations. For example, my personal favorite dictator is called Kim Jong Il. It is only fitting since he is such a sick person;) And South Korean president is named Roh Moo-Hyun in English publications. I could be wrong on this, because once again, famous people may get a different treatment.

Japanese names are usually written in kanji (Chinese characters). Like Chinese and Korean names, surname comes first. Based on my experience, the length, in terms of how many Chinese character it has, can vary quite a bit, usually from 3 to 5 characters.

I am not sure how a Japanese name gets translated into English. But I suspect the given name is placed first.

My name certainly sounds strange in the west. My last name is also kind of strange in China. It is not a common surname. That will give you an idea how special I am;)

Comments (26)

Playing with FeedBurner

I registered my site on FeedBurner in late November, but never took the time to make it working properly.

The gist of making it work is redirection. To accomplish that, you will need to modify .htaccess file in Apache. I came across a WordPress FeedBurner plugin, which helped me generating the proper .htaccess code. If you have http 500 error, most likely the redirect is doing a recursive lookup. Fix the original feed source in the FeedBurner should fix the problem.

So now the new feed should be alive and working. Please let me know if you have any problems. Your comments are always welcome.

Comments

Rename sa

With SQL Server 2005, you can rename your logins, including sa. To me, this is a HUGE security enhancement.

For mixed security environments, many Sql Server attacks take advantage of the sa account, either by brute-force or dictionary attacks. I highly recommend you to rename sa to something that is discreet to minimize attack surface for your environment. Do not rename it to something cute, that will attract attention. Choose something that is bland and boring, and make it consistent on all servers you manage.

I’ve tested this on my test machine, and it worked great for me:

alter login sa with name = BobSmith

After this, if you browse for sa within SSMS, it is gone. In its place, it is BobSmith instead. This account may be disabled because of the alter statement. You can easily change the status if it is the case. As with previous editions of Sql Server, the login is not case-senstive, however, the password is.

Comments (1)

Geocaching fun

It has been almost a year since we started geocaching. So I will write something for rememberence.

Geocaching is a modern day treasure hunt. People will hide things outdoors, usually in a forest preserve, a park, a place of historical importance or genereal interest. They will then publish the gps coordinates online. You, as a player, will punch that coordinate into your gps device and go find it. People usually hide children’s toys or other trickets, and a log book.

It’s not as easy as it sounds. For one, the gps device can be as accurate as within about 5 meters radius, that’s probably the best you can get. It will be worse if you don’t have a clear view of the sky. For another, since the cache is outdoors, you will get the challenge of looking for something in nature.

This is a great game to bring people outdoors. You will need a gps device to play.

I became interested in geocaching after reading some news stories about it last year (2004) before Christmas. I like the outdoors and I am also kind of geeky. So this sounds like a perfect hobby for me. I just needed an excuse to justify spending around 120 bucks for the Garmin eTrex. What a better excuse than presenting the eTrex as a Christmas gift to my love?

Alas, that was not meant to be;-) My better half, being an intelligent lass as she is, quickly realized my scheme. She has “threatened” several times ever since that she would buy a baking machine for my birthday;-)

But, truth be told, after a few months of geocaching, we (including Maria, I hope) are totally hooked. It’s such a relaxing experience to walk outdoors and explore what nature has to offer. Together with our 5 year old son, we’ve found around 51 caches so far. We’ve cached in Illinois, Wisconsin, Arizona, and Sweden so far.

Comments (3)

Failed nbsmtp compile and some Linux and RPM tips

Earlier, I talked about my failed attempt to comiple and install msmtp.

I tried to install and compile nbsmtp, and got similar results. Googling revealed that many people would suggest install things from an RPM package.

So I searched around and found a msmtp package for Suse, but my web host is on RedHat. I decided to give it a shot anyway. By the way, to get a quick idea of the version and vendor of your Linux/Unix, you can use:

uname -a

Before you install an RPM package, it is a good idea to do a test first to find out potential dependency issues. Use this command to do it:

rpm -i PackageName –test

In my case, when I tested the msmtp package for Suse on this Redhat machine, this is what I got:

rpm -i msmtp-1.4.1-1.guru.suse100.i686.rpm –test
warning: msmtp-1.4.1-1.guru.suse100.i686.rpm: V3 DSA signature: NOKEY, key ID 58857177
error: Failed dependencies:
libcrypto.so.0.9.7 is needed by msmtp-1.4.1-1.guru.suse100
libc.so.6(GLIBC_2.3.4) is needed by msmtp-1.4.1-1.guru.suse100
libssl.so.0.9.7 is needed by msmtp-1.4.1-1.guru.suse100

Oh well, the search, and the learning, contunues…

Comments (1)

Generate Oracle objects DDL using dbms_metadata.get_ddl

Since Oracle 9i, Oracle added a new utility called dbms_metadata.get_ddl. This utility provides you with object DDL generated out of Oracle Data Dictionary. It is extremely handy and useful.

For example, you can use:

set long 500000
select dbms_metadata.get_ddl(’TABLESPACE’,'TablespaceName’) from dual;

to get a particular tablespace’s DDL. You can also use it for users, role, and other objects.

To get a table’s DDL, use:

set long 500000
select dbms_metadata.get_ddl(’TABLE’,'TableName’,'SchemaName’) from dual;

Thanks to a fellow DBA for this great tip. You know who you are:)

Comments

It’s a funny feeling

I normally read books on my train ride to and from work. Today I brought my book to Chipotle on Lake and Franklin. And read it after a Fajita Steak Burrito.

The book I am reading is in Chinese. It is a memoir of Li Ao, a very unique writer, commentator, legislator, and TV personality in Taiwan that I borrowed from Chicago Public Library. Li Ao has been a political prisoner twice in Taiwan, but that didn’t seem to change him. He is funny, self-assured (some would call boastful), and full of interesting ideas. And he is a great writer. I don’t agree with him all the time, but his writing is entertaining and provides me with some history lessons on Taiwan after the civil war in 1949.

In the 20 or so pages I read during lunch hour, he talked about the different perspectives he gained as a prisoner on time, space, friends, enemy, and women. I was so engrossed in it that when it was time to leave, the first thought came to my mind was: where am I and why do people around me speak English? It lasted probably for a few milliseconds, but it still amused me a bit. It almost felt like I am still in China, and my more-than-10-years life in the US never happened. I guess reading can truly bring you to a different world:)

I think I will always bring a book to lunch from now on;) I will write my Chinese reading in a future post.

Comments

msmtp compile and install

This is kind of my own Linux admin study notes. Like most of my other posts, it can be dry and boring;)

In an earlier post, I talked about my desire to compile Mutt and use it as my primary email client. Note there is a little more information on the comment section.

Things have changed a bit. Now my host server has been transferred to a new machine after I complained many, many times; and my site has been more stable since. So I am ok with it, for now.

I also discovered that Mutt is available on this machine. So is fetchmail and procmail. I configured fetchmail and procmail successfully to get my gmail. More tweaking is still needed, since all mail messages are dumped into one big file (no inbox, outbox, draft files, etc.), but I can at least read my gmail using Mutt. Judging from my limited experience with it, I do like Mutt. I think it is a great tool that can enhance productivity immensely. Together with vi, they are a great combo. Note to myself, I also need to do research on telling mutt to use lynx as the html reader, since a lot of emails these days are in html.

But I need a smtp client to send gmail. None of the common smtp clients, such as postfix, pine, sendmail, are available on this machine. Also, the fact I am not root complicate things.

Some Googling revealed that msmtp is a popular smtp client with TLS/SSL capabilities. As I mentioned earlier, I don’t have root to my web host server, I decided to compile and install it on my own test box as a regular user to gain experience, before I make an attempt on the web host.

On my own test box:
1. useradd haidong –Create regular user haidong
2. passwd haidong –Give haidong a password
3. su haidong
4. ./configure –prefix=$HOME/msmtp –Avoid /usr/bin, /usr/local/bin, and such
5. ./configure successful
6. make, make successful
7. make install, make install successful

Cool, it worked on my test box, which has Fedora Core 2. One funny observation is that there is a de folder in the locale directory. I guess the main writer of msmtp must be from a German-speaking region.

All right, now I am ready to try it on my web host. And it failed at the ./configure:( The message is
configure: error: C preprocessor “/lib/cpp” fails sanity check
See `config.log’ for more details.

I looked at config.log. It appears to be some kind of preprocessor error, stemmed probably from an older version of gcc on this box. I am not very proficient at C/C++ programming (my next big learning goal), so I will have to give up msmtp on this box, for now.

On to nbsmtp, another smtp client with TLS/SSL support. I suspect the results will be the same, but I don’t know for sure unless I roll up my sleeves and do it. Will report back after I am done.

Comments (1)

Use USB Flash Drive on Linux

In Linux, any disk drive has to be mounted first before you can use it. That actually is true for Windows also. But Windows shields a lot of that away from a regular user. Unlike Windows, there is no A: or D: drives for you to go directly in Linux, although I’ve heard that some versions of gnome or kde can do similar things.

With the popularity of USB flash drives, I thought it would be helpful to show how you can mount a USB flash drive on Linux command line to a lot of Windows users who are transitioning to Linux, or need to use Windows occasionally. My way may not be the best way but it has worked for me on my Linux machine. Let’s get to it:

0. Plug in the flash drive;
1. su as root, if you are not root already;
2. mount /dev/sda1 /mnt
3. cd /mnt to access the USB drive;
4. umount /dev/sda1 when you are done.

Comments

Don’t judge a book by its cover

I learned the phrase “Don’t judge a book by its cover” from videos of a popular children’s story series, Thomas the Tank Engine. My son has grown out of it now but he was really into it 2 and 3 years ago. If you live in an English-speaking country and have small children at home, you will probably know what I am talking about;) In one story, Thomas saw Terrence the Tractor plowing through a field. And he started laughing at him because Terrence has the funny looking caterpillar wheels. Terrence proved that his wheels are useful and Thomas learned a valuable lesson from it. In the song after the story, the choir sing:

Don’t judge a book by its cover
Don’t make your mind up too soon
Things aren’t necessarily
Always what they appear to be
Don’t judge a book by its cover
Don’t make your mind up too soon
Never, never, never, never, never, never, never, never
Never judge a book by its cover

That’s a great lesson for children and adults alike. If we could all follow it, the world will be a better place. But I digress, and I am not writing just to tell you this story, because for non-Western language books, sometimes you are not even sure if you are looking at the front or back cover of a book.

Let me use Chinese as an example, since it is my native language:)

Before the communists took over mainland China in 1949, all Chinese books, magazines, and newspapers were printed vertically starting at the right hand side of the page. In addition, looking at the front cover, the spine of the book should be on the right hand side. For a Western reader, the usual front cover is actually the back cover, and the usual back cover should be the front cover. And you sort of read the book backwards, if you will, top to bottom, right to left. Are you still with me?:)

After the liberation (mainland lingo for communists taking over) in 1949, or maybe even a few years after that, the mainland government reformed that practice. Now all mainland publications are printed in a way consistent with Western publications. Horizontally, left to right, the spine of the book is at your left hand side when you look at the front cover. The traditional way is only practiced in very rare circumstances, for example, calligraphy, Chinese New Year’s couplets (The 2 rhythmic sentences that are posted at both sides of the front door, written with blank ink on red paper).

The Nationalist lost the civil war and stayed in Taiwan. All publications are still printed the traditional way on that island. In addition, traditional Chinese are used there, whereas simplified Chinese are used in mainland. Maybe I will write a separate blog on that.

Since I grown up in mainland China, I found it awkward initially to read books printed the traditional way. However, I live in the Chicago area now, so Chinese books are in short supply. The Chicago Public Library has some collections of Chinese books, about half of them are from publishes in Taiwan, so I have started reading quite a few of them. After awhile, I am used to it. Like all habits, it is acquired and it is useless to say which way is better.

I am not sure how other Chinese speaking regions do printing, such as Hong Kong and Singapore. Probably they are just like mainland?

Japanese and Korean were heavily influenced by Chinese a while ago, but have undergone pretty big changes since then. But I have a feeling that they still print things the traditional way. I could be wrong though.

I also heard that Arabic and Hebrew printing is somewhat similar. I have zero knowledge of those languages.

By the way, children’s books are helpful to a non-native English speaker like me. I actually learned a few words that I didn’t know and find the big picture books helpful;)

Comments (4)

· « Previous entries