參兩摘|December 07, 2014

參兩摘|December 07, 2014

參兩摘|December 07, 2014

《參兩摘》是一種實驗,試圖把我感興趣且真正看過的影片、讀過的文章,加上些許個人心得,紀錄下來。


Technology

Strategy Letter V
大公司為何砸大錢資助開源碼專案?Fog Creek Software 創辦人 Joel Spolsky 解釋地很清楚。

Every product in the marketplace has substitutes and complements. A substitute is another product you might buy if the first product is too expensive. Chicken is a substitute for beef. If you're a chicken farmer and the price of beef goes up, the people will want more chicken, and you will sell more.

and...

Let me repeat that because you might have dozed off, and it's important. Demand for a product increases when the prices of its complements decrease. For example, if flights to Miami become cheaper, demand for hotel rooms in Miami goes up -- because more people are flying to Miami and need a room. When computers become cheaper, more people buy them, and they all need operating systems, so demand for operating systems goes up, which means the price of operating systems can go up.

Joel Spolsky 是我的偶像,很認同他對軟體開發與人才管理的見解。


Be careful when using std::string
撿幾個重點來看:

Chromium 元老級 Peter Kasting:

I'm very happy about your change to make the prefs APIs take strings instead of char*. Using char* never made sense to me and uglified caller code.

用 C++ 處理字串就用 std::string/std::wstring ,不要用老掉牙的 char*/wchar_t*


The C++ Tutorial
免費的線上電子書,屬入門級的教本,進階的主題雖有但輕輕帶過。


The Boost C++ Libraries
專講 Boost C++ 的書,使用瀏覽器觀看免費,PDF 版十美元。此為本書第二版,包含了 C++ 11 規格。Boost 是最貼近 C++ 標準規格的實作品,適合大膽嘗鮮的人享用。


Data Structures and Algorithms with Object-Oriented Design Patterns in C++
程式就是「演算法(Algorithms)+資料結構(Data Structures)」,了解各種資料結構的特性對於軟體開發助益甚大,而且不論用的是什麼程式語言,通通受用。


[Video] Sublime Text Clipboard Copy + Paste History — Quick Tip
近兩年竄起快速的文字編輯 Sublime Text 擴充能力強,本影片介紹支援歷史紀錄的剪貼簿,相當好用。


Lockless Programming Considerations for Xbox 360 and Microsoft Windows
相當有深度的文章。重點摘要:

由效能角度來看,在 Windows 平台上,MutexCritical Section 貴上 18~25 倍,又比 InterlockedIncrement 貴一些些。

Lockless algorithms are not guaranteed to be faster than algorithms that use locks. You should check to see if locks are actually causing you problems before trying to avoid them, and you should measure to see if your lockless code actually improves performance.

老話一句:進行任何優化動作前,一定要先做測量。

Lockless Programming 會讓程式碼更複雜,請謹慎使用,想清楚再用。

以下兩組由 Herb Sutter 大神帶來的影片有 Lock-Free Programming 的最新資訊,先記著: