Sunday, July 25, 2010

What drive you work? - The review of book Drive

Today I finish reading the book Drive-The surprising Truth About What Motivates Us". I knew this book from this 10 minutes cartoon on twitter, and the author's video about drive.The topic sound interesting to me, so I started to read the book. To my surprise, the book is quite easy to read, I was so absorbed in it,  most of the book was finished on the flight trip to London.This is very unusual to me, since I seldom finishing a English book in such a short time, except Agatha Christie's  novel.
The core concept of the book: The traditional external carrot & stick motivator does not work on 21 century; we need to upgrade to intrinsic motivator: autonomy, mastery, & purpose.
This concept is not new to me, it reminds me some other books which share the similar theory behind:
  • Maslow's self realization theory;
  • Lean Technology and Deming's theory;
  • Seven Habits
  • Maverick
  • The passionate programmer
  • The fifth discipline

This book drives me into deep thinking about the 3 factors: autonomy, mastery and purpose.

What I learned from the book
 - Autonomy, mastery and purpose are correlated, and each of them supports each other.
      Good example: Since I have the mastery in my mind, I have the passion to do things better; if I get the autonomy, I get trust, I am allowed to do my job on my way, then I will focus entirely on the job, and try to doing my job better, since I know the purpose of my job, I know the whole picture, and I enjoy the whole process.
      Bad example: In the command & control hierarchy, I am just a interchangable resource, I can not control what I am going to do; I have to follow the order from my boss; my job is make my boss happy, I don't care job itself. I don't know the my job related to any purpose, I just know get my job done, make my boss happy and get my money. It is impossible to get highly motivated.
  - The road to "go independent" is the right way to me, I get this idea from the book of "the Passionate programmer".This is the only thing that can guarantee you to get autonomy. You can not control your company, you can not decide who is your boss, but at least you can control your self if you are independent software developer.
 -  Reinforce my goal to mastery.
  I feel lucky that I am still a programmer instead of manager, this give me a chance to become a master in future.Keep improve yourself, love your job, treat your career as an infinite game, keep challenge your self.
     
Next step thinking:
- Compare drive with Lean technology
- Investigate the "flow" concept
- If you are a Type I person, how can you do in a Type X organization, how to deal with your Type X boss?
- What kind of Type I organization should be? How to migrate from Type X to Type I organization?
- Why we should focus Type I behavior in software industry?
- Why manager need to give up control?
- use the theory in "drive" to explain the "three stone cutter stories"
- Read the book of "the fifh discipline".

Resources:
1. 10 minutes video link
2. author Daneil Pink's presentation
3. Dan pink's website
4. The reading list of drive

Sunday, July 4, 2010

Time Machine Wireless backup using your own network drive

Last Friday My Macbook is broken again, this is the third time since this year, I don't know why I am so unlucky and I love my macbook so much! I really worried about my hard drive because the computer could not recognize the hard drive, and I never backup my hard drive data before! Finally the issue was resolved in the Apple Store, the problem is in the harddrive cable.
This time it gave me a lesson: I need to backup my hard drive ASAP.
But when I started to use the time machine for the first time, I got stuck: the Time Machine requires the Time Capusle and Apple airport, while I want to backup into my own NAS drive. To solve this issue, I spent  almost half a day on google and trying out back and forth. Finally I made it, I can use time machine to backup my harddrive into my own network drive.
Here I would like to share my experience about how I solve it. Basically I referred this blog, it is so great, I could not able to finish it without this article.

The Goal
Backup my mac hard drive into my own NAS via wireless network.

Environment
Computer: MacBook Pro
OS: Snow Leopard
Wireless Router: Netgear WNDR3700
Network drive: West Digit MyBook Essential

Steps
1. Setup network drive, create a network shared folder for time machine. For example, I called the folder "\mac".
2. Connect the NAS storage, for example in my netgeare wireless network, I type following in Finder:
    smb://readyshare/mac
3. Enable time machine to use your network drive, run following command in the terminal:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

4. Find out your computer name and Ethernet ID.
   To get the computer name, go to "System Preferences" - "Sharing" , then you will see the computer name at the top, and you can change to any name without restarting the mac computer.
   For example, my computer name is: steve_zhang_mac.  The name contains space and other special characters should be fine, but I prefer to make it simple.
   For the Ether ID, go to "System Preferences" - "Network" - "Ethernet" - "Advanced" - "Ethernet". The ethernet ID in my computer is: d4:9a:20:04:65:34
   Or you can try to type following command in the terminal:
      ifconfig en0 | grep ether | sed s/://g | sed s/ether//
 Please remeber: it requires the computer's MAC address regardless if you use wireless or wired connection.
   If you use Wi-Fi, you will find another different ethernet ID under the  "Airport" configuration, don't use this value.
5. Create the disk image file
   Create the disk image file locally, the file name is like computername_MACaddrss.sparsebundle
   based on the information from step 4), run following in the terminal:
  
    DISK_IMAGE_NAME="steve_zhang_macbook_d49a20046534.sparsebundle"
    DISK_SIZE=200000
    hdiutil create -library SPUD -megabytes $DISK_SIZE -fs HFS+J -type SPARSEBUNDLE -volname "$DISK_IMAGE_NAME" "$DISK_IMAGE_NAME"
  

Copy the created image file into the NAS storage folder.
6.  Run Time Machine, choose your NAS box,  if everything is OK, then the time machine will start working.

Some Erorrs I met
- Error 45
  This is because the time machine could not create the .sparsebundle file, in your NAS storage folder, you might find a file name and folder called like coputerName_tmp.sparsebundle, please follow step 4 and 5,  copy the generated file into the specific shared folder.
  I met this issue twice, one is I did not create the image file, the other is since I use the wrong ehternet ID which I got from the "airport" configuration. After I used the correct ehternet ID,this error does not happened again.

- Error of" .....sparsebundle is already been used."
  The .spasebundle file is used by another process, please restart the computer to run the Time machine again, this issue will solved.

Other tricks
1. For the first time backup, it is better to use LAN instead of Wi-Fi, for example, it took me about 14 hours to backup 113G data using LAN mode.
2. How to check the connected NAS in terminal:
   All the harddrives are under folder /Volumes, so if you type cd /Volumes in terminal, you will see your hard drive and your network drive.
3. How to check the system log:
   System log is in /var/log/system.log
4. If you don't like the time machine to backup every hour, please try the Time Machine Editor, you can customize your own backup schedule with this free app.
5. If you use Parallels virtual machine, then it is better to turn off the backup for parallels virtual machine file,  go to Parallels Desktop - Virtual Machine - Configure... , choose "General" tab, check the "Do not back up with time machine." For example, before my computer needs about 120G, right now it only needs to backup 59G data.  Or you can open the Time Machine Preferences, choose options,  add exclude the Virtual machine file: it is in /Users/Shared/Parallels/Windows XP.pvm


References
1.  Getting Time Machine to work on an Unsupported NAS
2. Time Machine Wireless Backup without Time Capsule
3. Time Machine Editor