Category Archives: Life

My Daily Life

What is Software Architecture?

Software architect looks like a prestige job, but to me, it is nothing different from an engineering with a deeper understanding about the problem domain and limitations.

As an architect, I look at my job from different dimensions. This ability is very important or you will fall into the trap of over-engineering or under design(It may be the case for my daily life).

1. Business Dimension: Understand the problem

The key difference between a software architect and a general programmer is not simply the technical competence, it should be the degree of understanding to a business domain. Without such understanding, an architect cannot make reasonable trade-off among different solutions. It covers the flexibility, configuration, performance and loading concern.

2. Structural Dimension: How the code are organized and grouped?

The main difference between a good program and bad program is how the program is structured so that it can truly reflect the current and upcoming business use cases. I suggest to start small, and try to explain the function of each module in “1 simple sentence”. You can refactor the project later on if your business grows.

3. Tier Dimension: Classical MVC? Restful => Spring => ESB => DB?

Once we defined a business use cases, we can design the data flow. Usually data or request will flow through different layers which have different concerns. MVC is a classical 3-tier architecture, which C & V are external facing while M are the business objects, we can then focus on the responsibilities of each tier. Furthermore, there are more layering architecture, for example, Events => Karfka => Cassandra for data warehouse. We need to broaden our eye to understand how others solve similar problems

4. Library Dimension: What and why we can choose

We should not reinvent the wheel, when we want to implement something, we should first Google to see if there is any available libraries which serves the purposes. Using other’s libraries can save your time and most importantly, keep some design frauds away from your system. Of course, if you are an experienced architect, you can quickly sniff a library fit your needs or not, it is the key value you added to your team.

Nokia’s study

Nokia is a interesting company to study, especially when u are looking from an engineering perspective. It has the best engineer team, which lead to the success of Nokia at 199x, but it failed to adapt to the new era and decline.

I think the decline is due to the company can no longer blend tech and business well, given the explosive growth of business.

(Below is bit technical, but it supports my view of the conflict between tech and business)

Nokia’s management heavily invest in R&D, one of the key research area is embedded Linux, which is another stream outside the Symbian OS. It has the concept of App, but the App is hard to code. The App is written on C++ and use Qt as the UI library. It is really a natural choice because this couple has been around with Linux since day 1. The hurdle for writing App is the exceptionally low computational power (<100Mhz). exactly the same like today programmers, learning Java is easy, learning GOOD Java is hard.

Furthermore, it seems Nokia business side doesn’t want to promote the embedded Linux concept, every one heard the common models, 8810, 8850, N73, N95, 5800 and etc. But seems no one have seen Nokia Communicator or E90.

Later on, the industry come up with J2ME, which partially solve the hardware management issue, but still, very hard to code.

Having the app concept without a complete end-to-end use cases means no one will use app. Finding, buying, downloading and installing an app takes more than two hours. You cannot expect your grandma can do it on her own. That’s why I think App Store kills Nokia.

It simply lost the first mover advantage.

After that, there are two chances for Nokia to turn around, at least capture a decent portion in the market. The first one is launching Nokia 5800 Xpress Music in 2008 and the second one is choosing Windows, rather than Android.

Nokia 5800 was considered as a game changer, with a touch screen, on Symbian S60 V5, 3G network and driven by Music as opposed to iTunes that time. The key failure is using Resistive display (in contrast to capacitive display by iPhone 1G), which limit the usage with a Pen and no Multi-touch Gesture. The product is just a clone of iPhone features superficially, without knowing the key market value. It simply fails to blend tech and design and maximize their advantages. At the same time, other competitors start adapting Android at top tier phone which lag Nokia behind.

The second chance is terminating Symbian OS, and choosing M$ Windows instead of Android. I am not saying the Stephen Elop Trojan Horse(Smile) case, just the management fails to do the SWOT analysis well. Android must be a better choice given Nokia strong engineering team in embedded system, which is transitive to Android. Nokia also uses ARM chips since 5800. It is essentially asking a Java Developer to write a C# program from scratch, it simply gives up all the know-how.

All in all, the success of Apple is not simply UI/UX, but the complete supply chain of App. Nokia failures is caused by failure to understand the market.

PS. I am looking at Nokia 8 recently, even though it is not the original Nokia, the minimal customization Android and steel body may make it a good choice for me.

Advanced Marathoning


I have read this book recently, My Long Run Club training schedule are based on this book. So, reading this book and understand the reason and intention for each training session is so important.

The book provides schedules for both busy runners and serious runners, the common mistakes and reasons for each session. It also explains with clear pictures that help everyone to understand.

Salute to CyanogenMod Team

I have never been iFanBoy, I have been using Android for 5 years. Motorola => Xperia Neo V => Xperia P. The Phone Manufacturers doesn’t want you to use your phone for so long, they only provide one update or two, but no more than 3, except the Google Nexus Series >_<. Thanks to the Open Source community, some volunteers ( has given my Xperia P a new life. My Xperia P will have Android Open Source Project (AOSP) Build with the famous CyanogenMod 11, which is equivalent to Android KitKat 4.4.

I can enjoy those features like advanced Notification Bar, Dome Photo, less memory usage and longer bettery life (KitKat rocks!!)

In order to switch from Sony Stock Rom to CM11, we need the following procedure.

1. Unlock BootLoader (XDA Instructions)
2. Download GAPPS and CM11 (Percy_G2 CM11), Copy them to the Internal Storage of Xperia P
3. Extract the Boot.img from the CM11 Images
4. Use FastBoot Command to install the Boot.img to my Xperia P in FastBoot Mode

fastboot flash boot boot.img
fastboot reboot

5. Press the Power button several times to enter the Restore Menu
6. Wipe the cache
7. Install the Image from Internal Storage (CM11 => GAPPS)
8. Restart Twice to Enjoy!!