The Empathetic Mindset

For any engineer reading this, I’m pretty sure at some point in you career, someone has told you that engineers alone are not able to make great products. And I can see they are probably right.

Stereotypical engineers are known to create stuff not suitable for human consumption. Typically, those products either pack a stellar amount of features that are hidden behind convoluted interfaces, or boast some features that only interest like-minded people of the engineers themselves.

But why is that?

Because by nature, humans tend to think for themselves. One’s judgements are always based on his own past experience. When you think about how a certain product feature should work, you’ll naturally search your brain looking for pleasant situations you’ve once had using similar products. For an engineer, he’ll recollect memories with his own favorite products. And what’s the most important and beloved to an engineer? Tools. Tools are what defines an engineer. Therefore, products designed and created by engineers tend to be just like tools – form follows function.

But the problem is, this also means humans are limited by their own experiences. One cannot see beyond himself. One’s own memory is the whole collection from which he searches for ideas. In the case there’s no perfect match, he picks the closest thing possible. For an engineer, who almost always deals with tools, tends to draw references from his favorite tools no matter how the product relates to tools. That’s his best judgement nevertheless.

This gives rise to the common conception that engineers are often not the best product designers. However, based on the facts above, this statement is no more accurate than saying that a inexperienced non-engineer often doesn’t come up with the best product ideas. Typical engineers suck at product design because products are not always meant to be used by engineers themselves. And engineers have limited experience using products not interested to themselves. The same applies to non-engineers when the product is conceived to be used by other kinds of people than themselves. For example, when a non-gamer product designer works on a product targeting to gamers.

So the real question here is not that whether it’s an engineer or not, but that whether one can think on behalf of other people, the target users of the product. That is, to think empathetically.

Thinking empathetically is a conscious process. It’s like self-discipline. It’s what one voluntarily applies to oneself, resisting natural tendency. It not only requires one to actively seek outside of his own experience, but also demands one to greatly expand his experience by trying out many new things, new roles, and new ways of thinking. If you are a driver, try  the passenger’s seat. Only then will you understand what a passenger wants. Just like self-discipline, thinking empathetically is hard. That’s why great products are not common. And innovative products are even more rare.

The empathetic mindset applies not only to engineers but to non-engineers as well. I reckon that it’s the single most important factor that could lead to a great product. And in fact, I believe if engineers can learn to think empathically, they are more likely to become a great product designer than others. Why? Because being able to understand the various details and limitations how a product is built and works can help one form better judgement about how to best put it to work, especially when tradeoffs are necessary. If a certain feature for an iPhone app is so CPU-intensive that it impacts battery life, it’s the engineer who knows it the best. And it’s the engineer that can think of a reasonable alternative as a better design. On the other hand, a non-engineer product designer often needs to understand the engineering details of a product in order to do the same, while it’s probably harder.

It’s not that engineers can’t make great products. It’s people without empathetic thinking who can’t. This has nothing to do with being an engineer or not. Once you learn to apply this mindset to yourself vigorously, everything else will follow.


Haven’t written for a long while. Today, this blog is rebooted. Feels like writing something new again.

My Setup

This is a fake interview article in the format of The Setup. It’s enjoyable to figure out the most important stuff I use everyday in the process of this writing.

Who are you and what do you do?

I’m a code monkey working at Slide. At work, I build awesome social games using Python, Javascript, and Flash AS3. At home, I build iPhone apps with Objective C, and hobby apps on Google App Engine.

What hardware are you using?

At work I use a 15″ MacBook Pro (2nd gen unibody). I connect my Mac to one external Dell 2209WA monitor rotated at 90˚ at all time, with my terminal screen taking it at full screen. I use the Griffin Elevator to hold my MacBook Pro, with the Apple Bluetooth Keyboard and the Magic Mouse taking control. I have another 15″ MacBook Pro (1st gen unibody) for home use and a desktop computer running Ubuntu/Windows XP. On the desktop, I use Windows for gaming only and Ubuntu for everything else. But I’m spending very little time on the desktop for a while.

I use an iPhone 3GS for mobile computing. And I have the iPad on my wishlist.

And what software?

For programming I use vim. It’s super neat you can have the same developing environment as long as you work on a *nix system. My essential vim plugins are FuzzyFinder, TagList and NerdTree. My latest favorites are SnipMate and Neocomplcache. In a GUI environment I use the desert theme.

I used to use TextMate as my main editor but have converted since a while ago. TextMate is still top notch and I really like it. But there’s no denying it’s about to become the Duke Nukem in the text editor world.

I’m a heavy user of git, professionally as well as personally. It’s an awesome piece of software in itself and keep amazing me from time to time. I use GitHub for my personal stuff. It’s so great that I recently began to buy its paid service.

I’m a paying user of DropBox. I keep all my important data on DropBox and sync it over both my work and home computers running different systems, as well as my iPhone. It’s another piece of amazing software that I recommend to every friend.

I can’t part myself with QuickSilver. I do everything, I start it with QuickSilver. I find the web search plugin especially useful and I define a number of custom search command in the form of safari bookmarks. I use the SilverFlow plugin for QuickSilver. But a couple weeks ago I upgraded to Snow Leopard and it was a pain to get QuickSilver to work in the new system. So I’m trying to use Google Quick Search Box as an alternative for now. So far it’s almost as good except for customization and performance. Hopefully I can find a way to get QuickSilver work exactly the same way as in Leopard, or QSB gets really good soon.

I use Visor for a slick, Quake-like slide-in terminal. I use Megazoomer to zoom anything in full screen. I use Things both on Mac and iPhone to track all my tasks. It’s the best task management tool I’ve used. And I use Evernote to sync all my notes between Mac and iPhone. I have Thunderbird for Emails with the Nostalgy add-on for a mouse-less experience. I use PathFinder as an alternative to Finder. It’s just so much more powerful than the simplistic Finder.

My main browser is Webkit nightly. I use Firefox mostly for development using Firebug because it’s become a real beast for a browser. I also use Chrome for browsing. The Web Inspector tool shipped with Chrome dev is just not as good as that with Webkit nightly. But I love the Vimium plugin for Chrome.

What would be your dream setup?

I wish to have a 30″ monitor for development one day. The sheer screen real estate can simply change the way of working. I wish to have enough RAM to run everything I need at the same time without struggling with swapping. Infinitely fast processing power and network. And I wish *everything* could be wireless so I can get rid of any desktop clutter in my sight.

twtplus updated for Ubiquity 0.5+

I’ve updated the “twtplus” command for Ubiquity 0.5+. Since Github Gist sucks right now, (it’s very slow and cuts off the last lines of the code randomly without any prompt) I’m publishing the script here on my blog. Note that this is only compatible with Ubiq 0.5+ now.

Icecodez for iPhone

My friend Ryan and I just launched our team site Icecodez, which is dedicated to our iPhone apps development. The FIRST app by Icecodez just got out this week. Check out IceMetro Shahghai Subway Map Lite (itunes link). It’s an interactive map for Shanghai subway. And it’s free! Isn’t that ice cool?

Setting up MGTwitterEngine with YAJL 1.0.6 for iPhone development

*Corrected yajl include path. Updated info about adding YAJL static lib to project for deploying on device

MGTwitterEngine is a great Objective-C library for the Twitter API. Did you know the famous Twitterrific for iPhone (iTunes link) is built with MGTwitterEngine plus YAJL? You probably know that from the now famous YAJL error Twitterrific presented you when the Twitapocalypse hit the world, right?

But setting up MGTwitterEngine and YAJL for iPhone development turned out to be more difficult than I thought, due to the lack of documentation, and my lack of extensive experience with iPhone and Mac development. Anyway, after some hacking around, I finally got the two boys to play together and work with my next cool iPhone project. The following is how I did it and I think it might be useful to someone else wrestling with the same problem out there.

Getting and compiling YAJL on your Mac

First, get the latest YAJL code and get it compiled.

git clone git://github.com/lloyd/yajl

If you don’t have cmake on your Mac yet, get it via MacPorts. (The cmake version from Fink is too old to compile YAJL. I’ve tried it.)

sudo port install cmake

Now compile YAJL

cd yajl
sudo ./configure && make install

Now you should have “yajl-1.0.6” under the “build” folder. And the build process should have copied the binaries to /usr/local/lib/ and /usr/local/include/yajl respectively.

Getting MGTwitterEngine

Get the latest code from the SVN repo.

svn checkout http://svn.cocoasourcecode.com/MGTwitterEngine

Adding MGTwitterEngine to your iPhone project

Add everything from the MGTwitterEngine directory starting with “MGTwitter”, and also the NSString+UUID and NSData+Base64 category files, to the Xcode project. Choose to copy the files to the project.

Telling MGTwitterEngine to use YAJL

MGTwitterEngine doesn’t support Twitter’s search and trends API without YAJL, because these APIs only return JSON data. So obviously we need to tell MGTwitterEngine we have YAJL and please give us the support search and trends APIs, in addition to requesting JSON data for other Twitter API calls.

In MGTwitterEngineGlobalHeader.h


Adding YAJL and LibXML to the project

Now add the required frameworks to the Xcode project.

Locate “/usr/local/lib/libyajl.dylib”, drag and drop it onto “Frameworks” in the Groups & Files pane in Xcode. Don’t choose to copy the files.


Compiling YAJL from the source using the shipped makefile will produce the dynamic library binary files (yajl*.dylib) under /usr/local/lib. Although adding these files to the frameworks gets the project to compile and run on the simulator, this won’t work on a device since only static libraries are allowed on devices for third party frameworks.

Compiling the static library from the source code requires a bit more work but I found someone has already done that with more good stuff like an Obj-C wrapper for YAJL. So we can now simply grab this compiled YAJL static library for iPhone, exand it, then add the file “libYAJLIPhone.a” to the Frameworks.


Then also add “/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/usr/lib/libxml2.dylib” to Frameworks.

Next, open Project Info, locate the Build page, and look for the “Header Search Paths” property. Add the following two paths to the search paths property.


*Although it seems LibXML is not required, I did get compilation errors if LibXML is not in the Frameworks.

Hack and get MGTwitterEngine to build

It appears that MGTwitterEngine is still written against a previous version of YAJL (supposedly a pre-1.0 version). So if at this stage you go ahead and build the project, you will see two errors from MGTwitterEngine.

error: too few arguments to function 'yajl_alloc'
error: too few arguments to function 'yajl_free_error'

It looks like the latest version of YAJL has changed its signatures of the functions “yajl_alloc” and “yajl_free_error”. So let’s hack the corresponding code in MGTwitterYAJLParser.m to work around the build errors. Find the calls to these two functions and change the code as follows.

_handle = yajl_alloc(&callbacks, &cfg, nil, self);
yajl_free_error(nil, errorMessage);


Now you can hit Build and the project should build successfully. Next, you should take a look at AppController.h and AppController.m which come with MGTwitterEngine and see how to use it. It’s pretty easy to use once you get past the compilation problems. Now we have a fully functional and nicely built Twitter library ready to be used for any iPhone project! Also, if you have any suggestion or any better way to get the stuff to work please let me know.

Conditional compilation flag for iPhone OS 3.0

If you want to take advantage of the new APIs from iPhone SDK 3.0 while keeping compatibility with pre-3.0 devices, using the following conditional compilation flag is a good solution.

#ifdef __IPHONE_3_0
//pre 3.0

Compile cmemcache on Gentoo

I needed to install cmemcache on a Gentoo box in order to enable Django to work with memcached. But when I tried to compile the cmemcache code, I got such error messages:

‘CmemcacheObject’ has no member named ‘mc_ctxt’

I’m surprised Google didn’t give me many answers. But I came across this post which was very useful. So in the end, here’s how I got cmemcache compiled and installed on Gentoo.

cd ~/code
sudo emerge libmemcache
wget http://gijsbert.org/downloads/cmemcache/libmemcache-1.4.0.rc2.patch
wget http://gijsbert.org/downloads/cmemcache/cmemcache-0.95.tar.bz2
# the patch was made using a folder called reference
mkdir reference
cd reference
tar xjvf ../libmemcache-1.4.0.rc2.tar.bz2
cd ..
patch -p0 < libmemcache-1.4.0.rc2.patch
cd reference/libmemcache-1.4.0.rc2
./configure && make
sudo make install
cd ../../
tar xjvf cmemcache-0.95.tar.bz2
cd cmemcache-0.95
sudo python setup.py install



为无为 事无事 味无味 大小多少 报怨以德 圆难于其易 为大于其细 天下难事 必作于 天下大事 必作于

  1. 难/易,是对”Getting Real“哲学的概括
  2. 大/细,是对Mac(包括iPhone)哲学”polish the hell out of it“的概括

我想,要做伟大的软件产品,参照这两条足矣。要是几千年前有电脑,老子就一定是古代的Steve Jobs了。遂发至Twitter与友共勉。



  • Command-Option-Up: 切换.h和.m
  • Command-Shift-D: 快速打开文件
  • Control-2: 快速浏览当前文件成员
  • Alt-Command-Left/Right: 前一个/后一个编辑位置
  • Command-Shift-E: 最大化文件编辑区域
  • Control-/: 切换到下一个占位符(自动完成的时候)
  • Control-.: 下一个自动完成提示
  • Command-E: 使用当前选中内容查找
  • Command-G: 在当前文件中查找下一个
  • Command-Shift-F: 在项目中查找
  • Command-Alt-Shift-T: 在Groups&Files里定位到当前编辑的文件
  • Command+双击:浏览源文件
  • Alt+双击:查找帮助


    Browse Happy logo

    My tweets

    « 八    



    Fancy Stats