Archive for Other

Getting closer to the elements

Well, after talking about it, I finally put my feet where the pedals were, and biked to work today.

IMG_0233
My Novara, the front facing one.

My original plan was to find time riding in on a weekend for some field research. But with the move, house painting (where my wife did most of the work), teaching my son Chinese, my son’s baseball, and other family activities, I couldn’t find the time. This morning I woke up a bit after 5 and decided, what the hell, might as well take it all the way today!

It was not bad at all. In fact, I enjoyed the whole thing. Going in: total distance 14.69km, average speed 18.60km/hr, peak speed 25.13km/hr, total time 47 minutes. Coming back: total distance 14.29km, average speed 18.35km/hr, peak speed 27.93km/hr, total time 46 minutes. Thanks Liz for riding with me on the way back. It’s nice to have a partner returning with you, with more people milling out and about than in the morning.

Well, I went to work without shaving, breakfast and shower. Not that I am set out to win a bushy beard competition or anything like that. While I am at it, I gave up on hairy chest competition long time ago. I’ve got to say, it’s not bad. I was a bit tired in the early afternoon. A quick snack of a banana and cheese stick provided enough fuel on the way back. I did save up a set of toothbrush and toothpaste at work. It’s good to brush after lunch anyway.

I am really excited and look forward to do more of it! Time to bed. Early to bed and early to rise makes a man healthy, wealthy, and wise. 早睡早起身体好!

Comments

Biking to work

Finally we have storage for bikes! Now we each have one. I’ve been biking with my son after work. It is really a lot of fun and great exercise.

Industrial revolution, urbanization and urban sprawl, and information age combined have made many of us living a sedentary lifestyle. I know I currently don’t have enough physical activity: like now I am sitting in front of a freaking computer typing away. 呜呼唉哉!长此下去,人将不人,成何体统?So I am seriously thinking about biking to work.

The biking distance is a little over 9 miles, one way, which makes around 30 kilometers in total both ways, very much doable, I think. I’ve been gathering information on the web, but if you have tips, site recommendations, or better yet, routes from around North Ave., Division, Ridgeland area to downtown Chicago, I’d love to hear them. Thanks!

If I have time this weekend, I plan to bike to downtown just to try it out and see how long it takes and how I feel. We’ll see what happens.

Comments (4)

Name wiki participation guide

Despite the underwhelming response to my wiki site for Chinese and foreign name translation, I went ahead and created a participation guide. Chinese version of this guide will be published soon. This article looks better here, due to the wiki syntax embedded.

Thanks.

==== How to participate ====
=== Quick start ===
Search for “**Please enter here**” in the search box, located in the left side of the page, below the navigation bar. Follow one of many links, then click “**Edit this page**”, replace “**Please enter here**” with information you know, click “**Preview**” to verify. Once you are satisfied, click “**Save**”. That’s all there is to it.

For example, if you know how to write Afghanistan in simplified Chinese, you can put that into the corresponding location by editing this page:
http://www.haidongji.com/wiki/doku.php?id=places:f2c:master

Do this for a few entries in person’s names, places’ names, and other object’s names, then come back to read the section below. That can probably give you a good feel of how things are organized. Hopefully you find this a worthy endeavor than following some people’s Facebook status or tweets!

=== Scan through Wiki syntax page ===
Once you’ve gone through some changes mentioned above, reading through wiki syntax will make more sense. Fortunately, it is a quick read, short and sweet.

http://www.dokuwiki.org/syntax?do=show

On this wiki we use a lot of tables and shorthand links to Wikipedia. So it pays to know that well.

=== Structure and naming convention ===
As you can see on the left side of the web page, this site is divided into 3 sections: person’s names, place’s names, and other object’s names. Each of those 3 sections is further divided into 2 sections: foreign to Chinese (f2c) and Chinese to foreign (c2f). Using the technical jargon, persons, places, objects, f2c, and c2f are all called namespaces in DokuWiki.

Person and place names are self-explanatory. As to other objects, this category is reserved for everything else that does not fall into person and place category. For example, university names, movie/song/book titles, drinks, and things like that.

Each section has an entry page. Written in wiki syntax, they are
[[Persons:PersonsMaster|Person's Name]]
[[Places:PlacesMaster|Place's Name]]
[[Objects:ObjectsMaster|Object's Name]]

Each name entry is a row in a table. For foreign names to Chinese, the header of the table looks like this:
^Name^Mainland Simplified^Mainland Traditional^Taiwan Simplified^Taiwan Traditional^Hong Kong Simplified^Hong Kong Traditional^

In wiki syntax, it is:

^Name^Mainland Simplified^Mainland Traditional^Taiwan Simplified^Taiwan Traditional^Hong Kong Simplified^Hong Kong Traditional^

For Chinese names to foreign languages, here is what the header looks like:
^ Simplified ^ Traditional ^ Pinyin ^ Wade-Giles^

Once again, in wiki syntax, it is:

^ Simplified ^ Traditional ^ Pinyin ^ Wade-Giles^

For each record, we put links to the English Wikipedia entry behind the foreign name, and links to the Chinese Wikipedia entry behind the Chinese name. For example, in
[[persons:f2c:master]]
we have this entry for Vinegar Joe, General Joseph Stilwell:
|[[wp>Joseph Stilwell]]|[[http://zh.wikipedia.org/wiki/%E7%BA%A6%E7%91%9F%E5%A4%AB%C2%B7%E5%8F%B2%E8%BF%AA%E5%A8%81|史迪威]]|Please enter here|Please enter here|Please enter here|Please enter here|Please enter here|

Below is an example of c2f, Chinese to foreign:
|[[http://zh.wikipedia.org/wiki/%E9%82%93%E5%B0%8F%E5%B9%B3|邓小平]]|鄧小平|[[wp>Deng Xiaoping]]|Please enter here|

Notice the shorthand to the English Wikipedia entry:
[[wp>Deng Xiaoping]]
It works pretty well.

Note that I’ve found in some cases Baidu Baike and other Chinese wiki sites has more content than the Chinese Wikipedia entry. In that case, I put the link to the Baidu Baike page.

=== Examples ===
Adding a new person’s name
Suppose you’ve come across 17th century German missionary Johann Adam Schall von Bell (thanks bezdomny), who was appointed a ministry level position in Shunzhi era during Qing dynasty, you can simply append a record into the table in [[persons:f2c:master]], like so:
|[[wp>Johann Adam Schall von Bell]]|[[http://zh.wikipedia.org/wiki/%E7%BA%A6%E7%91%9F%E5%A4%AB%C2%B7%E5%8F%B2%E8%BF%AA%E5%A8%81|汤若望]]|湯若望|汤若望|湯若望|汤若望|湯若望|

This is actually an interesting example, in that there are additional reference data for him in the German Wikipedia, see reference section. I am still thinking what is the best way to point that out to a reader, perhaps in a footnote.

Creating a new page
Suppose you want to create a page for university names. This obviously falls into the object category. So you would create two pages: one for c2f, another for f2c. Here is how to do it:

First, go to http://www.haidongji.com/wiki/doku.php?id=objects:f2c:master and add a line like below and then save the page:
[[objects:f2c:university|University names]]
This page will be for foreign university name’s Chinese translation.

Second, after the page is saved, its link will be in red, indicating the page has not been created yet. Click on the link will leads you to page creation. Follow the same table format for persons and places.

Similarly, create a similar page for Chinese university names. This time create a link in http://www.haidongji.com/wiki/doku.php?id=objects:c2f:master, like so:
[[objects:f2c:university|University names]]

=== Keep track of wiki change ===
Subscribe this feed in your RSS reader:
http://www.haidongji.com/wiki/

Comments (1)

Quick notes for DokuWiki

Notes from tonight’s playing with DokuWiki. Initially saved it as a text file, then thought, what the hell, it might benefit somebody.

1. Got DokuWiki. Learned this from my buddy Baron, who I admire and whose recommendations I take seriously.

2. Fired up ami-23b6534a, an Amazon virtual instance with Apache pre-configured.
/var/www/html is the web root directory, fairly common.
use this code snippet to find out user and group that Apache httpd runs under:

< ?php

if(function_exists('posix_geteuid')){
    // use posix to get current uid and gid
    $uid   = posix_geteuid();
    $usr   = posix_getpwuid($uid);
    $user  = $usr['name'];
    $gid   = posix_getegid();
    $grp   = posix_getgrgid($gid);
    $group = $grp['name'];
}else{
    // try to create a file and read it's ids
    $tmp = tempnam ('/tmp', 'check');
    $uid = fileowner($tmp);
    $gid = filegroup($tmp);

    // try to run ls on it
    $out = `ls -l $tmp`;
    $lst = explode(' ',$out);
    $user  = $lst[2];
    $group = $lst[3];
    unlink($tmp);
}

echo "Your PHP process seems to run with the UID $uid ($user) and the GID $gid ($group)\n"; ?>

Or phpinfo, which is a bit too much data.

3. Downloaded DokuWiki and expanded it, and put it under the web root directory.

4. Permission stuff.

chmod 775 conf/
chgrp apache conf/
chgrp apache data/
chmod 775 data/
chmod 775 data/pages/
chgrp apache data/pages/
chmod 775 data/attic/
chgrp apache data/attic/
chgrp apache data/media/
chmod 775 data/media/
chmod 775 data/meta/
chgrp apache data/meta/
chgrp apache data/cache/
chmod 775 data/cache/
chmod 775 data/locks/
chgrp apache data/locks/
chgrp apache data/index/
chmod 775 data/index/
chmod 775 data/tmp/
chgrp apache data/tmp/
mv data /home/myname/
modify conf/local.php to include this line:
$conf['savedir'] = ‘/home/myname/data/’;
mv conf /home/myname/
add preload.php under /var/www/html/inc with this content:

define(’DOKU_CONF’,'/home/myname/conf/’);

To do:

1. a quick once-over of Wiki syntax.
2. Possibly search for transferring from one wiki platform to another?
3. Creating a test page. Shandong comes to mind.

该洗洗睡了。明天再说。记着和老婆一起把外面那个桌子搬到地下室里,记着教孩子中文要耐心!

Comments (1)

I-GO car sharing

We had two cars because the infrastructure, work, and school situation made it necessary. Now I have a full time job in downtown and can take public transportation, we have sold our second car, which happens to be my first car, the 1997 Dodge Neon with manual transmission. I felt pretty relieved when we sold it: I don’t need to worry and spend money on upkeep and insurance.

Chicago has, at least it appears to me because I haven’t used it yet, a great non-profit car sharing program: I-GO cars. I-GO has a fleet of energy-efficient cars/mini vans/compact pickups to choose from, parked conveniently at easily accessible public parking lots. So I decided to apply, in the rare event that I need to drive while our Toyota Corolla is not available for whatever reason. Today I received my card.

Here is the financial breakdown: $25 one-time application fee, $25 annual membership fee. For the GO STANDARD plan that we chose, the hourly rate varies between $6.75 and $10.25, depending on vehicle type and time, and $0.40 for every mile we drive. That’s it, we don’t need to pay gas and insurance.

If you are interested in applying, and feel like to help me out, you can put my name, Haidong Ji, as a referral on your application form. I will get 20 bucks credit as a result. Thanks!

Comments (1)

Help if you can

Normally I don’t tweet or update my status on LinkedIn, Facebook, Twitter, and other social networks. Occasionally I would respond to friends’ messages, but even that is rare. I stopped reading people’s twitter messages all together last week. I am trying to do a weekly check of Facebook and Flickr messages now, as opposed to daily. (I still register on social network sites though, just as a way to get a pulse of virtual life.) Part of this is due to my time constraints, part of it is encouraged by Baron Schwartz’s great post here. I do care deeply about about my friends though. Friends here can mean people I’ve met face to face. Friends can also mean people whose web presence I follow, and touched me in some way. Strictly speaking, people in the second category should not be called friends, because

a) we haven’t met;
b) they might be drastically different from what I perceive them to be, which is possible. But from my experience of meeting people face to face after knowing them online for a while, usually at least a year or two, they are all consistent with their online persona, or rather, my perception of their online persona;
c) I may think they are my friends, but that feeling may not be mutual.

Anyway, in my usual convoluted way, I gave you this: my first ever Facebook personal message! See below. System generated message, such as messages tagged to Facebook groups, didn’t count. I support children’s education wholeheartedly, and feel OCEF is an organization I can trust. As a principal, I don’t support any political or religious causes, except in very few and rare circumstances.

Without further ado, here is my first message on my Facebook wall. Darn it, writing this post totally screwed up my original plan of going to bed before 10:30!

Hey friends,

OCEF (Overseas China Education Fund) is a non-profit for a great cause. I am a volunteer and have donated in the past. Because of my involvement with this organization, I feel confidant that my money is going to the right place: education for less-privileged children in China.

Haidong

Here is more info I copied and pasted from Facebook’s annual Giving Challenge Event.

By donating $10 to OCEF (Overseas China Education Foundation), you can help us to win $50000 grand prize in Facebook’s annual Giving Challenge Event.

OCEF, a 501 (c) (3) non-profit organization, is dedicated to helping disadvantaged children in rural China to realize their dreams of completing their education and improving the education conditions of the schools in these areas.

How to do help OCEF?
1. Go to the webpage http://apps.facebook.com/causes/375784
2. Click Button “Donate”.
3. Click on “Connect with Facebook” (You can also choose “Donate without Facebook” and follow instructions)
4. Select $10.
(Very Important Reminder: the winner is selected by the total donation times. If you donate $100 per time, it is counted as one donation. If you donate $10 each day and continue for 10 days, it is counted as 10 donations. Therefore we encourage you to donate $10 each day. Note that in this event, the day start time is 3:00PM Eastern time)
5. Fill credit card information.

This donation challenge ends on Nov 6th. If OCEF could be the non-profit organization with most counts of donations on the final day, OCEF could win $50,000 prize. Also, everyday $1,000 and $500 are sent to first two daily winners. While $50 can cover the yearly tuition and fees for one student, $50,000 is huge money to support hundreds of students. Your $10 donation could give us more chances to win!

Comments (5)

看《天下无贼》听老歌

小学春假,今天儿子在朋友家睡觉。我和老婆有了点闲空。

就和老婆一起看《天下无贼》,很好的一部电影。我想起1990至1994去厦大做火车的时候,俺娘都是把那六七百块钱(我记得应当不到一千)缝在我内裤里带着。这四五十个小时的火车,葛优和刘德华就不要打这笔钱的主意了,李冰冰还可能有点戏。在那绿皮车里,我睡过行李架上和车椅下面,在厕所、过道、车缝间一站就是几个小时。有一次幸运有了个靠窗的座,但那竟成了乘客上下车的通道。1990年是第一次出远门儿,还记得第一次在火车上说普通话的窘迫,虽然晨读时普通话自我感觉良好。

完了一起看CCTV的改革开放30年来的百首金曲,第一集。那些老歌,《年轻的朋友来相会》,《我们的生活充满阳光》,等等等等,勾起了那么多的回忆。谢谢老婆,这些节目她看不太懂,但知道这些歌对我的意义,所以和我一起欣赏。我跟着歌手哼唱,不时给她翻译一些。她看字幕看哪个字认得。我记得我爸那时候喜欢在家里唱那些当时的流行歌曲。想起我爸的哼唱,就觉得特亲切。

岁月流逝,人生短暂。回头看我们这三十多年走过的路,有那么多的欣慰和感触。有时我会跟老婆说,谁能知道那个季庄农村里的光腚猴现在有了这样的家庭和生活?老婆就会说,你应当感谢你的父母,他们在困难的情况下给了你很好的教育,你才能有机会看看外面的世界。她说得当然有道理,这也是我支持海外中国教育基金和中华捐书会的原因。我感觉那个多背一公斤也挺不错的。

Comments (2)

Going to Santa Clara for MySQL Camp and Percona conference

Once again this year, I will make a trip to Silicon Valley for MySQL related activities. I will arrive on April 19th and fly back on the 24th. Both the MySQL Camp and Percona conference have some impressive lineup of sessions. I will also be at the Drizzle Developer Day. Once again, like the previous year, my main objective is to learn, learn, and learn. Meeting people and networking are other objectives.

I am not too sure how many people actually follow my blog. Google feedburner says around 75 subscribers, but I think my blog is also consolidated by at least two feeds aggregrators, and I have no idea how many people they reach. Anyway, if you happen to read my humble blog and also attend the conference, I’d love to meet you.

PS. Just a few days ago, I happened to open my site in Internet Explorer, and realized the layout is all messed up, in that the right-hand menu is at the bottom of the page. It does display properly in Firefox. Any ideas on how to fix that for IE, dear reader? I don’t use IE unless I have to, hence the late discovery of this issue. 这下子臭大了, 汗.

Comments (4)

Medium-sized drink

Note: I am looking at some of older draft posts in my blog. I removed a few that just had a title there but no content. I saw this one, which looks half-done and was written close to 2 years ago, but I have no idea what I intended to write for the rest of the post. So here it is. In any event, a 32 ounce medium-sized drink bottle is something to behold! Large size drink holds around 42 ounces, which should be slightly more than 30% bigger than the one pictured below.

A couple of weeks ago, I was in a rush and ordered a spicy grilled chicken sandwich from Wendy’s. I was thirsty too, so I requested a medium drink. I normally don’t go to fast food stores like McDonald’s, Burger King, Wendy’s, and such. When I do, I normally just ask for a cup of tap water. I was really surprised when the guy from the drive-thru window passed me this cup of drink:

Medium sized Wendy's drink

He must have seen the expression on my face. Before I said anything, he smiled and said: “Yup, that is a MEDIUM drink”

The gigantic bottle actually wouldn’t fit inside the cup holder of my Neon. This experience reminded me that when I was in Xiamen University in the early 90’s, we were all excited when McDonald’s opened its first store on ZhongShan Lu. In fact, well-educated university students worked fairly hard to get a part-time job there. I flipped burgers and mopped floors there for a couple of weeks, and even got brave enough to court a nice looking McDonald’s colleague, before she scared me away with some strange stories.

Comments (2)

Thinking of Ken Henderson during PASS conference

Sql Server 2008 is here, and Microsoft is busy working on the next release. But let me tell you, there are still tons of Sql Server 2000 out there. So far this year, I spent well over 2/3 of my time working on Sql Server 2000 projects. Clients know they need to move to the next version, reluctantly. One of the major roadblock is SSIS. Companies have made huge investment in that technology and there are DTS packages all over the place. Sure, there is DTS Runtime, but upgrading the packages is a huge undertaking with a steep learning curve. Many people love DTS, because it really hits the sweet spot of simplicity and yet still being powerful enough to get things done.

Anyhow, since I work with Sql Server 2000 quite a bit, and may have to review or even code some Visual Basic 6 programs, I figured it was a good time to take a trip down memory lane: I started reading Ken Henderson’s The Guru’s Guide to SQL Server Architecture and Internals. I read it from cover to cover, with the exception of Notification Services, ODSOLE, and a few XML chapters. I’ve also compiled and ran many of his C Win32 API programs to get a better understanding of Windows internals. In addition, I had fun poking under the hood with WinDbg by following his exercises. (Earlier this year I did some exercise with the Linux debugger gdb, figuring out some simple problems with MySQL program written in C. In many ways, they are similar, based on my limited experience.) A hint for you if you decide to follow exercises in his book, for Chapter 3, 4, and 5, where he talked about processes and threads, memory, and I/O system, be sure to change the project to Debug mode. The code files from the CD put you in Release mode in Visual C++ 6.0.

Ken’s book got me interested in the impact of Solid State Disk on Sql Server. In Sql Server, UMS, or SQLOS, tries to keep things running as much as possible in user mode, as opposed to kernel mode, adopting a co-operative as opposed to preemptive model. And it uses mostly asynchronous I/O and scatter-gather I/O. With the emergence of Solid State Disk, I wonder what kind of impact, if any, there is for such an I/O intensive application as Sql Server.

Anyway, I really learned a lot from the book. Ken knew Sql Server inside out. Unfortunately, he passed away this year, and I wrote a tribute here.

I’ve learned from various sources on the web that Ken’s last book is more or less done before he passed away. I don’t know about you, I would love to read it. However, not wanting to be preposterous or disrespectful to his immediate families and friends, I’ve been quiet on it for a while. I did, however, sent an email to Addison-Wesley, asking the possibility of putting the book as Rough Cuts on Safari Books Online, but got no response from them.

In any event, with the PASS conference going on in Seattle now, I thought it is appropriate to honor Ken in some way during the event. Unfortunately I couldn’t make it to the conference due to schedule conflict. Like I said, Ken is such a wonderful, generous, kind-hearted human being who contributed so much to the community. He certainly earned my gratitude and utmost respect. I wonder if it would be a wonderful tribute to Ken, who is beloved by so many of his colleagues and Sql Server professionals who’ve read his Sql Server books, for PASS to somehow make Ken’s last book available.

Comments

« Previous entries