All posts by Wei-Chiu

Wei-Chiu is a PhD candidate at Purdue University. He's interested in enabling elastic computing in cloud infrastructures. When he is not writing code, he spends most of time reading Wikipedia articles.


(原文轉自我fb) 這一年訂了很多雜誌:


繼續讀下去 美國訂雜誌心得


很討厭”鍵盤創業家” (原文轉自我fb)

這簡直就是無本萬利! 如果這樣也可以,那我應該馬上找人去做一個給寵物用的facebook, 再找人做給老人交友的facebook, 再做個給小baby的媽媽們的facebook…..一口氣做十個網站,創業成功率低沒關係,十個總有一個會成功吧,我只要有點子,分發出去,等兩年後我就可以空手套白狼了。

有個點子是頗重要的,但更重要的是執行。要別人為你免費寫程式,憑什麼? 一個除了點子什麼都沒有的人誰會想跟? 最起碼也說一下經歷吧,例如在這之前開過幾間公司等等。如果想做網路創業除了點子什麼都沒有,這成功的機率也太低了,應該很少人想冒這個險。要人免費付出等成功之後再分紅,但連個business plan都沒有要怎樣保證成功?

軟體成本低嗎? 軟體很容易免費取得、使用 (例如google, facebook不用錢),但並不代表軟體不用錢。google, facebook不用錢是因為它們的business model不是使用者付費而是廣告商付費。就像電視節目一樣,看電視不用錢不代表節目製作不用錢,而且事實上製作電視節目、請明星上節目的費用貴到翻了。


(06/20/2014) 再度更新:關於AT&T的新Mobile Share Plan方案的介紹,請看我的新文章


(08/06) 更新:今年(2013)Apple 的Back to School 方案增加了購買iPhone跟iPad的促銷方案:在Apple Education Store 買iPhone/iPad送$50 iTunes gift card. 不無小補啦


繼續讀下去 美國辦手機心得

GCC 4.8.0

GCC 4.8.0 is released recently and I’ve been testing it against Mace.

Interestingly starting from gcc 4.8.0, g++ uses a new error reporting format similar to LLVM/Clang which shows exactly where the error comes from (see: Expressive Diagnostics in Clang), unlike in the previous versions where the compiler only indicates which line it is. In the case where the error is inside a macro, it also expands the macro and shows where exactly the error resides. (nice feature)

However, gcc 4.8.0 added a new warning: -Werror=unused-local-typedefs for typedefs that are locally defined but not used (which is annoying). This new warning breaks several well known systems, in particular V8 engine and Boost library. Because it emits warning when compiling boost header files and mace regards warnings as errors, gcc 4.8.0 does not compile mace. A temporary workaround is to disable the warning (cmake -D CMAKE_CXX_FLAGS=-Wno-unused-local-typedefs)

The latest boost repo eliminated some of the unused local typedefs, but not all. I made a patch to eliminate the rest of the unused local typedefs and submitted to boost. Hope this patch will appear in the next boost revision!

Summer Plans

End of the semester and end of my fifth year at Purdue!

Time to move forward and plan for the summer. I’ll plan for a road trip, and work on a research paper or two. Other than that, I am planning to learn something more: I want to get started learning OpenStack, node.js, V8 engine. I’ll also spend some time writing a business plan.

Oh, and prepare for my prelim 🙂

Hoping to get out of Purdue by the end of next year. Not that I don’t like Purdue. I love Purdue and I love West Lafayette, but it’s about time to grow up and make changes to this world!

1000th Changeset to Mace-Fullcontext

I pushed up the 1000th changeset to mace-fullcontext yesterday!

This is a huge milestone to this project. Since December 2011 we started this project, it’s been 16 months already.
This is a huge huge project that relies on so many people’s contribution.


In these 1000 changesets, we made 40401 lines of code of change in 351 files.

That contains 5700 lines of perl, 15700 lines of C++, 17900 lines of Mace code and some shell scripts.

Contribution was made by 7 members in 16 months.


ResearchGate is a social network website for researchers. It’s something similar to LinkedIn as to business people/professionals, but RG is geared towards researchers and scientists. ResearchGate lets you connect to other researchers, and let you upload the publication so that other people can download.

I personally find it useful. I host my workshop paper here in my blog for downloading, but I don’t seem to get any traffic. But since I uploaded it to RG, that paper has been downloaded several times. It could enhance my academic impact, I think.

Kernel Bug

Spent a whole night tracing a strange timer bug: Mace timer did not fire off at correct time on some machines. Specifically, on those machines, timer goes off one second earlier than requested. E.g., if you want it to fire off after 2 second, it actually fires off after 1 second. Strangely, it doesn’t happen to every machines.

Initially I thought it was a problem in Mace code, so I spent the night digging into the timer code. Finally, there’s one function to blame: pthread_cond_timedwait(). It does not behave correctly.

According this this StackOverflow post, this bug is triggered by a Linux kernel bug due to leap second. The problem will be gone after rebooting the machine, and indeed that problematic machine hasn’t been rebooted for more than a year. Well, this is so unexpected.

Submitted Another Paper

We submitted a paper yesterday that describes our system. It’s anonymized submission so I can’t talk about the details.

But let me talk about the engineering effort.

We’ve wrote 40 thousand lines of code in the past one and half years, and we’ve checked in almost 1000 changesets in this period. I am the main contributor and wrote about 60% of all the code. But this is a large project. We had six people working on this project, either contributing the code, testing the system or providing suggestions, so that’s equivalent to more than a hundred man-months!

All of the effort is simply for publishing one research paper.  Phew! This is not easy!