Re: 你怎麼在看簡體的東西!?
Posted on August 8th, 2010 at 23:54 by fr3@K
Hi Sam,
你的 留言 讓我想了許久. 小弟以為, 原創的繁中技術文字過少的最大關鍵不在於書籍市場, 而在寫的動機. 只要找到非金錢回報的動機, 就能寫得下去. 畢竟, 這是個屬於網路的年代, 只要有心有料, 甚至只要自 high, 誰都可以發表.
我們都在這片土地上生活, 在這個業界燃燒熱血, 盼望能實現自己的夢想. 以我為例, 我的夢想是台灣能有個健康前瞻有搞頭的軟體產業. 讓我們不一定要離鄉背井, 才能夠免去賣肝的宿命, 可以好好賣腦揮撒我們的熱情展現我們的專業, 並且得到適當的回報.
我很清楚, 在這個大環境, 我的想法多少不太現實. 即便如此, 除了抱怨, 我還選擇盡一點微薄的力量. 這個部落格能還能活著, 最大的動力正是對這個夢想的執著.
你的夢想是什麼?
[後記] 這篇文字是在抒發我的牢騷, 非針對個人. Sam, 不好意思借用了你的名字…
Did You Know, “new (nothrow) T” Throws?
Posted on August 1st, 2010 at 20:08 by fr3@K
可能會出乎不少人的意料, 下面的 code snip 可能會拋出 exception.
Listing-1.
C++:
-
using namespace std;
-
T* new_t_nothrow()
-
{
-
return new (nothrow) T;
-
}
(more...)
You Don’t Have to Resort to Goto
Posted on June 19th, 2010 at 22:35 by fr3@K
你一定看過這樣的 code:
C:
-
int do_something(size_t n)
-
{
-
int result = ERROR;
-
char* buf;
-
-
if(n)
-
{
-
buf = malloc(n);
-
if(buf != 0)
-
{
-
if(do_foo(buf, n) == OKAY)
-
{
-
if(do_bar(buf, n) == OKAY)
-
result = OKAY;
-
}
-
free(buf);
-
}
-
}
-
-
return result;
-
}
可讀性差的巢狀 if block, 只為了堅持由一處 return.
(more...)
後方, 起浪了
Posted on May 4th, 2010 at 23:54 by fr3@K
[Update] boost::decay documentation issue
Posted on January 14th, 2010 at 17:35 by fr3@K