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

Wed Nov 16 23:37:49 HKT 2016 From /weblog/health


(google search) (amazon search)

Tue Nov 15 16:56:18 HKT 2016 From /weblog/software_engineering/testing


Being proactive! -[..]to-be-first-class-citizen-as-tester.html

Well, of course it say yes...... -[..]6/27/software-testers-need-learn-coding/

(google search) (amazon search)

Tue Nov 15 10:53:50 HKT 2016 From /weblog/design

value object

Discussion of DTO -

Discussion of value object -

(google search) (amazon search)

Tue Nov 15 10:49:25 HKT 2016 From /weblog/design/concurrency


How to write safer concurrency code -

reentrant and thread safe functions -[..]/31/reentrant-and-thread-safe-functions/

Libraries / toolkits for multicore process -[..]intableArticle.jhtml?articleID=212900103

Introduction -[..]QQSNDLRSKHSCJUNN2JVN?articleID=212903586[..]CQSNDLRSKHSCJUNN2JVN?articleID=213001517

Collections of links -[..]rallel-Or-Get-Left-Behind.html&Itemid=29

Briefing of difference modeling of threading system -[..]intableArticle.jhtml?articleID=215900465[..]inners-guide-to-multithreaded-libraries/[..]haloms_blog/2010/08/concurrency-101.html

Saving the Failwhale: The Art of Concurrency (Page last updated December 2012, Added 2012-12-26, Author Dhanji R. Prasanna, Publisher informit). Tips:

1) Contention is unavoidable - some resources are just slower, and you must wait for them. The secrets to good concurrency are 1) ensuring that these slower resources are rarely used, and 2) during such waiting periods, giving the faster tiers other work to do so that they continue to be utilized well.
2) Overuse of synchronization constructs such as locks and mutexes leads to systems that perform poorly under load.
3) ConcurrentHashMap is an efficient thread-safe map while HashMap is not thread-safe.
4) ConcurrentHashMap doesn't do away with locks, it still uses them but it uses more than the single global lock, so that threads gain some measure of concurrency. It uses separate locks for partitions, so that multiple threads writing to the map are likely to access different partitions, using separate locks and therefore process their data simultaneously. This technique is known as lock-striping. Efficient striping uses a number of locks proportional to the number of CPU cores in a system.
5) The asynchronous processing model smooths resource spikes by adding requests to a queue which is serviced by a pool of workers - spikes in requests make the queue grow rather than overloading the workers. (The ExecutorService is essentially a thread pool accompanied by a task queue.)

Discussion of using difference model for concurrency -[..]cks-application-architecture-pros-a.html

Concurrency vs Parallelism -[..]/2013/12/concurrency-vs-parallelism.html

Compare between Actors, CSP, Disruptor and raw Threads -[..]omparision-of-different-concurrency.html

Few coding tips that should be useful for most languages -[..]erformance-scalability-and-liveness.html[..]2015/09/java-concurrency-essentials.html

Service Design
Do one thing, do it well
No shared operational state
Bound your queues
Name custom thread pools and register an UncaughtExceptionHandler
Prefer immutable data objects over mutable state[..]-to-25-billion-notifications-during.html

(google search) (amazon search)

Sun Nov 13 22:10:09 HKT 2016 From /weblog/health/sport


首次公开拉筋术,俗话说:筋长一寸,寿长十年! -[..]type=android-17&version=25000338&lang=en[..]/use-five-movements-do-dynamic-warm.html[..]h-life/six-poses-for-a-better-sleep.html

床上懶人拉筋8式-助眠改善下背痛 -[..]b-%e5%8a%a9%e7%9c%a0-%e8%83%8c%e7%97%9b/

5 simple morning stretching -[..]ute-morning-routine-feel-better-day.html

(google search) (amazon search)

Sat Nov 12 00:32:58 HKT 2016 From /weblog/learning


It takes time
It takes practice
It takes motivation
It takes inspiration
It takes discipline
It takes courage
It takes effort
It takes concentration
It takes perseveration
It takes education[..]become-a-valuable-software-professional/

Other articles about this topic -[..]dvice_on_How_to_Become_a_Programmer.aspx

I love the following sentence a lot:

"Programmers are problem solvers. Programmers are logical thinkers. Programmers can figure out why it doesn't work. Programmers like to build new things and make old things work better.
Perhaps some folks think that limits programming to young folks, but I respectfully disagree. "[..]lds/archive/2004/12/too_old_to_prog.html

In constrast -

How to be a Programmer: A Short, Comprehensive, and Personal Summary -[..]ways-to-think-wisely-in-development.html

Problem solving analysis -[..]01/08/solving-problems-breaking-it-down/

How to improve yourself -[..]blog/2008/06/the-ultimate-code-kata.html , also, those task replicating add up bit by bit and comsuming time -

being-a-developer-after-40 -[..]veloper-after-40-3c5dd112210c#.rgkhc7zba

Don't let failure limit yourself -[..]-94081bb66bec?gi=be728cf1cf03#.2kt2xkvoj

(google search) (amazon search)

Fri Nov 11 14:47:24 HKT 2016 From /weblog/health/food


解癮御用 黑巧克力 -[..]ews/black-chocolate-is-good-for-you.html

benefits-to-eating-chocolate -[..]late-that-will-ease-your-guilt/?view=all

(google search) (amazon search)

Wed Nov 09 15:36:35 HKT 2016 From /weblog/hack+and+faq


Solve "unable to get local issuer certificate”, git config --global http.sslVerify false -[..]-issuer-certificate-using-git-on-windows

(google search) (amazon search)

Tue Nov 08 10:36:03 HKT 2016 From /weblog/copyright


A nice table show the difference between difference type of opensource licence

A more detail look of GPL:

Summary of some key point of typical business licence -

Free book about it -

Another discussion about choosing open source licence using -[..]stimates-contributor-license-agreements/

Cost of GPL -

(google search) (amazon search)

Fri Nov 04 17:35:55 HKT 2016 From /weblog/history


找個理由不革命--黎元洪們的第一選擇 -

解除黨禁:大政治家的無奈與膽識 -

China: The Virtues of the Awful Convulsion -[..]ina-the-virtues-of-the-awful-convulsion/

(google search) (amazon search)

Wed Nov 02 16:14:20 HKT 2016 From /weblog/design/pattern


understanding-retry-pattern-with-exponential-back-off-and-circuit-breaker-pattern -[..]al-back-off-and-circuit-breaker-pattern/

(google search) (amazon search)

Wed Nov 02 16:13:31 HKT 2016 From /weblog/design/concurrency


10-ways-to-reduce-lock-contention-in-threaded-programs -[..]ce-lock-contention-in-threaded-programs/

Discussion about lock the form and prevent 2 user edit it in the same time and currupt the object, what is the possible drawback. -[..]-optimistic-locking-isnt-a-silver-bullet

futexes -[..]ds/browse_thread/thread/3c3608a779dc6731

Spinning -[..]ome/lock-free-algorithms/tricks/spinning

Locks for rarely changed data, sound like good suggestion -[..]pic/comp.programming.threads/dyrbRKsj4gw

Try to use non-blocking approach if possible -[..]1/locks-condition-variables-latency.html

Concurrency without lock, and even without correctness? -

Single write principle -[..].au/2011/09/single-writer-principle.html

Comparing difference kind of locks again -[..]11/stampedlocktryoptimisticread-and.html

10-ways-to-reduce-lock-contention-in-threaded-programs -[..]ce-lock-contention-in-threaded-programs/

(google search) (amazon search)

Thu Oct 27 00:28:55 HKT 2016 From /weblog/misc


Project template for quicker start a project -[..]-a-software-project-as-fast-as-possible/

LaTeX -[..]o-begin-learning-and-applying-latex.html

Online tool to convert word document to good HTML -

Online IDE -

(google search) (amazon search)

Wed Oct 26 18:57:16 HKT 2016 From /weblog/hack+and+faq


Generating stub for .NET webservices from wsimport

java -Djavax.xml.accessExternalDTD=all -Djavax.xml.accessExternalSchema=all -Dhttp.proxyHost=proxyhost -Dhttp.proxyPort=8080 -Dhttp.nonProxyHosts="|*" -classpath "c:\Program Files\Java\jdk1.8.0_102\lib\tools.jar" -b -b customization.xjb

(google search) (amazon search)

Wed Oct 19 01:41:16 HKT 2016 From /weblog/database/vendor


PostgreSQL schema is way fast and easy to change than MySQL, although maybe slower -[..]grating-from-mysql-to-postgresql-slides/

Subindexes that can save you space and make updates faster by reusing an existing multi-column index.
Expression indexes that speed up queries with WHERE clauses matching a function of the columns instead of raw values.
Partial indexes that are much smaller than a complete index because they don't contain data that the app doesn't care about.[..]l-indexing-tricks-that-surprise-everyone

Experience sharing, stored proc is better?

(google search) (amazon search)

Sun Oct 16 01:52:15 HKT 2016 From /weblog/design/interview


How yahoo use Hadoop for machine learning -

(google search) (amazon search)

Sun Oct 16 00:41:46 HKT 2016 From /weblog/trip/travelling


{北歐冰島三天追光之旅} (冰島) -[..]nd-photography/hochu-v-islandiyu-682755/

永晝現象 -[..]%B7%E4%BE%86%E7%9A%84%E8%89%AF%E8%97%A5/[..]eathtaking-photos-from-iceland/?view=all

冰島北挪威自駕遊行程概覽 -[..]10/iceland-lofoten-island-itinerary.html

(google search) (amazon search)

Thu Oct 13 08:33:54 HKT 2016 From /weblog/database


Berkeley CS286: Implementation of Database Systems, Fall 2014‎ > ‎

Disambiguating Databases, explaining various aspects of difference datastore approach -

Basic -[..]action-isolation-levels-and-concurrency/

(google search) (amazon search)

Thu Oct 13 08:09:58 HKT 2016 From /weblog/business


Donald Trump is Blogging -

Bad boss?

The problem with Japan business leader handle crisis, some root from their culture -[..]%8C%E7%82%BA%E6%98%AF%E4%BA%BA%E6%80%A7/

「CK,千祈唔好睇少一個人身邊團隊既影響力呀。你話係佢向role model學習又得,你話係peer pressure又得。之但係,身邊冇人就九成九都唔得。」 -


1. 及時提供反饋意見。
2. 教導員工如何在組織構架中獲得成功。
3. 提供挑戰和機會。
4. 創造一個可以促進團隊成長的環境。
5. 幫助下屬從錯誤中吸取教訓。
6. 積極地在高級管理層面前表揚自己的直接下屬。

When you say, “Don’t bring me a problem. Bring me a solution” you say, “I’m not going to make the hard choices. You are.” But you’re the manager. You get paid to make the difficult choices. -[..]ourage-people-to-bring-you-problems.html

A good CEO, vision, people, financial control -

如何用肢體語言告訴別人你是領導 -

(google search) (amazon search)

Wed Oct 12 00:09:13 HKT 2016 From /weblog/business


最失敗的好產品 ─ Everpix 倒閉的啟發 -[..]89%E7%9A%84%E5%95%9F%E7%99%BC/index.html[..]ath-inside-the-worlds-best-photo-startup

HTC 十七年興衰史 -


(google search) (amazon search)

Tue Oct 11 15:39:49 HKT 2016 From /weblog/learning

Learning stages

In short:
I. Unconscious incompetence - I don't know why I cannot done that
II. Conscious incompetence - I know why I cannot done that
III. Conscious competence - I know why I can done that
IV. Unconscious competence - I don't know why I can done that[..]rs/theory/process/stages_of_learning.htm

What you know may not be what you do -[..]yris-espoused-theory-vs-theory-in-action

隨筆:科研新手的煩惱 -[..]%B0%E6%89%8B%E7%9A%84%E7%85%A9%E6%83%B1/

This approach—which focused on fluency instead of simple understanding—put me at the top of the class. -[..]red-my-brain-to-become-fluent-in-math-rp

(google search) (amazon search)

Tue Oct 11 00:24:40 HKT 2016 From /weblog/java/libraries


Good thing about LogBack -[..]your-java-logging-with-7-logback-tweaks/

Configuring how exception stack traces appear in log entries using Log4J2 -[..]ies-using-log4j2-e3a3dc5e48bc#.vfx1l1jlr

(google search) (amazon search)

Mon Oct 10 00:25:13 HKT 2016 From /weblog/software_engineering


(google search) (amazon search)

Thu Oct 06 23:58:24 HKT 2016 From /weblog/java/concurrency


ReentrantReadWriteLock -[..]loperworks/library/j-jtp10264/index.html

why it suppose to be faster than VM level lock -[..]sr.166-concurrency/2005-02/msg00031.html and a test about it -[..]r/2011/11/java-lock-implementations.html

Samples of how to use it, and how to write test cases about it -

Some useful VM parameter to tune the locks: -XX:+EliminateLocks , -XX:+DoEscapeAnalysis , -XX:+UseBiasedLocking -[..]locking-escape-analysis-for-dummies.html

Discuss about 3 difference lock for Java, bias, thin and fat -

Why using the read lock will make lock detector fail -[..]concurrency-hidden-thread-deadlocks.html

Basic of synchronization and locking -[..]about-synchronization-in-java-and-scala/

Better semaphore with striped api -

Comparing and discuss difference locking approach -

Compare performance behavior of RWLock, StampedLock and Optimistic lock -[..]ocks-vs-readwritelocks-and-synchronized/

Comparing sync and lock -[..]ase-study-in-analysing-latency-lock.html

(google search) (amazon search)