RSS feed [root] /



title search:


Sun Oct 11 19:44:56 HKT 2020

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

Thu May 07 20:31:36 HKT 2020 From /weblog/design/distribute


Event Bus Implementation(s) -[..]2017/08/Summary-event-bus-implementation

6 Event-Driven Architecture Patterns —[..]rchitecture-patterns-part-1-93758b253f47

(google search) (amazon search)

Thu May 07 20:25:20 HKT 2020 From /weblog/computer+science

operating system

The little book about OS development -

(google search) (amazon search)

Tue May 05 13:39:28 HKT 2020 From /weblog/learning


焦慮能讓你表現更出眾 -

Importance of finding out your Signature Strengths -[..]ature-strengths-and-trading-success.html

那么,你應該從哪做起呢?加州德爾馬(Del Mar)的心理學家理查德‧萊瓦克(Richard Levak)表示:“首先,我們必須認識到性格中有哪些因素對我們構成了影響。如果我愛發牢騷,好爭辯,還有點多疑,我總是因為跟同事吵架,老是責怪別人而被解雇,那我就必須意識到得改變一下。”

How you can use your negative emotion -[..]reat-depression/304247/?single_page=true

Performance improvements… or experiments? -[..]ormance-improvements-or-experiments.html[..]e-you-operating-in-peak-performance.html

This, I find, is the single greatest impediment to pursuit of excellence: Most of us are simply too busy doing our jobs well to become truly world class at what we do. I occasionally ask traders to go back to old journal entries and tell me how much time they spent reviewing those entries and assessing their progress over the past week. In the great majority of instances, the journal entries are never revisited! -[..]ndar-into-a-peak-performance-tool/print/

10-questions-can-dramatically-change-life and business (I don't think so, but anyway a good reading) -[..]ns-can-dramatically-change-life-business

零成本提升工作和健身效率之道:科學擇時 -

Another article about why it is important to do thing at right timing -[..]dont-i-trade-my-plan-when-i-plan-my.html

a) Using a Calendar
b) Working in Shorter, Uninterrupted Segments
c) Mindfulness
d) Self-Reminders[..]cognitive-behavioral-techniques-for.html[..]els-i-find-repeatedly-useful-936f1cc405d

The point is finding the prime time -[..]m-won-t-make-you-successful-b3c77921d9fd[..]wer-of-doing-nothing-at-all-73eeea488b8b[..]-evolved-and-its-benefits-versus-modesty[..]y-changing-your-environment-270ce4f141e9

Slow and steady wins the race -[..]cience/short-breaks-memory-skill-2363625

The highest levels of productivity and well-being are likely to come from a good balance between persevering through hardship toward attainable goals, and disengaging from action plans that lead to unrealistic goals -[..]ower-look-like-in-the-brain-8cafd0c024ec

The Nine Habits to Increase Your Energy -[..]/the-nine-habits-to-increase-your-energy[..]tivity-boosting-habits-for-photographers

The performance-enhancing trick to being a better athlete -[..]-a-better-athlete?ocid=global_future_rss

(google search) (amazon search)

Fri May 01 20:38:14 HKT 2020 From /weblog/%E6%97%A5%E5%B8%B8%E7%94%9F%E6%B4%BB


Air Pollution: Real-time Air Quality Index (AQI) -

When you're buying bottled water you want to look on the bottom for symbols such as HDP, HDPE and PP. Those symbols mean that the plastic doesn't release harmful toxins into the water. Taking a few seconds to look could make all the difference. -[..]/what-you-need-to-look-for-when-you.html

50种常见花卉浇水方法 · 献给喜欢养花的你! -[..]message&isappinstalled=0#wechat_redirect


(google search) (amazon search)

Fri May 01 09:13:26 HKT 2020 From /weblog/java/performance


A case showing java is faster than C++ -[..]mgroups#!topic/comp.lang.c++/7aNw3PzPvMI

Case show how to improve GC time spend on a java application -[..]11/java-vm-beware-of-younggen-space.html

A case study of solving thread contention -[..]fighting-thread-contention-in-your-code/[..]-of-java-application-performance-tuning/

Notes about measuring map performance -[..]ronicle-map-and-yahoo-cloud-service.html

High Performance Java - Binary instead of Objects - John Davies -

jemalloc, look like a really nice tool -[..]c-to-get-to-the-bottom-of-a-memory-leak/

story of finding why there is so many GC -[..]horough-jvm-thorough-analysis-ygc-part01

GC thread blocked by system call -

We always need benchmark -[..]2017/06/15/forward-vs-backward-loop.html

Investigation and solutions of performance issue caused by GC log -[..]c-pauses-caused-by-background-io-traffic

Using jemalloc to get to the bottom of a memory leak -[..]c-to-get-to-the-bottom-of-a-memory-leak/

Parallel Collection Processing: Leveraging Batching -

Maybe good to careful about collection initalization -[..]ars-with-a-single-character-code-change/

Issue of using non-thread safe collection in multi-thread -[..]oting-cpu-spike-in-a-major-trading-appli

Performance comparison of difference JVM vendor -[..]stopping_openj9_from_overtaking_hotspot/

(google search) (amazon search)

Fri Apr 24 15:12:49 HKT 2020 From /weblog/religious


資源分配的模式 -[..]9%85%8d%e7%9a%84%e6%a8%a1%e5%bc%8f/63448

(google search) (amazon search)

Tue Apr 21 18:27:57 HKT 2020 From /weblog/software_engineering/SCM


Why merge often -[..]/cgi-bin/cmwiki/view/CM/BranchYesMergeNo

A lot of resource here -[..]i-bin/cmwiki/view/CM/BranchingAndMerging

At my company, we tag each CVS module and we use those tags to build releases. That way, we know exactly which code versions each deployment has. Also, developers can check in code at any point while controlling when they release it.

Branches are a major headache, which I avoid whenever possible. You have to worry about maintaining and testing each branch, along with merging changes. I prefer to release the latest and greatest code to each customer. If different customers require different behavior, if statements and configuration files are a lot better than CVS branches.

Branches do make sense if you want to release a minor change to an old release, but upgrading the entire code base is risky. However, high-quality code and testing should reduce that risk.[..]arent=16312&ixDiscussGroup=3&cReplies=11

Subversion branching technique and tips -[..]version-best-practices-branching_01.html[..]version_tips_dealing_with_branches.html/

Another discussion -

Branch visualization -[..]07/05/linus-torvalds-on-git-and-scm.html

One way of manage branching and merging, the summary is, frequency create new branch for pre-merge instead of one time big merge -[..]old-you-about-svn-branching-and-merging/ My colleagues suggest subversion merge tracking can solve the problem without that pre-merge, but I am not sure how that can work...

No branch?[..]-of-code-in-a-single-repository/fulltext[..]s/2017/08/How-Google-build-Web-framework

(google search) (amazon search)

Fri Apr 10 22:49:53 HKT 2020 From /weblog/unix


Using unhide to check hidden process -[..]unhide-the-opensource-forensic-tool.html

fuser, check which user using the file or directory -

htop, look much better than top -[..]ght-no-i-am-loving-htop-it-is-linux.html

Tutorial of both lsof and pstack -[..]ternals-with-lsof-and-strace/#strace_run

Tutorial of SAR - . In Solaris, you can check SAR from previous days using "sar -f /var/adm/sa/sa30 " ( last 30th )

If we like to see the detail from "ps" command:
solaris: /usr/ucb/ps -awwx , or, use pargs, but need sudo to that user -[..]ow-long-argument-of-running-process.html
linux: ps -aef --cols [XXXX]

prstat - use prstat instead of ps in solaris
How to check physical memory on solaris? /usr/sbin/prtconf | grep Memory

Other forensics tools -[..]om/computer-forensics-software-intro.php

Sun monitoring tools collections -[..]try/solaris_performance_monitoring_tools[..]sed-system-monitoring-commands-in-linux/

time, basic unix util -[..]ow-level-discovery-cores-cpus-hard-disk/

10 commands for system monitoring -[..]1/linux-performance-analysis-in-60s.html[..]nxi-swiss-army-knife-for-displaying.html

(google search) (amazon search)

Mon Apr 06 21:51:19 HKT 2020 From /weblog/java/network


(google search) (amazon search)

Fri Apr 03 19:15:44 HKT 2020 From /weblog/health


(google search) (amazon search)

Tue Mar 31 13:43:41 HKT 2020 From /weblog/business


Some techniques -

Claim to threaten is more useful -[..]living/negotiation-tips-giver-taker.html

(google search) (amazon search)

Sun Mar 29 18:20:39 HKT 2020 From /weblog/security


(google search) (amazon search)

Sun Mar 29 18:15:44 HKT 2020 From /weblog/java/concurrency


Even though

private List synchList = Collections.synchronizedList(new LinkedList());

is thread safe, serialize sync List is NOT thread safe for sure. The story is, if you only synchronized the collection, and if we try to get the iterator in concurrent access environment, it will throws currencymodificationexception .

For collection is small, may be making defensive copy is good. Otherwise, in java5, there is concurrency collection.


Map operation, include use of FutureTask and putIfAbsent() method from ConcurrentMap. -

Other then lterate through the elements, adding and removing elements can also be problem, this article document a few good cases about that -[..]en-a-synchronized-class-isnt-threadsafe/

Samples of using Queue.drainTo() -[..]rforming-fixed-amounts-of-work-with.html

Overview of blockingqueue -[..]/java-util-concurrent/blockingqueue.html

Simple benchmark -[..]jvm-performance-part-iii-concurrent.html

Multi-thread behaviour -[..]hread-safety-issues-with-vector-and.html

java.util.concurrent.ConcurrentHashMap VS openhft.collections.SharedHashMap -[..]autilconcurrentconcurrenthashmap-vs.html

Why are there so many concurrent queues implementations in Java? -

Why hashmap is not thread safe -[..]a-HashMap-is-considered-as-thread-unsafe

(google search) (amazon search)

Sat Mar 28 20:09:46 HKT 2020 From /weblog/design/distribute


There are two key primary ways of scaling web applications which is in practice today.
1) “Vertical Scalability” - Adding resource within the same logical unit to increase capacity. An example of this would be to add CPUs to an existing server, or expanding storage by adding hard drive on an existing RAID/SAN storage.
2) “Horizontal Scalability” - Adding multiple logical units of resources and making them work as a single unit. Most clustering solutions, distributed file systems, load-balancers help you with horizontal scalability.

Scalability can be further sub-classified based on the “scalability factor”.
1) If the scalability factor stays constant as you scale. This is called “linear scalability“.
2) But chances are that some components may not scale as well as others. A scalability factor below 1.0 is called “sub-linear scalability“.
3) Though rare, its possible to get better performance (scalability factor) just by adding more components (i/o across multiple disk spindles in a RAID gets better with more spindles). This is called “supra-linear scalability“.
4) If the application is not designed for scalability, its possible that things can actually get worse as it scales. This is called “negative scalability“.

Report of building web application with 55k pageload with rail -[..]mongrels-handled-a-550k-pageview-digging

XMPP a IM protocol about scalability -[..]icle/the_aol_xmpp_scalability_challenge/

Presentation and resources of making you website more scalable -[..]9/Real-World-Web-Performance-Scalability[..]lications&asrc=EM_NLN_3990118&uid=703565[..]ionsPart2&asrc=EM_NLN_3990119&uid=703565

Brian Zimmer, architect at travel startup Yapta, highlights some worst practices jeopardizing the growth and scalability of a system:
* The Golden Hammer. Forcing a particular technology to work in ways it was not intended is sometimes counter-productive. Using a database to store key-value pairs is one example. Another example is using threads to program for concurrency.
* Resource Abuse. Manage the availability of shared resources because when they fail, by definition, their failure is experienced pervasively rather than in isolation. For example, connection management to the database through a thread pool.
* Big Ball of Mud. Failure to manage dependencies inhibits agility and scalability.
* Everything or Something. In both code and application dependency management, the worst practice is not understanding the relationships and formulating a model to facilitate their management. Failure to enforce diligent control is a contributing scalability inhibiter.
* Forgetting to check the time. To properly scale a system it is imperative to manage the time alloted for requests to be handled.
* Hero Pattern. One popular solution to the operation issue is a Hero who can and often will manage the bulk of the operational needs. For a large system of many components this approach does not scale, yet it is one of the most frequently-deployed solutions.
* Not automating. A system too dependent on human intervention, frequently the result of having a Hero, is dangerously exposed to issues of reproducibility and hit-by-a-bus syndrome.
* Monitoring. Monitoring, like testing, is often one of the first items sacrificed when time is tight.

Useful Corporate Blogs that Talk About Scalability -[..]l-corporate-blogs-talk-about-scalability

Overview of mapreduce and how it compare with other distributed programming model -[..]0/is-mapreduce-going-to-main-stream.html

Paper of data store at amazon

Discuss how haven't sync can cause performance issue -[..]lications&asrc=EM_NLN_6273194&uid=703565

Discussion about Cloud Based Memory Architectures -[..]ased-memory-architectures-next-big-thing[..]alability-and-performance-best-practices

Interview with google engineer -[..]gle-at-scale-everything-breaks-40093061/

Surprisingly youtube is blocking -[..]e-scalability-lessons-in-30-minutes.html

If we are seeing a sustained arrival rate of requests, greater than our system is capable of processing, then something has to give. Having the entire system degrade is not the ideal service we want to give our customers. A better approach would be to process transactions at our systems maximum possible throughput rate, while maintaining a good response time, and rejecting requests above this arrival rate. -[..]apply-back-pressure-when-overloaded.html

How twitter scaling -

How Reddit scaling -

How Hotjar scaling -[..]-while-scaling-hotjars-tech-architecture

How infiniteDB prevent locking and IO -[..]-scalable-relational-database-manag.html[..]ard-way-about-scaling-a-million-use.html[..]2014/03/26/six-things-about-scaling.html

The experiences of various big companies, about network issues -

Stackoverflow, scale without cloud -[..]nth-25-servers-and-i.html?SSLoginOk=true

How netflix scale -[..]ix-what-happens-when-you-press-play.html

Scaling to 100k Users -[..]ity/systems/2020/02/03/scaling-100k.html

(google search) (amazon search)

Fri Mar 27 11:42:59 HKT 2020 From /weblog/learning


(google search) (amazon search)

Mon Mar 16 07:47:36 HKT 2020 From /weblog/design

Object attributes

About getter and setter -

Discussion of hashcode and equal of collections -[..]11/why-no-equals-and-gethashcode-in.html

A blog discuss the problem of getter / setter -[..]rise?entry=the_case_against_the_property

Equality Is Hard -[..]m/posts/2020-03-09-equality-is-hard.html

(google search) (amazon search)

Mon Mar 16 07:46:47 HKT 2020 From /weblog/web/script


How I made a 3D game in only 2KB of JavaScript -

(google search) (amazon search)

Mon Mar 16 07:45:26 HKT 2020 From /weblog/web


(google search) (amazon search)

Sun Mar 08 19:49:17 HKT 2020 From /weblog/society




【奇趣史話】「鹹濕」呢個詞 原來嚟自火腿店? -[..]d-don-ts-of-gift-giving-around-the-world

(google search) (amazon search)

Sat Mar 07 21:05:31 HKT 2020 From /weblog/photographic/tutorial


星軌拍攝技巧 數問 -

1).數碼機因hot pixel而唔適合曝得耐...最好分開影影夠幾個鐘...咁每張間隔之間都要俾CMOS斗下氣?
有師兄 教過 分十幾張 每張 10-20min 再合成 好過 一野 暴 幾粒鐘, (菲林 令計)

2).數碼機有D人話用ISO 100、有人話用ISO 400-800好...如果用合成方法...其實係咪都係就番光害而定...定係關雜訊事?
睇天氣 , 小弟 用 o個次 用 iso 100

4季 都唔同 位置, 用星座 搵 會準確 d, e+ 係 冬季, 北極星 位置 係 獵戶座 (lei 個最易 認, 唔會 搵唔倒 ... ) 頭頂 (腰帶 致 頭頂 距離 再過 5倍左右)

附圖 係 舊年 去雲南 香格里拉 時影, 本泥想 長暴, 不過 o個晚 太涷 個人 頂唔順 要收皮 反酒店

With a lot of information, 香港的星空 — 觀測及拍攝資訊 -

Herman's articles at dcfever -

500px tutorial -

About Comet -

Atmospheric optical phenomena 大氣光學現象 -[..]16/06/atmospheric-optical-phenomena.html

Stars & Night Sky -[..]top-5-tips-to-photograph-stars-night-sky

這張是11月15日凌晨拍攝的M42獵戶座星雲, 大埔的光害較嚴重, 所以要加上IDAS V4濾鏡作長時間曝光, 分三段不同時間曝光及作Layer Masking 處理, 把動態範圍拉闊. 在月光的影下算是滿意, 希望之後可以分數晚作10小時以上的曝光並加長每一張frame 的曝光時間 (現在是5分鐘一張), 使到暗位的表現進一步改善.

Place: Tai Po
Date: 14 Nov, 2013 (UT)
Camera: Canon 20Da
Lens: Canon EF-600 F4L
Mount: Vixen Sphinx with Star Book
Filter: IDAS V4
Exposure: 10 sec x 10, 30 sec x 10, 300sec x 26
ISO: 800
Guiding: Borg 60mm telescope, AIS120MM, PHD guiding.
Image calibration: Dark x 20 (average) for each exposure, Bias x 16 (Median), Dark subtracted Flat field x 20 (Median)
Processing: DSS, PS: layer Mask, Cropped, curve, colour adjusted.

how-to-find-the-milky-way -[..]om/2015/07/24/how-to-find-the-milky-way/

how-to-capture-sharp-star-photographs -[..]10/how-to-capture-sharp-star-photographs

銀河 - 觀測和拍攝 -

簡易四步驟處理高清銀河 - TimeLapse-AfterEffects特效『星流跡影片』-進階 -

500 rule:
11mm: 45.5 seconds
12mm: 41.7 seconds
14mm: 35.7 seconds
16mm: 31.3 seconds
18mm: 27.8 seconds
20mm: 25 seconds
24mm: 20.8 seconds
28mm: 17.9 seconds
35mm: 14.3 seconds
50mm: 10 seconds
85mm: 5.9 seconds

How to find constellations: a starter’s guide -[..]eature-post/starter-guide-constellations[..]ilky-Way-Photo-Concepts-You-May-Wan.html


Informaton of light pillar -

How to take Lightning photos -

How To Master Night Sky Photography -

How to Photograph the Northern Lights (Aurora Borealis)? -[..]raph-the-northern-lights-aurora-borealis

(google search) (amazon search)