Asus RT-N66U vs. D-Link Dir-655

About half a year ago, I replaced an older router with the D-Link Dir-655 for better wired and wireless LAN speed (in particular, I need the 1Gbps wired connection for transferring large files between computers). Since then I often experienced internet speed slow down, DNS failures and various problems when torrenting. Even if I limited the number of concurrent connections and max bandwidth of the torrent client, the web browser (mainly google chrome, but others were also tested) became very slow to a load a web page and wasn’t able to open any web page eventually. It seems that the D-Link router was congested by the simultaneous connections from torrenting. So I did some research and decided to go for the Asus RT-N66U. I also considered some Linksys routers but I went for the Asus because of its large number of positive reviews. The router was bought from Amazon.

Asus RT-N66U

Below are some testing I run with iperf to compare the LAN bandwidth between the Asus and the D-Link.


Thinkpad W520 laptop: core i7, 16GB RAM, Intel® Centrino® Advanced-N 6205 supporting 802.11agn, 2×2, dual band delivers up to 300 Mbps, Windows 7

PC desktop: core 2 duo 6300, Asus P5B Deluxe, 4GB RAM, Samsung 830 SSD, Windows 7

Mac mini: core i5, 8GB RAM, Samsung 840 SSD, OS X Lion





W520 -> Mac mini (server)


64.2 Mbits/sec

120 Mbits/sec

PC -> Mac mini (server)


694 Mbits/sec

654 Mbits/sec

Mac mini -> PC (server)


935 Mbits/sec

For wireless connections it is obvious that the Asus is double of the D-Link. The Asus is able to take the full advantage of Intel 6205 2×2 chip (N300 2×2). The D-Link also supports N300. I am not sure why the D-Link only achieved about 64 Mbps.

For wired connections, the Asus is able to achieve 935 Mbps when I used my PC as iperf’s server. I am not sure why it is much slower when the connection is reversed. I also don’t have the numbers for the D-Link so I can’t say that the Asus has faster wired connections.

Anyhow, from my two day’s experience with the Asus, it has been very stable when torrenting. The internet connection for web browsing, video calling and others remains smooth and fast enough. I am quite satisfied with the Asus’ performance so far, even if its price is more than twice of the D-Link.

PS, SmallNetBuilder’s router chart is very useful for comparing routers.

Replace hard drive of Mac mini with SSD

I am using a Mid 2011 Mac mini as my work computer. I use it mainly for programming (python, javascript and iOS) and some photoshop work. The memory was increased to 8GB last year, which boosts the performance a lot. The speed has been pretty good until recently I noticed some lag when multiple big programs were running (such as xcode, thunderbird and photoshop). I decided to replace its hard drive with a SSD because SSD has become quite affordable these days.

Screen Shot 2013-05-02 at 1.12.50 AM

The project started with buying a 250GB Samsung 840 SSD from newegg and the tools needed to open the mac mini, including a very economic Husky 8-IN-1 Torx Screwdriver Set from the Home Depot and a Mac mini Logic Board Removal Tool from iFixit. Today, everything has arrived so I followed the iFixit guide and the OWC guide and replaced the hard drive with a SSD.

The process are quite straight forward. One thing I found is that you don’t have to move or remove the logic board to take out the hard drive, which means that you don’t have to get and use logic board removal tool if you are just replacing the hard drive. You would need it if you are adding a second hard drive as described in the OWC guide. So if you are just replacing the hard drive, follow steps 1 to 15 in the OWC guide or steps 1 to 12 in the iFixit guide. After removing the hard drive connector, you can slide out the hard drive, carefully. Moreover, you don’t have to completely remove the antenna plate and its connector. I just left it connected and hanging on the side. Be very careful do not break the thin cable.

Regarding the OSX system, first I resized the main partition on the original hard drive (500GB Hitachi 5400rpm) to 240GB so it can be directly cloned to the SSD. Then I plugged in both disks to my Windows 7 PC and used Macrium Relect (free version) to clone all the partitions to the SSD. The sector-by-sector copy took about an hour and produced an exact copy on the SSD. The system boots up fine but with a much shorter time. The only I need to change is to re-enable smb sharing that I use with my PC. Below is a speed test of the SSD with Blackmagic Disk Speed Test (free). One last thing I did was install Trim Enabler to turn on trim for the SSD.



今天想起统计一下我在淘宝购物总共花了多钱,貌似淘宝没有提供这样的统计功能,但是进到支付宝之后里面有所有交易的明细查询还有导出成csv的功能。于是查询并导出了我从最开始到2012年底的所有购买交易记录,总共96笔交易,第一笔交易是在2006年7月,总共支出金额22.1K,平均每笔230块,平均每个月1.2笔交易,也就是说我每个月都要给淘宝贡献200多块。。。, 最大的一笔交易是给老妈买的iPad。

Some materials on Evo-Devo

I was writing my dissertation on language acquisition a few days ago and was thinking about the evolution of language and the recent interests in the evo-devo approach (Evolutionary developmental biology). I started looking for some introductory materials online and happened to find on PBS a good article (actually, an interview with Harvard developmental biologist […]

Batch Find and Replace with the Linux Command Line

Copied from

perl -pi -w -e ‘s/wrong/right/g;’ *.html
Replaces all instances of ‘wrong’ with ‘right’ in html files within the current working directory.

grep -rl “wrong” /home/jerrywaller | xargs sed -i ‘s|wrong|right|g’
Recursively replaces ‘wrong’ with ‘right’ within the designated directory.