RSS feed [root] /weblog



title search:


Tue Jan 17 22:34:04 HKT 2017


log down some useful resource

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

Tue May 23 12:56:50 HKT 2017 From /weblog/misc


Why we need tools design for provisioning -[..]anagement-and-provisioning-are-different

Cloud or not?[..]/why-does-gitlab-persist-in-using-clouds[..]/03/02/why-we-are-not-leaving-the-cloud/

(google search) (amazon search)

Sun May 21 01:00:36 HKT 2017 From /weblog/health/food


benefits-of-nuts -

女士要學會聰明吃零食-7種美味解毒又防頑症 -[..]F%92%E5%8F%88%E9%98%B2%E9%A0%91%E7%97%87

Look like quite a lot of problem of gum -

(google search) (amazon search)

Thu May 18 10:29:03 HKT 2017 From /weblog/java/concurrency


Another nice tutorial set of concurrency framework -

Java concurrency, Building and testing concurrent applications for the Java platform -[..]/training/kp/j-kp-concurrency/index.html

JVM concurrency: Java and Scala concurrency basics -[..]/java/library/j-jvmc1/index.html?ca=drs-[..]reading-interview-questions-answers.html

5 things you didn't know about ... Multithreaded Java programming -

(google search) (amazon search)

Thu May 18 10:28:15 HKT 2017 From /weblog/java/features


5 things you didn't know about ... Java Database Connectivity -

(google search) (amazon search)

Wed May 17 10:27:49 HKT 2017 From /weblog/java/tools


Java Flight Recorder, a tool to record all detail of how the API work for undo and replay and detail profiling -

Creating Custom JFR Events -

Java Mission Control -[..]-mission-control-52-is-finally-here.html

Support of JMX from common java library -[..]ling-jmx-in-hibernate-ehcache-qurtz.html

sample code show how to get vm info at jmx -

An excellent short tutorial of JMX -

Monitoring all tomcat 5 JMX information, with free tools and java startup config -[..]illiams/20050202#monitoring_tomcat_5_5_x

Task manager like jconsole plugin -[..]is/entry/top_threads_plugin_for_jconsole

Performance cost of JMX -[..]nus/archive/2006/07/how_much_does_i.html

Monitoring Local and Remote Applications Using JMX 1.2 and JConsole -

Collections of tools -[..]/client-side-server-monitoring-with.html

remote conenction with ssh -[..]nitoring-remote-jvm-over-ssh-jmx-or-not/

IBM healthcare API -[..]rary/j-healthcareapi1/index.html?ca=drs-

JVM Statistics with jstat -[..]k/2017/05/jvm-statistics-with-jstat.html

(google search) (amazon search)

Sat May 06 14:13:47 HKT 2017 From /weblog/java/features


Introduction of Lambdas expression in Java - , an example show how lambdas help to clean up the duplication -[..]mplifying-readwritelock-with-java-8.html

Another article about Java8 change, where Lambdas is the highlight -

Nice tutorial -

Huge list of articles -

Use lambdas to replace for-loop -[..]creating-your-own-loop-structure-in.html

Overview for new Date/Time library -[..]om/2014/05/java-8-features-tutorial.html

Grouping and partitioning with stream -[..]/11/java-8-streams-api-grouping-and.html
In a nutshell, make sure to never override a default method in another interface -[..]va-8-default-methods-can-break-your.html

Convert SQL feature to stream -[..]and-their-equivalents-in-java-8-streams/

(google search) (amazon search)

Fri May 05 11:31:29 HKT 2017 From /weblog/%E6%97%A5%E5%B8%B8%E7%94%9F%E6%B4%BB


【開鑊tips】生鐵鑊開鑊孖寶︰豬油+韭菜 -[..]om/realtime/supplement/20170505/56648460

【用鑊tips】不銹鋼鑊不黐底秘訣 一粒水珠幫到你 -[..]om/realtime/supplement/20170505/56648464

(google search) (amazon search)

Mon Apr 24 18:09:36 HKT 2017 From /weblog/microsoft


Check why process take a lot of CPU -[..]java-thread-cpu-analysis-on-windows.html

Creating Windows Runtime Components in C++ -[..]rary/windows/apps/hh441569(v=VS.85).aspx

dbg_x86 - Offical Windows debugger -[..]0000FF%3BGIMP%3A0000FF%3BFORID%3A1&hl=en
ntsd - Symbolic Debugger for Windows -[..]0000FF%3BGIMP%3A0000FF%3BFORID%3A1&hl=en
symchk - verify the .pdb matched your dll -[..]0000FF%3BGIMP%3A0000FF%3BFORID%3A1&hl=en
windbg - interface from dbg -[..]0000FF%3BGIMP%3A0000FF%3BFORID%3A1&hl=en

Run windbg.exe and open memory.dmp into windbg (File->Open Crash Dump)

Memory limits of windows applications -[..]icles/memory-limits-applications-windows[..]s-that-every-developer-should-know-about

Code for creating ISO Image -[..]/create-iso-image-from-cddvd-SID641.aspx

Code for creating virtual drive -

UnitTest framework for .NET -

Complete example of building a REST base service and GUI on Win8 device -[..]icleId=240144594&siteSectionName=windows

Use msvsmon for remote debugging -

C# chart library comparison -[..]reate-charts-in-wpf-finance-applications

CLR profiler -

Debugging multi-thread program in VS -[..]icleId=240158201&siteSectionName=testing

Walk through the DLL dependence -

Debugging windows service -[..]042?elq=debf26dfe54f4342a26157cc533d8209

How to skip the default init for windows programs -

Create executable file by hand -[..]m/2015/10/08/a-handmade-executable-file/

Using var maybe costly -[..]6/beware-of-the-idictionary-tkey-tvalue/

Performance tuning -[..]blog/high-performance-dotnet-by-example/

(google search) (amazon search)

Sun Apr 23 17:16:05 HKT 2017 From /weblog/learning


How to develop imagination -

7 Important Creative Thinking Skills -[..]06/7-important-creative-thinking-skills/

Are you interested to be genius? -

4 ways of treating problems
Absolution: Ignore the problem and hope it either fixes itself or someone else solves it. Default.
Resolution: Either look to the past for previous solutions to the same problem OR identify and remove the causes of the problem. Satisfice.
Solution: Analyse using quantitative methods and / or experimentation to try to yield the best possible outcome. Optimise.
Dissolution: Eliminate the problem and prevent it from arising again by redesigning the system that has the problem or its containing system. Idealise.[..]2012/06/4-ways-of-treating-problems.html

言语的非连贯性, 偏重例子, 一图抵千言,提问,回答。[..]014/03/05/25-things-ive-learn-about-life


这里有一个原则同学们要记住:不重要的学术作品大可不读,但重要的要反复重读,读多遍。不要相信重要作品的简化阐释,因为作者究竟怎样想我们不可能从简化的阐释中学到。 -


培養孩子的創業精神 -

什麼是思考方法? -
思考的必要態度:同情理解原則 -

Critical thinking is an unnatural act. We evolved to survive in a cruel world, not to play around with our hacks. To make things worse, we evolved in a herd, which means that we intuitively respect the authority of the leader. But we also have to be creative, so we have to respect ourselves first. Finding the right dose of self-respect is a crucial thing in creative work. Too little self-respect could destroy our motivation and creativity, and too much will interfere with our ability to estimate the value of our ideas, and can easily result in investing time, money and effort in worthless projects.

Noone is born a critical thinker, but almost anyone can become one. Think about what [Edward de Bono] said:

“The need to be right all the time is the biggest bar to new ideas. It is better to have enough ideas for some of them to be wrong than to be always right by having no ideas”.[..]and-creative-thinking-in-a-hackers-work/

转谈艺术。艺术当然要讲技术,不容易,要多下功夫。论技术,我认为艺术比科学重要。一位技术超凡的画家,想象力不足道,其作品可以卖得起钱。有大成的艺术家呢?单凭技术不足够,加上想象力超凡也不足够——不可或缺的是感情的表达。后者是艺术的主要困难所在。科学是不需要表达感情的。 -[..]/dope-i-should-have-thought-of-that.html

why-facts-dont-change-our-minds -[..]17/02/27/why-facts-dont-change-our-minds

What is the scientific method: definition, steps, and pitfalls -

(google search) (amazon search)

Sat Apr 01 23:22:46 HKT 2017 From /weblog/science


About PI -[..]i-%E6%98%AF%E6%B0%B8%E6%81%86-%E4%BA%8C/

Interesting maths -[..]math-principles-to-challenge-your-brain/

(google search) (amazon search)

Fri Mar 31 16:56:44 HKT 2017 From /weblog/ai


(google search) (amazon search)

Thu Mar 30 14:47:41 HKT 2017 From /weblog/software_engineering/testing

test data

Suggestion of how to manage the test datas -[..]citcon-melbourne-2008-managing-test.html

Difference Pattern of managing test datas -[..]damentals-of-data-testing-setup-and.html

How to get the data feed and design automated test trading system -[..]m/2011/02/16/trading-system-testability/

False assumption about time -[..]alsehoods-programmers-believe-about-time

Create your own clock -[..]3/12/the-virtual-clock-test-pattern.html

Just change the return of Calendar -

Discussion about creating test data -[..]est-data-builders-and-object-mother.html[..]r-data-access-code-unit-tests-are-waste/

Dummy, fake, stub, spy and mock -[..]

Generation of test data -[..]/tools/open-source-test-data-generators/

Using test container, and compare it with other test data solution -[..]28/database-testing-with-testcontainers/

(google search) (amazon search)

Mon Mar 27 10:38:42 HKT 2017 From /weblog/java/features


Good : dynamic, generic
Bad: slow, don't work with Obfuscators and most searching and refactoring tools

A very nice tool to get parameter name - (e.g.: user of getUser(User user))

How to improve the performance -[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field -[..]7-writing-to-final-fields-via-reflection

Using reflection for using test -[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic -[..]ticles/Invokedynamic-Javas-secret-weapon

(google search) (amazon search)

Sun Mar 26 00:09:52 HKT 2017 From /weblog/java/string


Introduction to a library which support faster regular expression processing:[..]ite/archive/2006/03/a_faster_java_r.html[..]-expression-library-benchmarks-2015.html

Regex helper -

java-regular-expressions-cheat-sheet -[..]abs/java-regular-expressions-cheat-sheet

(google search) (amazon search)

Wed Mar 22 00:08:56 HKT 2017 From /weblog/business


Tips for getting the most from meeting -

No meeting should ever be more than an hour, under penalty of death.
Every meeting should have a clearly defined mission statement.
Do your homework before the meeting.
Make it optional.
Summarize to-dos at the end of the meeting.[..]/02/meetings-where-work-goes-to-die.html

Good and bad thing from meeting -

「兩個披薩」和「六頁備忘錄」, meeting attendant should not eat more than 2 plazas and the discussion item should not more than 6 pages -[..]zza-rule-for-productive-meetings-2013-10[..]zza-rule-for-productive-meetings-2013-10[..]ve-signs-your-meetings-are-waste-of.html <- I like this one: "Sign 4: Someone asks: "who will document the results of this meeting?""

上班族必學-在會議中教人刮目相看的十招, I double if it working...... -[..]%B8%E7%9C%8B%E7%9A%84%E5%8D%81%E6%8B%9B/[..]7/13/meetings-are-legalized-robbery.html

A team might agree around the conference table, but then express doubts in the “safer” environment of the hallway or coffee shop. -[..]14/03/the-meeting-after-the-meeting.html

(google search) (amazon search)

Tue Mar 21 14:31:55 HKT 2017 From /weblog/software_engineering/team


Recently I help the company offshore some work to CN developers, many difficulty I've encounter, most difficult one is it is hard to share the vision and big picture to CN developers.

This article mention a few good notes , the one I think I am lacking is having short meeting with them often. I will see if we can have video conferencing so that we are easier to meet.

The other tips here -[..]_id=45367&asrc=EM_NLN_1439070&uid=703565 but I think the tips list is too long and probably only apply to large enterprise

Tips of communication with offshore team -[..]on-in-software-development-projects.html

(google search) (amazon search)

Tue Mar 21 14:30:43 HKT 2017 From /weblog/security


Introduction to Cryptography Basic Principles -[..]01/diffie-hellman-key-exchange-algorithm[..]tography-theory-1-meaning-of-secure.html

getting-a-list-of-available-cryptographic-algorithms -[..]t-of-available-cryptographic-algorithms/

Differential privacy -

(google search) (amazon search)

Sun Mar 19 10:25:58 HKT 2017 From /weblog/design


The Hidden Dividends of Microservices -

Best practices -[..]constructing-micro-service-system-part03

Compare using library / service -[..]cy-management-whether-library-or-service

(google search) (amazon search)

Tue Mar 14 23:52:20 HKT 2017 From /weblog/learning


How to teach kid love coding -

(google search) (amazon search)

Mon Mar 13 23:20:23 HKT 2017 From /weblog/health/food

Health Meal

Fix muscle with good food -[..]life/food/fix-your-muscle-with-food.html

要動不要痛—調整飲食,擊退運動傷害! -[..]eat-when-you-get-hurt-from-exercise.html

【動畫●每日健康】新超級食物苔麩代替麵粉 多吃腸胃更暢通 -[..]om/realtime/supplement/20161012/55761307[..]at-makes-eating-healthier-easy/?view=all

豐富健康食譜 -

Eating for health, not weight -[..]y/the-optimal-diet.html?_r=2&ref=opinion

健康飲食還需多吃“苦” -


1.【 想要膽固醇聽話? 每天三杯柳橙汁OK!! < >】

2.【 要長壽別忘蕃茄 < >】

3.【 喝杯水再睡_喝適量的水有益健康! < >】

4.【 喝下重覆煮沸的開水會致癌 < >】

5.【 喜歡吃冷凍水餃的人請小心 < >】

6.【 小心衛生筷子 < >】

7.【 豆漿, 請多告訴你身旁的女性朋友 < >】

8.【 操作電腦時要多喝茶 < >】

9.【 老醫之家:一個不錯的中文醫療資訊網站 < >】

10.【 建議大家最近別吃生魚片及去海邊玩! < >】

11.【 養肺的季節--養肺食譜 < >】

12.【 聽過喝咖啡減肥? < >】

13.【 幫助皮膚健康的維生素 < >】

14.【 造成身材浮腫的殺手食物報告出爐 < >】

15.【 喝雞湯 細菌黏液最快排出 < >】

16.【 15種吃了腿會變瘦、變美的食物 < >】

17.【 早餐吃熱食,才能保護胃氣 < >】

18.【 五種食物,讓你百毒不侵 < >】

19.【 不要太常吃冰 < >】

20.【 喝太多鋁箔包飲料容易導致老年癡呆症 < >】

21.【 黑糖薑茶(女人一定要看) < >】


1.【 午餐後趴睡是健康的殺手 <午睡是健康的殺手.htm >】

2.【 失眠、生物電和橡皮鞋底! < >】

3.【 有午睡習慣的人比較不會老 < >】

4.【 睡眠不足 小心變笨 < >】

5.【 深夜開燈睡易致癌 < >】

6.【 用微波爐加熱水請小心 < >】

7.【 杜絕感冒的六大法則 < >】

8.【 每天更健康 < >】

9.【 小心!看不見的「波」可能讓你致癌 < >】

蒜頭飯 - 閱後傳知他人,添福添壽

一位朋友每天吃蒜頭蒸飯,晚餐用一把蒜頭切碎煮飯, 半年之後高血壓消失了,痛風症消失了,坐骨神經痛亦消失了。 對於目前流行的非典型肺炎,他認為吃蒜頭是增強免疫力的方法, 因為蒜頭是「窮人靈芝」,通血管及清除毒素,以前美軍 亦用作隨身解毒劑。

蒜頭越多越香,拍碎,用油鍋炒香蒜頭放入鹽及煮好的飯,加葫 椒鹽拌炒起鍋。 ( 菲律賓人的早餐都是這道主食 )


另一位朋友提醒要多食維他命 C,以增強抵抗力,並切忌吃煎炸熱氣食物,免引致喉嚨發

1. 約十公克的薑磨成糊狀。
2. 把薑糊放入玻璃杯裡。
3. 注入滾燙的熱開水。
4. 加入一匙蜂蜜,拌勻後飲用。

老薑切片或拍碎煮黑糖功效一樣 , 連續喝兩個月(每天早晚各喝一次 )據書本 記載的見證:
1. 身體變溫暖,手腳冰冷的『怕冷症』體質明顯改善。
2. 體重可減輕約十公斤。
3. 皮膚變得細嫩。
4. 去掉多餘贅肉,腰圍變細。


熱門瘦身食譜排行榜Top5 -

冬天多吃莓果養顏排毒又減肥 (strawberry) -

長期食素加速衰老 -

Food good for slim and skin -

10 good food... -

Food to help hair -

地中海膳食模式——一种富于水果、蔬菜、坚果、全谷物和富含不饱和脂肪酸的鱼类的膳食, 食用三文鱼, 水果,击退中风, 放下苏打,端起咖啡, 酒精:始终都要节制, 巧克力——更多时候依然视为氧化剂, 什么不能吃:限制碳水化合物, 红肉 -

日日食花生 更健康更長命 -[..]%A5%E5%BA%B7%E6%9B%B4%E9%95%B7%E5%91%BD/

busy-students-eat-healthier -[..]lp-busy-students-eat-healthier/?view=all

(google search) (amazon search)

Fri Mar 10 17:49:16 HKT 2017 From /weblog/java/concurrency


putall can cause ConcurrentModifcationException -[..]ses/sun/management/

Note on writing CopyOnWrite wrapper -[..]

Sometime this is a bit difficult for Chinese to be a good programmer, recently some colleague and me discuss about the behaviour of this class and look like we have difficult understanding

A: ConcurrentHashMap support for locking as this is thread-safe
B: ConcurrentHashMap is thread safe for read but not for write because there is no lock, we still need to have external lock to keep it thread safe. By the way, I get ConcurrentModificationException from this before.
C: ConcurrentHashMap don't support for locking but they still thread safe for all operations, which is how "This class is fully interoperable with Hashtable in programs that rely on its thread safety but not on its synchronization details." mentioned.

Too good that we can actually take a look at the source code to see what going on nowadays rather than just guessing -[..]HashMap&sourceid=opera&ie=utf-8&oe=utf-8 By the way, this constructor is useful for a lot of concurrency access but actually not many developer notice about this -[..]rrentHashMap.html#ConcurrentHashMap(int, float, int)

Lazy initialization of map values -[..]

HashMap.get() can cause infinite loop -[..]5/07/hashmapget_can_cause_an_infini.html

Discussing the effect of initCapacity() of HashMap in Java -[..]ltimatebb.cgi?ubb=get_topic&f=1&t=021171

OpenJDK and HashMap …. Safely Teaching an Old Dog New (Off-Heap!) Tricks -

We can run search in ConcurrenctHashMap -

(google search) (amazon search)

Thu Mar 09 23:13:09 HKT 2017 From /weblog/design


Someone saying that having private method is anti-pattern, here is the discussion -

Discussion of encapsulation -[..]/encapsulation-does-it-really-exist.html

My view on this is that most of the time there's little value in self-encapsulation. The value of encapsulation is proportional to the scope of the data access. Classes are usually small (at least mine are) so direct access isn't going to be an issue within that scope. Most accessors are simple assignments for the setter and retrieval for the getter, so there's little value in using them internally. -

(google search) (amazon search)

Tue Mar 07 22:50:23 HKT 2017 From /weblog/computer+science


Introduction of various java linguistics tools:


Authors homepage -

Some other Natural Language Processing links -[..]-attempt-at-natural-language-processing/

How google improve the translation -[..]016/09/a-neural-network-for-machine.html

(google search) (amazon search)