We should forget about small efficiencies — Donald Knuth
5 Jul
用 C 語言窺探記憶體, from 中央大學數學系單維彰的網站.
Introduction to Endianness.
最後我們講一則有趣的故事. 為什麼字元的排序設計, 要叫做大頭或小頭呢? 雖然從前面的解釋, 我們看得出意義, 但是這背後其實有一個故事.
Big-Endian 和 Little-Endian 並不是計算機工程師定的名稱, 而是英文作家 Jonathan Swift 在將近 300 年前創造的名詞!這個名詞出現於 Swift 創作的著名小說 “Gulliver’s Travels“, 中文通常翻譯作《格利佛遊記》或者《大小人國歷險記》或者《小人國歷險記》之類的, 許多讀者大概在童年時期讀過這本書的童話版節譯本.
這部故事書裡, 有一個虛構的『小人國』, 稱為 Lilliput. 格利佛意外抵達 Lilliput 的時候, 該國正在內戰. 內戰分成兩大派系 (沒有派系就沒有內戰): Big-Endian 和 Little-Endian. Big-Endian 和 Little-Endian 為了一件很可笑的小事而分成派系: Big-Endian (保守派) 堅持要從雞蛋比較大的那一頭敲開蛋殼 (大頭開蛋), 而 Little-Endian (改革派) 堅持要從雞蛋比較小的那一頭敲開蛋殼 (小頭開蛋). 雞蛋比較大的那一頭叫做 big-end, 因此支持大頭開蛋者就叫做 big-endian; 同理, 另一派就叫做 little-endian 了.
作者其實可能要藉用這個情節, 來諷刺當時在英國的政治與宗教時事. 後來, 計算機科學家也在爭吵關於 byte order 的問題: 究竟是把高位的字元放在前面比較好, 還是放在後面比較好? 一位當時在美國南加大的計算機科學家 Danny Cohen 在 1980 年 4 月 1 日,發表了標題為 “On Holy Wars and a Plea for Peace” 的文章 (後來在 1981 年刊登於 IEEE 的 Computer 期刊), 把這場計算機科學家的論戰比喻成格利佛在小人國遇見的 Big-Endian 和 Little-Endian 兩派之內戰. 這是非常有趣的譬喻, 一直流傳至今, 成為這兩種硬體設計理念的正式代名詞. 可見, 如果童話書讀得透徹, 長大後可以應用在偉大的論證上.
真奇妙, 現在我才知道 Big-Endian 和 Little-Endian 的由來. ^^
Popularity: 26% [?]
30 Jun
Microsoft to launch code-sharing site called CodePlex, from ZDNet.
Microsoft on Tuesday is expected to officially launch a community-building Web site where it will share code with developers.
The CodePlex site will be a venue for Microsoft to provide programmers with tools available under its Shared Source licenses. These licenses allow people to view the source code of products, the software giant said.
Popularity: 16% [?]
12 Jun
WTL Helper, from CodeProject.
Add-in for MS VC++.NET 2003 that helps to insert message handlers for WTL.
Popularity: 39% [?]
8 Jun
Secure Programming for Linux and Unix HOWTO, from digg.
This book provides a set of design and implementation guidelines for writing secure programs for Linux and Unix systems. If you like Writing Secure Code (Microsoft Press), you maybe like this article as well.
It’s recommended to read Chapter Six: Avoid Buffer Overflow.
Popularity: 19% [?]
1 Sep
SSE Performance Programming, from developer.apple.com.
Here is a tutorial about programming SSE in C language, learning how to do SIMD vector programming for MacOS X for Intel CPU.
Popularity: 20% [?]
5 Aug
An improvement on capturing similarity between strings, from CodeProject.
主要是 implement Levenshtein algorithm 和 Kuhn-Munkres algorithm (a.k.a Hungarian method).
Popularity: 17% [?]
5 Aug
IntelliJ IDEA 5.0 Released. Here is what’s new in 5.0.
The new features attracting me are subversion integration, J2ME/JSP 2.0 support and so on.
Popularity: 19% [?]