RSS feed [root] /weblog




login:

password:

title search:




 


Mon Jan 16 21:51:42 HKT 2012

weblog


log down some useful resource


(google search) (amazon search)
second
download zip of files only

Sat Feb 04 10:25:35 HKT 2012 From /weblog/web

REST


http://martinfowler.com/articles/richardsonMaturityModel.html

What is REST? http://roy.gbiv.com[..]/2008/rest-apis-must-be-hypertext-driven , in short, it should not limit to web and http

http://stackoverflow.com[..]1118/what-exactly-is-restful-programming

(google search) (amazon search)


Fri Feb 03 00:10:48 HKT 2012 From /weblog/java/performance

various tips



Interestingly, PrintWriter, if pooled, shows considerable performance improvement. The creation of the object is expensive because of a call to get the line separator in its constructor.

http://sachinhejip.blogspot.com[..]/08/experiences-in-java-performance.html

Experience in twitter - http://www.umbrant.com/blog/2012/twitter_jvm_tuning.html

(google search) (amazon search)


Thu Feb 02 23:47:23 HKT 2012 From /weblog/software_engineering

lean


“Introduction of Lean Project Management” - http://blog.aaladdin.com/?p=29

Applying Kanban - http://blogs.lessthandot.com[..]s/applying-kanban-to-it-processes-part-2 http://jchyip.blogspot.com[..]-and-kanban-for-it-operation-kanban.html

Deming’s 14 Points, obvious and theoric, but still a good reading - http://leanandkanban.wordpress.com/2011/07/15/demings-14-points/

(google search) (amazon search)



Thu Feb 02 23:44:15 HKT 2012 From /weblog/google/android

development


http://mobile.tutsplus.com[..]ting-your-application-to-android-market/

(google search) (amazon search)


Thu Feb 02 23:43:14 HKT 2012 From /weblog/java/features

debugging


VisualVM , a collection of tools for debugging and monitoring - http://www.infoq.com/news/2008/05/visualvm

Presentation of BTrace, which allow user to have event base tracing - https://btrace.dev.java.net[..]ts/8510/98299/BTrace_BOF-5552_J12008.pdf

JDK command line tools which help to solving memory issue - http://plumbr.eu/blog/solving-outofmemoryerror-jdk-tools

(google search) (amazon search)


Thu Feb 02 22:39:11 HKT 2012 From /weblog/trip

hongkong_hiking


(9:15)錦英>雁谷>靈猿守谷>猿頭>吊手岩>雁谷>110礦洞>耀安(12:30) - http://hk.myblog.yahoo.com/uncle_1389

路線:沙頭角公路→紅花嶺→礦山→紅花嶺→沙頭角公路 - http://go2nature.net/forum/viewtopic.php?p=1148245#1148245

路線:落馬洲→鐵坑山→鳳崗 - http://go2nature.net/forum/viewtopic.php?p=1149172#1149172

迪士尼後面山頭 - http://go2nature.net/forum/viewtopic.php?p=1149194#1149194

紅花秘洞 - http://hiking1688.xanga.com/756623531/2011-11-12/

丫髻穿鼻 - http://hiking1688.xanga.com/757264463/2011-12-03-/

石芽北脊 - http://anlth2010.blogspot.com/2011/11/2011-11-20.html

路線:警校道→南朗山北橫山徑→海馬→南朗山頂→南朗山南脊→南朗山路→黃竹坑 - http://go2nature.net/forum/viewtopic.php?p=1160106#1160106

龍園 -> 外環單車徑 -> 流浮山老街 -> 蠔塚 -> 沙江天后廟 - http://www.utravel.com.hk[..]content=main&utm_campaign=weekend-120201

(google search) (amazon search)



Tue Jan 31 00:22:59 HKT 2012 From /weblog/misc

number


A nice overview (with detailed reference) about how computer operate on floating point number - http://www.regdeveloper.co.uk[..]2006/08/12/floating_point_approximation/

Why we should never use float / double for money - http://binkley.blogspot.com/2012/01/major-code-irritants.html http://www.odi.ch/prog/design/newbies.php#43

(google search) (amazon search)


Tue Jan 31 00:14:39 HKT 2012 From /weblog/software_engineering/testing

antipattern


The evil test:

1. Evil tests create a lock on how the code is implemented.
2. Cause duplication.
3. Builds uncertainty on the tests (red is meaningless).
4. Decrease productivity.
5. Discourage change.

http://www.makinggoodsoftware.com/2012/01/27/the-evil-unit-test

use thread in junit - http://softwareintegrityblog.com[..]blog/2007/11/05/false-positives-in-junit

Don't try to test everything - http://www.nearinfinity.com[..]ay?entry=unit_testing_avoiding_extremism

Why TDD fail? Because test is too complicate to write - http://agile.dzone.com/news/why-you-fail-tdd ( I agree it a lot )

Hard to test something? Unreadable tests? Slow running tests? It takes too long to write a test? Some solution suggested - http://www.stephenchu.com[..]/last-d-in-tdd-means-more-than-just.html

Comment out test so that the code compile - http://martinfowler.com/bliki/TestCancer.html

A list of TDD antipattern - http://blog.james-carr.org/?p=44 http://www.exubero.com/junit/antipatterns.html

And the long discussion using random in unittest - http://tech.groups.yahoo.com[..]rivendevelopment/message/20458?var=1&l=1
Here is an example of using random in unittest, it actually same for every new instance! - http://www.skizz.biz/archives/000568.html

Test abstraction smells - http://agileinaflash.blogspot.com[..]com/2011/11/test-abstraction-smells.html

(google search) (amazon search)


Thu Jan 26 20:48:16 HKT 2012 From /weblog/design/concurrency

thread


Intel Guide for Developing Multithreaded Applications - http://software.intel.com[..]or-developing-multithreaded-applications

Difference ways to stop a thread - http://www.ddj.com[..]ept_url=/hpc-high-performance-computing/

Interesting, I am not sure if I agree, but chrome ( which use fork ) are really cool in performance:
There’s another problem with Unix programming in Ruby that I’ll just touch on briefly: Java people and Windows people. They’re going to tell you that fork(2) is bad because they don’t have it on their platform, or it sucks on their platform, or whatever, but it’s cool, you know, because they have native threads, and threads are like, way better anyways.

Fuck that.

Don’t ever let anyone tell you that fork(2) is bad. Thirty years from now, there will still be a fork(2) and a pipe(2) and a exec(2) and smart people will still be using them to solve hard problems reliably and predictably, just like they were thirty years ago.

MRI Ruby people need to accept, like Python (you have seen multiprocessing, yes?), that Unix processes are one of two techniques for achieving reliable concurrency and parallelism in server applications. Threads are out. You can use processes, or async/events, or both processes and async/events, but definitely not threads. Threads are out.
http://tomayko.com/writings/unicorn-is-unix

1x1 win M*N - http://binkley.blogspot.com/2012/01/1-1-beats-n-m.html

(google search) (amazon search)


Thu Jan 26 20:47:20 HKT 2012 From /weblog/software_engineering

practice


Analysis for Continuous Delivery: Five Core Practices

1. Start with a minimum viable product (MVP).
2. Measure the value of your features.
3. Perform just enough analysis up front.
4. Do less.
5. Include feature toggles in your stories.

http://www.informit.com/articles/article.aspx?p=1829417

(google search) (amazon search)


Thu Jan 26 20:43:49 HKT 2012 From /weblog/software_engineering

defect



The way software defects are seen on traditional vs agile projects reveals something about the differences in organizational culture. Given the following causes of defects...

Type 1: Programming error
Type 2: Misunderstood requirement
Type 3: Requirement defined incorrectly
Type 4: Discovered requirement

http://www.davenicolette.net[..]/index.blog/1590120/defects-and-culture/



(google search) (amazon search)


Thu Jan 26 20:42:55 HKT 2012 From /weblog/software_engineering

agile


http://agiletips.blogspot.com[..]2009/12/agile-is-about-deliverables.html <- and waterfall is about filling the process.

beck_keynote_xp2006, about accountable and responsible - http://www.google.com[..]eck_keynote_xp2006.pdf&ie=UTF-8&oe=UTF-8 http://www.carfield.com.hk[..]are+engineering/beck_keynote_xp2006.pdf?

Common issue of adopting Agile development values to the team - http://www.stickyminds.com[..]=12384&ObjectType=ARTCOL&btntopic=artcol

Compare develop software with same function in Agile and waterfall like process, report here - http://chriswoodill.blogspot.com[..]hy-agile-software-projects-are-good.html

What is agile? http://www.google.com[..]g+agile&sourceid=opera&ie=utf-8&oe=utf-8 http://bradapp.blogspot.com[..]06/05/nutshell-definitions-of-agile.html http://bradapp.blogspot.com[..]2007/04/agile-development-distilled.html

May be minimum waste is the goal, agile is just the by-product? http://jchyip.blogspot.com/2007/05/agility-is-not-point.html http://jchyip.blogspot.com[..]ctive-enterprise-architecture-comes.html http://dreamhead.blogbus.com/logs/33816442.html

Commons anti-pattern - http://www.theserverside.com[..]_id=49239&asrc=EM_NLN_3595241&uid=703565 http://www.dalkescientific.com[..]rchive/2009/12/29/problems_with_tdd.html

How yahoo turn to agile - http://www.devagile.com/modules/news/article.php?storyid=244

Triggers for when to use Agile (any one could trigger):

* There's an advantage to get something partial out now rather than everything later
* Not familiar with technology - want to reduce risk
* Want to engage and develop staff
* Competitive pressure for adaptation and faster delivery

http://jchyip.blogspot.com[..]e-thinking-about-agile-vs-waterfall.html

Agile is about a shift in attitude more than process. It requires a shift in focus that is easy to explain, but hard to put in practice. - http://journal.bitshaker.com[..]articles/2008/11/19/a-shift-in-attitude/

Change in process, lead to change in mindset, and view the problem in difference perpective - http://dreamhead.blogbus.com/logs/33068654.html

Discuss about issues of adopting Agile development - http://www.artima.com/forums/flat.jsp?forum=106&thread=246513 http://www.infoq.com/articles/levison-TDD-adoption-strategy

http://www.agileproductdesign.com[..]oduct_owner_and_problem_shaped_hole.html

Agile, is not a choice of good from bad, it is a choice of best from good - http://martinfowler.com/bliki/ComparativeValues.html

12 Principles for Agile Software Development - http://agileinaflash.blogspot.com[..]08/12-principles-for-agile-software.html

http://www.agile-software-development.com[..]ow-agile-are-you-take-this-42-point.html

http://www.infoq.com/news/2009/11/agile-micromanagement

A article show how mirgating to agile from waterfall - http://www.infoq.com/articles/design-for-hybrid-agile-adoption

Top 10 book - http://www.infoq.com/news/2011/08/top-agile-books

Good and bad about agile - http://www.makinggoodsoftware.com[..]/31/agile-the-good-the-bad-and-the-ugly/

(google search) (amazon search)


Thu Jan 26 00:07:35 HKT 2012 From /weblog/health

Food to clean body


導讀:高脂肪食物、食品添加劑、空氣中的有毒排放物,越來越多的毒素充斥著我們的生活;痤瘡、口臭、便秘、頭疼……這些都是體內毒素積聚的信號。當健康面臨威脅,排毒就成了每日必不可少的功課。



飲食排毒:

1、助肝排毒

肝臟是重要的解毒器官,各種毒素經過肝臟的一系列化學反應後,變成無毒或低毒物質。我們在日常飲食中可以多食用胡蘿蔔、大蒜、葡萄、無花果等來幫助肝臟排毒。

胡蘿蔔:是有效的排汞食物。含有的大量果膠可以與汞結合,有效降低血液中汞離子的濃度,加速其排出。每天進食一些胡蘿蔔,還可以刺激胃腸的血液循環,改善消化系統,抵抗導致疾病、老化的自由基。

大蒜:大蒜中的特殊成分可以降低體內鉛的濃度。

葡萄:可以幫助肝、腸、胃清除體內垃圾,還能增加造血機能。

無花果:含有機酸和多種酶,可保肝解毒,清熱潤腸、助消化,特別是對SO2、SO3等有毒物質有一定抵禦作用。

2、助腎排毒

腎臟是排毒的重要器官,它過濾血液中的毒素和蛋白質分解後產生的廢料,並通過尿液排出體外。黃瓜、櫻桃等蔬果有助於腎臟排毒。

黃瓜:黃瓜的利尿作用能清潔尿道,有助於腎臟排出泌尿系統的毒素。含有的葫蘆素、黃瓜酸等還能幫助肺、胃、肝排毒。

櫻桃:櫻桃是很有價值的天然藥食,有助於腎臟排毒。同時,它還有溫和通便的作用。



3、潤腸排毒

腸道可以迅速排除毒素,但是如果消化不良,就會造成毒素停留在腸道,被重新吸收,給健康造成巨大危害。魔芋、黑木耳、海帶、豬血、蘋果、草莓、蜂蜜、糙米等眾多食物都能幫助消化系統排毒。

魔芋:又名“鬼芋”,在中醫上稱為“蛇六谷”,是有名的“胃腸清道夫”、“血液淨化劑”,能清除腸壁上的廢物。

黑木耳:黑木耳含有的植物膠質有較強的吸附力,可吸附殘留在人體消化系統內的雜質,清潔血液,經常食用還可以有效清除體內污染物質。

海帶:海帶中的褐藻酸能減慢腸道吸收放射性元素鍶的速度,使鍶排出體外,因而具有預防白血病的作用。此外,海帶對進入體內的鎘也有促排作用。

豬血:豬血中的血漿蛋白被消化液中的酶分解後,產生一種解毒和潤腸的物質,能與侵入人體內的粉塵和金屬微粒反應,轉化為人體不易吸收的物質,直接排出體外,有除塵、清腸、通便的作用。

蘋果:蘋果中的半乳糖荃酸有助於排毒,果膠則能避免食物在腸道內腐化。草莓:含有多種有機酸、果膠和礦物質,能清潔腸胃,強固肝臟。

蜂蜜:自古就是排毒養顏的佳品,含有多種人體所需的氨基酸和維生素。常吃蜂蜜在排出毒素的同時,對防治心血管疾病和神經衰弱等症也有一定效果。

糙米:是清潔大腸的“管道工”,當其通過腸道時會吸掉許多淤積物,最後將其從體內排除。



4、排毒食譜上的其他食物

芹菜:芹菜中含有的豐富纖維可以像提純裝置一樣,過濾體內的廢物。經常食用可以刺激身體排毒,對付由於身體毒素累積所造成的疾病,如風濕、關節炎等。此外芹菜還可以調節體內水分的平衡,改善睡眠。

苦瓜:苦味食品一般都具有解毒功能。對苦瓜的研究發現,其中有一種蛋白質能增加免疫細胞活性,清除體內有毒物質。尤其女性,多吃苦瓜還有利經的作用。

綠豆:綠豆味甘性涼,自古就是極有效的解毒劑,對重金屬、農藥以及各種食物中毒均有一定防治作用。它主要是通過加速有毒物質在體內的代謝,促使其向體外排泄。

茶葉:茶葉中的茶多酚、多醣和維生素C都具有加快體內有毒物質排泄的作用。特別是普洱茶,研究發現普洱茶有助於殺死癌細胞。常坐在電腦旁的人堅持飲用還能防止電腦輻射對人體產生不良影響。

牛奶和豆製品:所含有的豐富鈣質是有用的“毒素搬移工”。

5、多飲水

對腸道,尤其大腸是糞便堆積的地方有好處。多飲水可以促進新陳代謝,縮短糞便在腸道停留的時間,減少毒素的吸收,溶解水溶性的毒素。最好在每天清晨空腹喝一杯溫開水。此外清晨飲水還能降低血液粘度,預防心腦血管疾病。



6、每週吃兩天素食

給腸胃休息的機會。因為過多的油膩或刺激性食物,會在新陳代謝中產生大量毒素,造成腸胃的巨大負擔。

7、多吃新鮮和有機食品

少吃加工食品、速食品和清涼飲料,因為其中含有較多防腐劑、色素。

8、在日常飲食中控製鹽分的攝入

過多的鹽會導致閉尿、閉汗,引起體內水分堆積。如果你一向口味偏重,可以試試用芹菜等含有天然鹹味的蔬菜替代食鹽。

9、適當補充一些維生素

如維生素C、E等抗氧化劑,以幫助消除體內的自由基。

10、吃東西不要太快

多咀嚼,這樣能分泌較多唾液,中和各種毒性物質,引起良性連鎖反應,排出更多毒素。

http://forward.hkwebs.net/archives/7389

Honey, carrot, kelp, edible tree fungus, cucumber, balsam pear, litchi, pig blood (??) , mung beans, tea - http://forward.hkwebs.net/archives/7998

讓癌細胞睡著的食物

請大家多吃含有這些有效成份的食物,讓身體內蠢蠢欲動的癌細胞多多睡覺。

在一場小型國際研討會,其中有一位目前在美國癌症中心的 戴 博士以 "Is Cancer Curable?" (癌症是否能治癒?)為題,分享了他對癌細胞生長動力學的研究結果。

癌症最令人害怕的就是 metastasis(轉移)。

原生癌並不會讓病人死亡,然而一旦癌細胞轉移,它們在其它組織器官內的興風作浪就讓病人逐漸(或是很快速)的走向死亡。

但是,為什麼有些癌細胞已轉移的病人卻未繼續惡化?

日本曾解剖研究了幾十位無病痛往生的90-103歲老人,發現他們每一位體內都有不少的癌細胞。

但是,為什麼他們的癌細胞沒有造成身體的病痛?

戴 博士和幾位癌症研究學者發現,癌細胞在活躍一段時間後會進入「休眠期」,休眠一段時間後又再度活躍,興風作浪。

「休眠期」越長,病人能存活的時間就越長,甚至不發生令人害怕的「轉移」。現在醫學界積極的在研究拖延癌細胞「休眠期」的方法,包括利用藥物和飲食。

「有效預防細胞癌化」那篇中提到的幾種天然物
可藉由控制癌細胞內訊息傳導(signal transduction)的路徑進入「休眠期」,所以我把它們列出,請大家多吃含有這些有效成份的食物,讓身體內蠢蠢欲動的癌細胞多多睡覺。

1.咖哩 抗癌成份是 .......「薑黃素」
2.辣椒 抗癌成份是 .......「辣椒素」
3.薑 抗癌成份是 .......「薑油」
4.綠茶 抗癌成份是 .......「兒茶素」
5.大豆 抗癌成份是 .......「異黃酮」
6.蕃茄 抗癌成份是 .......「茄紅素」
7.葡萄 抗癌成份是 .......「白黎蘆醇」
8.大蒜 抗癌成份是 .......「硫化物」
9.高麗菜 抗癌成份是 .......「indole」
10.花椰菜 抗癌成份是 .......「硫化

咖 啡 與 洋 蔥
咖啡 的 點 滴
值得喜歡喝咖啡的朋友參考



【咖啡的新觀念】

享受一杯美味咖啡的同時,更對您的健康有意想不到的助益呢!在你下回品嚐時,不妨對咖啡先有以下的健康認知。

抗憂鬱

**少量的咖啡可使人精神振奮,心情愉快,紓解憂鬱的現象。

控制體重

咖啡因能提高人體消耗熱量的速率,一項研究現100毫克的咖啡因(約1杯咖啡),可加速脂肪分解,能使人體的新陳代謝率,增加百分之三至四,增加熱能的消耗,適量喝有減重效果。

促進消化

咖啡因會刺激交感神經,提高胃液分泌 ,如果在飯後適量飲用,有助消化。

利尿

咖啡具利尿作用,可提高排尿量,因而使上廁所次數增加..
改善便秘。

咖啡可刺激腸胃激素或蠕動激素,產生通便作用,可當快速通便劑。

降低患腸癌或直腸癌的機率

咖啡含有天然抗氧化物。

止痛

咖啡因做為一個藥品,可以加強某些止痛劑的效果,可減緩偏頭痛。

增強身體敏捷度

咖啡因也有助於在運動時,使運動閥值隆低,增加身體的敏捷度,使運動員締造較好的成績。

降低得膽結石的機會

最新來自哈佛大學公共衛生學院的一項研究指出,每天喝2-3杯咖啡比從不喝的人,平均得到膽結石的機會小了40﹪。
此外,咖啡所含的單寧酸,具有收斂性及止血、防臭的作用。

(2) 咖啡對身體的危害

哪些人應該少喝咖啡?
當身體出現以下狀況或疾病時,應少喝咖啡:
*發育中的兒童
*懷孕期間
*正在授乳的婦女
*老年人
*空腹前(或飯前)
*腹瀉者
*胃酸過多的人
*患有胃及! 十! 二指腸胃潰瘍者
*患有腸道過敏症候群者
*抽煙的人
*喝酒之後
*容易失眠的人
*有精神方面疾病的人
* 正在服用鎮定劑的人
*應限制鉀攝取的腎臟病患

(3) 咖啡與健康

每天喝咖啡最好的時間是:春冬季的下午三至五時,夏秋季的下午四至六時 ,這是人體最疲憊的時刻。
1.每天喝五杯咖啡(約150cc)以上咖啡,即容易造成上癮,危及身體健康。
2.早晨喝咖啡的確有助於頭腦清醒、精神抖擻,但須先吃早餐後,才能飲用,否則容易傷害腸胃功能。有胃及十二脂腸胃潰瘍的人,尤其應避免空腹喝咖啡。
3.酒後不宜喝咖啡,否則會更刺激血管擴張、加快血液循環,增加心血管的負擔。
4.喝了咖啡約十至十五分鐘,即有提神醒腦的作用,所以睡前不要喝咖啡,以免失眠。
6.喝咖啡後,不能馬上抽煙,否則容易對心臟造成危害。

5.勿喝太濃的咖啡,否則會使人變得急躁且理解力減弱,心跳加速。
7. 服用抗生素和胃潰瘍治療藥物,不可同時喝咖啡,以免刺激胃部,造成疼痛不適。
8.喝咖啡時最好加一些奶精,以緩和對胃的刺激,但是奶精與糖皆有熱量,須控制攝取量,以免發胖。

9.適量的咖啡攝取,對人體應該無傷,所有的食物都是上天恩賜。

(4) 愛喝咖啡的人 、要多吃洋蔥

*尤其女生更要保養自己** ,

**到更年期才開始預防骨質疏鬆是來不及的 **.

**愛喝咖啡的人要多吃洋蔥唷!

* 想要讓自己骨骼結實、身體長得高、預防骨質疏鬆症?吃洋蔥吧!
*洋蔥是最能夠防止骨質流失的一種蔬菜。

*洋蔥預防骨質! 流! 失的效果,甚至比骨質酥鬆症治療藥「**calcitonin **」還要好。*



* 研究人員讓雄! 性! 大白鼠每天吃一公克乾洋蔥,連續四週後公白鼠的骨質平均增加了13.5-18.5%



*另一組實驗則發現,讓大白鼠食用含有洋蔥的混合蔬菜,也能夠減少鈣流失問題。


*第三組實驗則是讓摘除卵巢的雌性大白鼠每天吃1.5公克的洋蔥, 結果骨質流失的速率減少了25%。

*更值得注意的是,洋蔥的保健功效在短短12小時內就看得到了。

*研究人員認為,想要利用洋蔥保健的人,每天可能要吃上200~300克(10盎司)的洋蔥,能夠預防骨質疏鬆症。
請傳給你週邊愛喝咖啡的朋友!


(google search) (amazon search)


Wed Jan 25 00:42:37 HKT 2012 From /weblog/unix/script

xdotool


Simulate user input - http://pratyeka.org/fake-x-input/

(google search) (amazon search)


Wed Jan 25 00:40:32 HKT 2012 From /weblog/unix

ubuntu cheat sheet



(google search) (amazon search)


Tue Jan 24 23:56:36 HKT 2012 From /weblog/languages/c

memory issue


Personal memo about C++ memory management, from a Java developer, contain some rule of thumb tips - http://karussell.wordpress.com[..]c-trying-to-understand-memory-mangement/

Tutorial of valgrind - http://www.thegeekstuff.com/2011/11/valgrind-memcheck/

Disucssion of GC in C++ - http://herbsutter.com[..]10/25/garbage-collection-synopsis-and-c/

Core dump with few variable declaration removed - http://techblog.rosedu.org/c-extern-internals.html

Tracking memory allocation - http://jfdube.wordpress.com[..]-management-part-2-allocations-tracking/

We have a process running fine for several years and recently have core dump everytime starting it up. here is the stacktrace:

(gdb) backtrace
#0 0xfe34251c in realfree () from /lib/libc.so.1
#1 0xfe342e28 in cleanfree () from /lib/libc.so.1
#2 0xfe341f5c in _malloc_unlocked () from /lib/libc.so.1
#3 0xfe341e50 in malloc () from /lib/libc.so.1
#4 0xfe38f534 in _findbuf () from /lib/libc.so.1
#5 0xfe384f38 in _doprnt () from /lib/libc.so.1
#6 0xfe3886fc in fprintf () from /lib/libc.so.1
#7 0x164f64 in _ZN7LogBook8WriteLogEPcS0_i (this=, pType=0x5c00e8 "INFO",
pMsg=0x6b0b14 "main. Database=XXXXXX. Performing Login to XXXX. user=SYSTEM.", nFile=0) at Util.cpp:164
#8 0x164e28 in _ZN7LogBook9PromptLogEPciS0_i (this=, pType=0x5c00e8 "INFO",
nType=3, pMsg=0x0, nFile=0) at Util.cpp:136
#9 0x14a364 in main (argc=3, argv=0xffbef5bc) at XXXX.cpp:385
(gdb)

Eventaully we found out the reason is the class LogBook is singleton, and it reuse few char* buffer internally, without delete and new in between, after adding delete and new for transaction, the process run correctly, as a rule of thumb, singleton is evil for most of the cases.

(google search) (amazon search)


Tue Jan 24 23:50:53 HKT 2012 From /weblog/business

management


No control, but empower - http://www.michelemmartin.com[..]01/some-thoughts-on-managing-people.html

10 rules of success, not really very insighful ideas but still nice to take a look: http://draginol.joeuser.com/articles.asp?c=1&AID=114319

Another 10 tips for product manager - http://www.brainmates.com.au/?p=109

An interesting example of how people gaming the reward system - http://www.joelonsoftware.com/items/2007/05/10.html

Interview of Jeff Bezos and learn about his management style - http://www.fastcompany.com/magazine/85/bezos_4.html

Dos and Don'ts for line manager - http://blog.jezhumble.net/?p=29

8 elements of dysfunctional management - http://jchyip.blogspot.com[..]lements-of-dysfunctional-management.html

Talk verse Action:
All Talk and No Action - http://www.thekua.com[..]ectives-go-wrong-all-talk-and-no-action/
All Action and No Talk - http://www.thekua.com[..]ectives-go-wrong-all-action-and-no-talk/
A suggestion of taking the balance - http://www.scrumalliance.org/articles/61

Discussion about issues of managing remote teams - http://inhumanresources.blogspot.com/2008/01/1.html

Team building with the way of "pointy haired boss" ?? - http://manincentral.blogspot.com/2008/02/blog-post_12.html

Promote the problem maker to make them better?? Is that work? - http://manincentral.blogspot.com/2008/02/blog-post_16.html May be it is true that problem maker are innovator, give them more work and reward can change their negative performance to more than expected positive performance.

The most consistent and intense complaint from team members was that their team leaders were unwilling to confront and resolve problems associated with poor performance by individual team members. http://www.codinghorror.com/blog/archives/001154.html

Manage to learn - http://www.ft.com[..]dd-80e9-0000779fd18c.html?nclick_check=1

Suggestion about how to delegate to other, spend time to explain to vision - http://www.kui.name[..]E6%88%96%E8%80%85%E5%B4%A9%E6%BD%B0.html

(google search) (amazon search)


Fri Jan 20 23:30:19 HKT 2012 From /weblog/health

cleaning


(1) 小梳打(Baking Soda)

小梳打加水,可以去除浴室的霉菌,也可以用來抹洗廚房,清除異味。
同樣方法也可以用來抹洗馬桶或微波爐等各項用具。
想抹走水龍頭上的污漬,可以用舊牙刷沾牙膏和小梳打刷洗,用水沖乾淨
想加點香氣,則可以滲點檸檬汁或橙汁。
(2) 醋

想去除焗爐或微波爐黏滯的污垢,可混和醋和熱水,輕輕拭走
想通渠的話,可先倒入小蘇打和醋入水管內,加蓋靜候至少10分鐘,然後以熱水沖
清洗玻璃窗 /玻璃器皿,可以混和了食鹽和醋的軟布洗擦

http://www.greenpeace.org[..]2012/01/toxic-free-cleaning-dragon-year/

http://www.greenwomen.net/cleaning.html

(google search) (amazon search)


Tue Jan 17 00:42:44 HKT 2012 From /weblog/finance

kdb


Explanation about advantage of KDB - http://www.asiaetrading.com[..]c-director-video-interview-asiaetrading/

(google search) (amazon search)


Mon Jan 16 23:55:27 HKT 2012 From /weblog/unix

filesystem


Basic info of inode - http://www.thegeekstuff.com/2012/01/linux-inodes/

Explanation of /proc filesystem - http://www.redhat.com[..]anual/ref-guide/s1-proc-directories.html

Linux file system structure - http://www.thegeekstuff.com/2010/09/linux-file-system-structure/

File system for archive files - http://linuxtoy.org/archives/avfs.html

BeOS file system, other than discuss about BeOS FS, also discussing about evolution of design of file system - http://arstechnica.com[..]rce/news/2010/06/the-beos-filesystem.ars http://arstechnica.com[..]03/past-present-future-file-systems.ars/

(google search) (amazon search)


Mon Jan 16 22:58:34 HKT 2012 From /weblog/health

averageman



(google search) (amazon search)


Mon Jan 16 22:25:38 HKT 2012 From /weblog/database

dbunit


tutorial - http://www-106.ibm.com/developerworks/java/library/j-dbunit.html http://zenoconsulting.wikidot.com/blog:8

select part of table - http://www.oreillynet.com[..]njava/blog/2005/10/dbunit_made_easy.html

Some tips of using DBunit, like workaround if no primary key table and format custom timestamp - http://www.systemmobile.com/?s=DBUnit

Scriptable DBUnit - http://musingsofaprogrammingaddict.blogspot.com[..]9/02/scriptable-data-set-for-dbunit.html

http://www.javacodegeeks.com[..]nit-testing-with-dbunit-json-hsqldb.html

(google search) (amazon search)


Mon Jan 16 22:24:33 HKT 2012 From /weblog/software_engineering/team

pair programming


When to pair, when not to - http://www.markhneedham.com[..]ramming-the-disadvantages-of-100-pairing

This is an excellent arguement -

It's only worth pairing on complex code, rote code yields no advantage.

I think there is a point to this - pairing is about improving design and minimizing mistakes. Rote code that's simple to write yields little opportunities for pairing to make a difference.

Except this: writing boring rote code is a smell. If I'm writing boring repetitive code it's usually a sign that I've missed an important abstraction, one that will drastically reduce the amount of rote code to write. Pairing will help you find that abstraction.


http://martinfowler.com/bliki/PairProgrammingMisconceptions.html

Common pitfall of pairing
http://blog.jayfields.com/2007/09/distracted-pair.html
http://blog.jayfields.com/2007/09/uninterested-pair.html
http://blog.jayfields.com/2007/08/spellchecking-pair.html

Look like a good way to start pair programming
http://magpiebrain.com[..]02/13/pairing-pattern-ping-pong-pairing/
http://c2.com/cgi/wiki?PairProgrammingPingPongPattern

Discussing pair programming - http://www.codinghorror.com/blog/archives/000999.html

Experience sharing of working with expert - http://dreamhead.blogbus.com/logs/13258146.html here is the disclaimer of the blog http://dreamhead.blogbus.com/logs/13258146.html

Why pairing - http://www.shlomifish.org[..]n/opinion-on-the-technion/#why_pair_wise

Pair Programming smells
- Unequal access
- Keyboard domination
- Pair marriage
- Worker/Rester
- Second Computer
- "Everyone does their own work"
- 90% of work 90% done
- People who can't stand to program together
- Debates lasting more than 10 minutes without producing new code
-
Pair-programming smalls - http://agileinaflash.blogspot.com[..]com/2009/02/pair-programming-smells.html http://www.javacodegeeks.com[..]ir-programming-disadvantages-of-100.html

http://kfzhang.thoughtworkers.org/2011/04/open-mind-in-pair/

(google search) (amazon search)