From Weiqei Gao’s blog…

I haven’t done too much with the WordPress blog I created 122 days ago. But instead of throwing it away, I thought it a good opportunity to test how easy it is to move the blog over.

It indeed it easy. All I have to do is to move the MySQL database and the /var/www/html/wordpress directory from one computer to another:

[root@gao-2004] # mysqladmin -p –add-drop-tables wordpress > /mnt1/wordpress.mysqldump
[root@gao-2004] # cd /var/www/html
[root@gao-2004] # tar cf /mnt1/wordpress-files.tar wordpress

[root@gao-2006] # mysqladmin -p create wordpress
[root@gao-2006] # mysql -p wordpress grant usage on *.* to weiqi identified by password
> grant delete, select, insert, update on wordpress.* to weiqi
[root@gao-2006] # cd /var/www/html
[root@gao-2006] # tar xf /mnt1/wordpress-files.tar

where weiqi/password is the username/password pair I gave to WordPress when I did the five minutes install back then.

From Weiqei Gao’s blog

I hosted my Subversion repository on gao-2004, and needed to move it to gao-2006. With the default backend storage system change (from Berkeley db based to file system based) for Subversion that happen between FC3 and FC4, I expected that I need to at least read a lot of documentation and perform a fair amount of experimentation.

It turn out that that is not the case, for two reasons. One, the backend storage system is an implementation detail of Subversion and is mostly hidden behind the Subversion user interface. The detail leaked through only in terms file permission problems. BTW, Pragmatic Version Control Using Subversion helped a lot in the process, even though one of its recipes no longer applies in the fsfs world.

Here’s my migration steps:

[root@gao-2004] $ svnadmin dump /var/svnroot > /mnt1/svn-repo.svndump

[root@gao-2006] # svnadmin create /var/svnroot
[root@gao-2006] # chown -R weiqi.svn /var/svnroot
[root@gao-2006] # svnadmin load /var/svnroot

Unit Testing Terminology

January 18, 2006

  • Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists.
  • Fake objects actually have working implementations, but usually take some shortcut which makes them not suitable for production (an InMemoryDatabase is a good example).
  • Stubs provide canned answers to calls made during the test, usually not responding at all to anything outside what’s programmed in for the test. Stubs may also record information about calls, such as an email gateway stub that remembers the messages it ’sent’, or maybe only how many messages it ’sent’.
  • Mocks are pre-programmed with expectations which form a specification of the calls they are expected to receive. They can throw an exception if they receive a call they don’t expect and are checked during verification to ensure they got all the calls they were expecting.

The packaging and the beauty of the box is beyond anything I’ve ever seen. The user’s manual is petite and succinct.

I am using a Logitech Cordless keyboard and mouse, however it does not have the Apple Command key and most of the shortcuts require it.

The install process does not prompt for the root password and the Terminal app isn’t included in the dock panel.

By default the mini goes to sleep after 15 minutes of inactivity which I had to change.

And the Microsoft Office evaluation has already expired before I could test drive it on the Mac.

Finally it takes time to get used to the menubar all the way on the top and not attached to the window, it took me some time to figure out how to import pictures in the iPhoto library because I just didn’t think about looking at the menubar.