Warning: include_once(/home/nullvoid/blog.mikezhang.com/wp-content/plugins/wordpress-support/wordpress-support.php): failed to open stream: Permission denied in /home/nullvoid/blog.mikezhang.com/wp-settings.php on line 217

Warning: include_once(): Failed opening '/home/nullvoid/blog.mikezhang.com/wp-content/plugins/wordpress-support/wordpress-support.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/nullvoid/blog.mikezhang.com/wp-settings.php on line 217
NullVoid » 2007 » September NullVoid » 2007 » September

Archive for September, 2007

Do Everything on a Mac as Root

Thursday, September 27th, 2007 -- By ET

If you don’t know what the title means, just ignore this post.  :-p

I found that on a Mac, I can’t really “su root” as I  often do on Linux.  Whenever I change the root password, I can “su root”, but the next time when I start “Terminal”, the root password is not recognized.  The trick lies in creating a super user account, then “sudo” each time.

For example, to move some files to a directory that the current user does not have right to write.  I can do:

sudo mv somefiles* /home/root/dir

Good thing is that the only difference is to add sudo in the beginning.


 This cartoon from xkcd says it all.

Spinning Dancer

Thursday, September 27th, 2007 -- By ET

If you  see the dancer to be moving clock-wise, then you are a logical person.  If count-clock-wise, you are an artistic person. Trust me, I see it spinning both ways.   spinning.gif

How to Pack Shirts and Pants

Sunday, September 23rd, 2007 -- By ET


 This is a good guide for travelers on how to pack clothing.  It is self-explanatory.

Will try it next time.

Piano Diary (4) Practicing

Saturday, September 22nd, 2007 -- By ET

Due to my busy schedule in the summer. I did not get enough chances to practice.

But I managed to learn to play a few simple songs (oh, far beyond “twinkle twinkle little star”, “silent night” and “money isn’t everything”, these three appear in almost all introductory books, I could play them on the second day when I touched the piano).

I tried to practice with Czerny’s 599. I started from #11, reached the #20 in two days. They are quite easy if you use your knowledge in chords to play the left hand (my guitar experience got me some millage here).

Then I switched to play some songs I know, by adding simple left-hand rhythms. They sound amazingly nice! For example, “Everything I do, I do it for you” involves C, G, Dm, Fm. In the simplest case, pressing the 3 keys together once with the left hand in every measure gives nice sound, of course, right hand needs to play the melody, which is not hard for this song.

The next step is to practice the separation of the left and right hand. This is quite difficult for adults, because we are not trained (no other tasks need us) to use the two hands differently, especially when the keys are not hit in the same rhythm. There are two ways to deal with this: (1) play very slowly, but make it right (2) play both hands till you don’t have to think about the keys, then put them together. I found (1) is quite useful to me. (2) can be combined with (1).

Once I can play one song without any problem (usually in C), I experiment to play it in D and G. This way, I learn how to introduce the black keys, and be familiar with the sharps and flats. I’ll wait till I can play better in C to move on to add more sharps and flats.

I’ll try to put up some videos, but I simply don’t have to process a video now. To many things are going on, and there are at least 5 things reaching the deadline on Oct 3. So I’ll have to wait a little bit.

Piano Diary (3) Theory

Saturday, September 22nd, 2007 -- By ET

During summer, I was traveling extensively.  From HK to Chicago, San Diego, LA, to Singapore, to Beijing, to Shanghai, to Boston, Minneapolis.  There wasn’t time to practice.

I used the time to read some music theory.  Basically, I think the following points need to be understood

  1. chords, how they are formed
  2. how chord inversion works
  3. key signatures, scales
  4. music notations, especially rhythm

I used to play guitar, so chords are not difficult to me, I found the chords in piano is much easier than in guitar. :-)

Chord inversion helps to reduce the hand movement, it can be very useful when you have to change the chord frequently.

An understanding of key signatures is useful, it is not that urgent to practice everyone of them, when there is a need, I can quickly start

There are some software packages to help people with the rhythm, I tried EarMaster, the exercise asks you to hit the space key on your computer keyboard to produce rhythms shown in the software.  It is useful, especially when you want to try a new song that you never heard.

To learn key signatures, a map called “the Circle of Fifth” is extremely useful:


So starting from C, moving clockwise, each new key is the 5th of the old key, each adds a new sharp (#).  So when we reach F#, we have 6 sharps.  This happens to be the same as Gb, which has 6 flats.

The small a below C means that a-minor uses the same key signature as C-major.

This would have been so difficult for kids, but for adults, this is not that hard to understand.

How I Saved my iPod from Drowning

Saturday, September 22nd, 2007 -- By ET

ipodblack.jpeg Jade has been very absent-minded recently. I guess it has something to do with her working too much with Excel and PowerPoint till 1am sometimes.

Last week, I scheduled a lunch meeting with Sean, and she insisted to join. I was a few minutes late, when I arrived, she was jumping with my new ipod in one hand, and the the environmentally friends Harvard bag in her other hand. She did not check the lid before she put her drinking bottle into the bag, and the water leaked in the bag. The iPod in her hand is totally soaked. I can see water flowing in the screen, which still shows the “Now Playing” song.

She told me the iPod was off, and I do see the lock was on, so it must be the water that triggered up the iPod. I have heard many dreadful stories of getting iPod wet (or anything electronic device, for that matter), just search for “ipod, water” in google to see how common this issue is.

That was a less-than-one-month new iPod, so I did not want to buy another one. Before I want to take it to Apple service to try my luck (in Hong Kong, it would be a big hassle), I thought about ways to save this one.

The first thing I did was to put it facing down, so the screen and the buttons face the table cloth. This way, the water can flow out rather than diffuse within that metal back cover.

Then after lunch, I asked Jade to take it back and put it together with a dehumidifier in a closet. Jade did not do it, instead, she put it near a fan, and after a while, Nathalie turned off the fan. So when I came back home, the iPod was lying on the table.

dehumidifier.jpg I thought about cracking it open and drain the water, but I did not, this not only would devoid my warranty, but also might help the water to reach some sensitive parts in iPod. So I put it into the room with the dehumidifier.

It did not seem to work very well, as the dehumidifier only dehumidifies the atmosphere, even if the humidity is 0, the water would still be trapped inside. So I put the iPod near the vent of the dehumidifier. It blows out warm air. I switched the mode from “Dehumidify” to “Drying”, which was designed to dry cloths. It seems to be working, the next day, there was a box of water extracted by the dehumidifier, and the ipod feels warm, which can be helpful to evaporate the water.

After 2 days, I thought it was safe to turn on the iPod, so I did. It came up and showed a message saying “the iPod has little power left in the battery”. So I plugged it into my computer. The battery appeared to be charged.

But the problem came: after a few hours, the battery was still very low. And iTunes did not recognize the iPod.

appleadapter.jpeg So I unplugged the iPod, and put it into sleep. When I did so, I touched the power adapter of my laptop. It was very hot!

I guess the issue was still water, so I left the iPod on the hot adapter. After one day, I touched the iPod, it was very hot too. (The back cover is a piece of metal, no wonder!)

Then I plugged in the iPod again. This time, after charging the battery for a while, iTunes started to Syncronize. After I-don’t-remember-how-many hours, the battery indicates only got half charged. I did not want to charge too much, so I unplugged it, and started to listen to it. I think this has to do with the battery, and I want to manually calibrate it. So I left the iPod on till the battery is drained out of power.

Then I plugged in the iPod, and this time, it got fully charged.

I thus declare that I saved my iPod from drawning.

Something we can learn in the process:

  1. Do not crack open the ipod when it’s wet
  2. Just keep it warm for water to evaporate, do not use a hair blower (this one can destroy the LCD)
  3. Do not shake the iPod forcefully
  4. Be patient, be very patient, avoid to turn it on before you are 100% sure it is totally dry inside

Mac OSX Terminal Tip 2 (Transparent Background)

Wednesday, September 12th, 2007 -- By ET

defaults write com.apple.Terminal TerminalOpaqueness 0.8

You can change the last number from 0 to 1.0, I found 0.8 to be nice. If you want to freak out, try 0.

Oh changing this has the added benefit (cost?) of making the background of the dock transparent. I like it

Mac OSX Terminal Tip 1 (Advanced ‘ls’ Display)

Tuesday, September 4th, 2007 -- By ET

add the following to the file ‘.bash_profile’ in the home directory

alias ls=”ls -GFv”

-G :以彩色顯示
-v :終端機編碼設定為UTF8時,可正確顯示硬碟內的中、日文檔名
-F :目錄後顯示 (`/’), 可執行檔後顯示(`*’) ,symbolic link後顯示(`@’), an equals sign (`=’) after each socket, a percent sign (`%’) after each whiteout, and a vertical bar (`|’) after each that is a FIFO.

You are visitor number several since September 1, 2001

Copyright Xiaoquan (Michael) Zhang, 2004-2020. All rights reserved.
All trademarks property of their owners.