Sutter on Hungarian Notation
Posted on August 18th, 2008 at 16:10 by fr3@K

From Sutter’s Mill:

… The main trouble with Systems Hungarian comes from trying to embed information about a variable’s type into the variable’s name by prepending an encoded wart like the venerable sz, pach, ul, and their ilk. Although potentially helpful in a weakly-typed language like C, that’s known to be brittle and the prefixes tend to turn into lies as variable types morph during maintenance. The warting systems also don’t extend well to user-defined types and templates.

I am glad to learn that the Guru and I share similar views on this matter.


Further readings:

del.icio.us:Sutter on Hungarian Notation digg:Sutter on Hungarian Notation spurl:Sutter on Hungarian Notation newsvine:Sutter on Hungarian Notation furl:Sutter on Hungarian Notation Y!:Sutter on Hungarian Notation 黑米共享書籤:Sutter on Hungarian Notation 推推王:Sutter on Hungarian Notation
Exception Handling 新思維
Posted on August 18th, 2008 at 0:38 by fr3@K

New mind set

一直以來 exception handling 與 exception safety 就是 C++ 最重要的課題之一. 正確的 exception handling 真的不是一件跟吃蛋糕一樣容易的事.

但, 它是否一定如此困難, 以致於 只有語言專家才能搞得定? 我認為這與事實相去甚遠.
(more…)

del.icio.us:Exception Handling 新思維 digg:Exception Handling 新思維 spurl:Exception Handling 新思維 newsvine:Exception Handling 新思維 furl:Exception Handling 新思維 Y!:Exception Handling 新思維 黑米共享書籤:Exception Handling 新思維 推推王:Exception Handling 新思維
iGoogle, Not Safer than Anything Else?
Posted on August 10th, 2008 at 17:51 by fr3@K

Some of my friends use iGoogle as a portal for handling daily office routines. They had been selling me the solution for a while. They were able to get me to give iGoogle a test drive a few weeks ago.
(more…)

del.icio.us:iGoogle, Not Safer than Anything Else? digg:iGoogle, Not Safer than Anything Else? spurl:iGoogle, Not Safer than Anything Else? newsvine:iGoogle, Not Safer than Anything Else? furl:iGoogle, Not Safer than Anything Else? Y!:iGoogle, Not Safer than Anything Else? 黑米共享書籤:iGoogle, Not Safer than Anything Else? 推推王:iGoogle, Not Safer than Anything Else?
GION 0.1.0 Released
Posted on July 15th, 2008 at 0:40 by fr3@K

GION is a project I recently created as a part of my effort towards cleaning-up some of the not-so-pretty and strengthening exception safety of the project code base at work.

It’s released under one of the most permissive FOSS licenses I know of, MIT license, in hope, would help others to write better C++ more easily.

Feedback welcomed.

del.icio.us:GION 0.1.0 Released digg:GION 0.1.0 Released spurl:GION 0.1.0 Released newsvine:GION 0.1.0 Released furl:GION 0.1.0 Released Y!:GION 0.1.0 Released 黑米共享書籤:GION 0.1.0 Released 推推王:GION 0.1.0 Released
C++0x, Near Feature-Complete
Posted on July 8th, 2008 at 19:48 by fr3@K

From Sutter’s Mill:

… we already had a nearly-complete C++0x internal working draft — most features that will be part of C++0x had already been “checked in.” Only a few were still waiting to become stable enough to vote in, including initializer lists, range-based for loops, and concepts.

del.icio.us:C++0x, Near Feature-Complete digg:C++0x, Near Feature-Complete spurl:C++0x, Near Feature-Complete newsvine:C++0x, Near Feature-Complete furl:C++0x, Near Feature-Complete Y!:C++0x, Near Feature-Complete 黑米共享書籤:C++0x, Near Feature-Complete 推推王:C++0x, Near Feature-Complete
Google Forbids Use of Exception in C++
Posted on July 6th, 2008 at 23:57 by fr3@K

Quote from Google C++ Style Guide:

We do not use C++ exceptions.

在極端狀況下, 我能想像在 no virtual function 或是 no templates 但仍能使用 STL 的環境寫 C++. 但完全禁止 user-defined classes/functions 以拋出 exception 的方式回報錯誤的環境呢? No, thanks. 即便有免費的食物與漂亮的辦公室, 這還是太折磨人了.
(more…)

del.icio.us:Google Forbids Use of Exception in C++ digg:Google Forbids Use of Exception in C++ spurl:Google Forbids Use of Exception in C++ newsvine:Google Forbids Use of Exception in C++ furl:Google Forbids Use of Exception in C++ Y!:Google Forbids Use of Exception in C++ 黑米共享書籤:Google Forbids Use of Exception in C++ 推推王:Google Forbids Use of Exception in C++
Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation
Posted on June 15th, 2008 at 15:57 by fr3@K

For those of you using Delicious Bookmarks with Firefox, beware of that the latest version of the add-on (2.0.58) may break your tab navigation functionality.

Symptoms:

  1. CTRL+PG_DOWN (and CTRL+PG_UP) behaved very funny. Instead of setting focus on the next tab, it sets focus on the tab next to the next tab. If I had exactly two tabs, C+PD/PU would always set focus on the tab that currently has the focus, i.e. nothing really happens.
  2. Opening new tabs at the wrong tab order. Always to the right of the last tab.
  3. Closing tabs sets focus on the wrong tab. Always on the first tab.

I am running FF 2.0.0.14 on Ubuntu Gutsy with roughly 30 add-ons enabled. I am way too lazy trying finding out if this issue only happens when certain add-ons are installed/enabled. Unless someone, who is serious in tracking this issue, needs me doing so.

Reverting Delicious Bookmarks to 1.5.44 (avaiable here) resolved the problem.

The last two symptoms described here might have something to do with Tab Mix Plus (I am using 0.3.6). I’ve reported this issue in a review on Firefox Add-ons.

del.icio.us:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation digg:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation spurl:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation newsvine:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation furl:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation Y!:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation 黑米共享書籤:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation 推推王:Delicious Bookmarks Upgrade Breaks Firefox Tab Navigation
真, Google Reader 密技
Posted on June 12th, 2008 at 0:59 by fr3@K

下午 餅乾 報了一個有趣的 Google Reader 彩蛋 給我.

成功登入後輸入 魂斗羅 密技. 不要懷疑, 就是你熟悉的 “上上下下左右左右BA“.

Good night and enjoy~~

del.icio.us:真, Google Reader 密技 digg:真, Google Reader 密技 spurl:真, Google Reader 密技 newsvine:真, Google Reader 密技 furl:真, Google Reader 密技 Y!:真, Google Reader 密技 黑米共享書籤:真, Google Reader 密技 推推王:真, Google Reader 密技
Live (MS) Search Spam
Posted on June 10th, 2008 at 22:37 by fr3@K

這幾個禮拜從 COdE fr3@K 的 log 開始注意到有愈來愈多 “人” 被 search.live.com 經由 “jeffhung” 這個 keyword 導到我的站上.
(more…)

del.icio.us:Live (MS) Search Spam digg:Live (MS) Search Spam spurl:Live (MS) Search Spam newsvine:Live (MS) Search Spam furl:Live (MS) Search Spam Y!:Live (MS) Search Spam 黑米共享書籤:Live (MS) Search Spam 推推王:Live (MS) Search Spam
Containers with Stateful Allocator, a Bug in C++98
Posted on June 8th, 2008 at 15:02 by fr3@K

前一陣子花了些時間寫一個 allocator library. 首要目標就是要能符合 C++ Standard 對 allocator 定義的 requirement. 當然也要相容於 Standard C++ Library 的 container 實作, 能與所有的 container function 正確的 inter-operate. 在這個過程中, 我意外地一腳踏進又一個 C++ 的陰暗角落.

先讓我把這個有點嚇人的結論寫在前面:

    你所使用的標準 container , 很可能無法完全正確地與 object-stateful 的 allocator 一起運作. 即便該 allocator 確實是符合標準規範的.

不過先別慌. 只要拿來與 container 搭配使用的是沒有 per instance 狀態的 allocator, 你就不會遭遇本文所討論的問題.

(more…)

del.icio.us:Containers with Stateful Allocator, a Bug in C++98 digg:Containers with Stateful Allocator, a Bug in C++98 spurl:Containers with Stateful Allocator, a Bug in C++98 newsvine:Containers with Stateful Allocator, a Bug in C++98 furl:Containers with Stateful Allocator, a Bug in C++98 Y!:Containers with Stateful Allocator, a Bug in C++98 黑米共享書籤:Containers with Stateful Allocator, a Bug in C++98 推推王:Containers with Stateful Allocator, a Bug in C++98

Page 1 of 11[ 1 ]2345»...Oldest