RSS feed [root] /



title search:


Sun Mar 16 19:10:24 HKT 2014

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

Wed Jul 29 17:35:07 HKT 2015 From /weblog/science


四川現遠古生物「仙女蝦」 幼卵無懼100℃滾水 -

animals-with-insane-survival-adaptations -[..]th-insane-survival-adaptations/?view=all

rarest-animals-in-the-world -

fastest-land-animals -

unreal-animals-you-wont-believe-exist -[..]animals-you-wont-believe-exist/?view=all

bizarre-animals-youve-ever-heard-of-before -[..]als-youve-ever-heard-of-before/?view=all

awesome-animals -

adorable-hatchlings-that-are-too-cute-for-their-own-good -[..]re-too-cute-for-their-own-good/?view=all

little-known-facts-about-arctic-foxes -[..]known-facts-about-arctic-foxes/?view=all

fascinating-little-known-facts-about-polar-bears -[..]-known-facts-about-polar-bears/?view=all

adorable-photos-of-yawning-animals -

animals-with-outrageous-body-proportions -[..]th-outrageous-body-proportions/?view=all

new-species-discovered-in-2014 -[..]new-species-discovered-in-2014/?view=all

extinct-animals-that-scientists-want-to-de-extinct -[..]-scientists-want-to-de-extinct/?view=all

lethal-animals-you-hope-to-never-see -[..]ethal-animals-you-hope-to-never-see.html

Ant -[..]he-remarkable-self-organization-of-ants/

natural-phenomena-that-science-has-yet-to-explain -[..]hat-science-has-yet-to-explain/?view=all

dangerous-looking-animals-that-are-relatively-harmless -[..]s-that-are-relatively-harmless/?view=all

Shoebill Stork -[..]05/if-you-ever-doubted-existence-of.html

sad-facts-about-animals-that-might-make-you-shed-a-tear -[..]animals-that-might-make-you-shed-a-tear/

animal-kingdom-facts-that-you-might-find-hard-to-believe -[..]cts-that-you-might-find-hard-to-believe/

(google search) (amazon search)

Wed Jul 29 17:34:41 HKT 2015 From /weblog/history


united-states-postal-service -[..]ited-states-postal-service-then-and.html

surprising-facts-about-the-united-states-military -[..]-facts-about-the-united-states-military/

about-the-revolutionary-war-you-might-not-know -[..]tionary-war-you-might-not-know/?view=all

About White house -[..]-house-you-probably-never-thought-about/

(google search) (amazon search)

Wed Jul 29 17:08:48 HKT 2015 From /weblog/unix


Advisory Locking and Mandatory Locking -

Basic info of inode -

Explanation of /proc filesystem -[..]anual/ref-guide/s1-proc-directories.html

Linux file system structure -

File system for archive files -

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

(google search) (amazon search)

Wed Jul 29 17:07:21 HKT 2015 From /weblog/history


回首沙龍的一生 -

surgical-tools-you-want-to-stay-away -[..]urgical-tools-you-want-to-stay-away.html

incredible-animals-that-shaped-human-history -[..]mals-that-shaped-human-history/?view=all

amazing-moments-from-history-captured -[..]azing-moments-from-history-captured.html

historically-accurate-modern-day-thanksgiving-facts -[..]-modern-day-thanksgiving-facts/?view=all

bizarre-historical-facts-you-didnt-know -[..]istorical-facts-you-didnt-know/?view=all[..]last-photos-ever-taken-of-25-famous.html

greatest-warriors-of-all-time -

incredible-historical-armors -[..]orical-armors-that-still-exist/?view=all

facts-about-world-war-i-that-shaped-the-world -[..]ld-war-i-that-shaped-the-world/?view=all

一戰戰地的今與昔 -

Last photos of 25 famous people -[..]last-photos-ever-taken-of-25-famous.html[..]-that-might-just-make-you-a-grandmaster/[..]istory-of-bicycles-for-bike-enthusiasts/

Nowadays doctors don't make house calls all to often but back in 1948 this type of practice was very common. As you're about to see, rural doctors had a very busy job. -[..]-it-was-like-to-be-rural-doctor-for.html

(google search) (amazon search)

Tue Jul 28 17:53:38 HKT 2015 From /weblog/trip/travelling


Europe at autumn -

Scotland castle -[..]m/2013/12/dunnottar-castle-scotland.html

西班牙北部雄偉歐羅巴山(Picos de Europa)徒步探險 -

amazing-things-unique-about-scotland -[..]g-things-unique-about-scotland/?view=all

Coldest city! -[..]tsk-in-russia-coldest-city-in-world.html

fascinating-facts-about-modern-greece -[..]ting-facts-about-modern-greece/?view=all

things-that-will-make-you-want-to-visit-greenland -[..]ke-you-want-to-visit-greenland/?view=all

Great church -

Tips -

「世界最美海灘」的Navagio -[..]realtime/international/20140709/52671530

【夏日芬蘭】落水玩漂浮 氹氹轉望藍天 -[..]om/realtime/supplement/20140624/52619256

ALPS -[..]ns-you-should-definitely-visit-the-alps/

(google search) (amazon search)

Tue Jul 28 17:02:01 HKT 2015 From /weblog/health/food


紅棗枸杞豆漿 -

It good for all aspect, at the beginning -[..]/what-happens-when-you-drink-coffee.html

8 DIY tea -[..]E%BF%E4%BE%BF%E6%8E%92%E8%85%B8%E6%AF%92

(google search) (amazon search)

Tue Jul 28 15:43:43 HKT 2015 From /weblog/database/performance


Case study about how to find out suitable index -[..]e+life+of+a+slow+page+at+Stack+Overflow#

A simple example of how to use EXPLAIN to find out the bottleneck of the query and add suitable index to suitable column -

Bitmap Index vs. B-tree Index: Which and When? -[..]/v5r3/index.jsp?topic=/rzajq/perf21c.htm

script to check if index is missing at foreign key

select table_name, constraint_name,
cname1 || nvl2(cname2,','||cname2,null) ||
nvl2(cname3,','||cname3,null) || nvl2(cname4,','||cname4,null) ||
nvl2(cname5,','||cname5,null) || nvl2(cname6,','||cname6,null) ||
nvl2(cname7,','||cname7,null) || nvl2(cname8,','||cname8,null)
from ( select b.table_name,
max(decode( position, 1, column_name, null )) cname1,
max(decode( position, 2, column_name, null )) cname2,
max(decode( position, 3, column_name, null )) cname3,
max(decode( position, 4, column_name, null )) cname4,
max(decode( position, 5, column_name, null )) cname5,
max(decode( position, 6, column_name, null )) cname6,
max(decode( position, 7, column_name, null )) cname7,
max(decode( position, 8, column_name, null )) cname8,
count(*) col_cnt
from (select substr(table_name,1,30) table_name,
substr(constraint_name,1,30) constraint_name,
substr(column_name,1,30) column_name,
from sys.user_cons_columns ) a,
sys.user_constraints b
where a.constraint_name = b.constraint_name
and b.constraint_type = 'R'
group by b.table_name, b.constraint_name
) cons
where col_cnt > ALL
( select count(*)
from sys.user_ind_columns i
where i.table_name = cons.table_name
and i.column_name in (cname1, cname2, cname3, cname4,
cname5, cname6, cname7, cname8 )
and i.column_position <= cons.col_cnt
group by i.index_name

Explain how postgres indexes work, look like combine index is not that useful -

(google search) (amazon search)

Mon Jul 27 23:48:17 HKT 2015 From /weblog/trip/travelling


遊搜好行:蜜月尋夢  63,000公里 -[..]20120421&sec_id=12187369&art_id=16266814

看北極光、鐘乳石、瀑布彩虹、動物大遷徒、泰姬陵等,都是美國有線新聞網絡( CNN)精選的人生必遊景點 -

尋找心中的最後一塊淨土 -

The best sun set -

Nice places at various places on earth -[..]0dad2d4ac0e22b0f5459e87f1ab5a3b2a7238ee2

地球最深的影像 库鲁伯亚拉洞穴探险 (Krubera Cave,又名Voronya Cave) -

unbelievable-photographs-of-national-parks-from-around-the-world -[..]al-parks-from-around-the-world/?view=all

restaurants-with-jaw-dropping-views -[..]urants-with-jaw-dropping-views/?view=all

places-that-look-like-they-are-from-another-planet -[..]e-they-are-from-another-planet/?view=all

places-you-can-get-away-from-pretty-much-everything-and-everybody -[..]-much-everything-and-everybody/?view=all

earths-most-breathtaking-natural-wonders -[..]t-breathtaking-natural-wonders/?view=all

craziest-things-found-in-nature -

astounding-fairytale-like-european-castles-and-chateaus -[..]-european-castles-and-chateaus/?view=all

五大人生必到之湖 -[..]realtime/international/20140730/52742210

amazingly-unique-walks-around-the-world -[..]-unique-walks-around-the-world/?view=all

popular-landmarks-that-are-creepy-suicide-hot-spots -[..]t-are-creepy-suicide-hot-spots/?view=all

unique-travel-destinations-most-travelers-have-no-clue-exist -[..]st-travelers-have-no-clue-exist/view=all

unique-spring-break-destinations-you-have-to-visit -[..]destinations-you-have-to-visit/?view=all

amazing-places-to-watch-the-sunrise-from-around-the-world -[..]-sunrise-from-around-the-world/?view=all

小島在呼救 -[..]ernational-day-for-biological-diversity/

most-dangerous-hikes-treks-and-climbs-on-earth -[..]ikes-treks-and-climbs-on-earth/?view=all

best-countries-to-live-in -[..]to-the-human-development-index/?view=all

incredible-national-parks-on-earth -[..]eet-food-from-around-world-that-you.html

placed-star-wars-was-filmed-that-you-must-visit -[..]tar-wars-was-filmed-that-you-must-visit/

most-visited-museums-in-the-world -

11 Popular Tourist Attractions That Might Kill You -[..]11-popular-tourist-attractions-that.html

(google search) (amazon search)

Mon Jul 27 09:47:29 HKT 2015 From /weblog/photographic


星軌拍攝技巧 數問 -

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 -

這張是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.

(google search) (amazon search)

Thu Jul 23 12:01:09 HKT 2015 From /weblog/finance

market data

If there is mistery crash from Bloomberg C client API when getting VWAP from start date, start time, end date and end time. Try query it using just day, start time, end time. It fix mystery rash issue.[..]OMBERG.API.for.C.Quick_Start.12.2005.doc

Possible out-of-sync of requestID from bb_getdatax() and bb_rcvdata() header -

Sample of using Bloomberg SAPI -

Document of C client api -

Interview of an Elektron developer in China -[..]generation-financial-information-network

(google search) (amazon search)

Tue Jul 21 17:50:58 HKT 2015 From /weblog/java/performance

option list

-XX:+PerfDisableSharedMem , prevent locking by sharedmem in linux -

How linkedin turn the GC -[..]ughput-and-low-latency-java-applications

Using generational & concurrent GC collector -[..]/04/ibm-jvm-tuning-gencon-gc-policy.html

Full VM option list :, update for Java7 -[..][..]ost-complete-list-of-xx-options-for.html

A simplified list for some frequency use options -[..]rbage-collector-guidelines-and-tips.html

HotSpot JVM garbage collection options cheat sheet -[..]spot-jvm-garbage-collection-options.html[..]va/javase/tech/vmoptions-jsp-140102.html

An example and story about effect of difference VM parameter affecting the performance -

Clear the code cache automatically with -XX:+UseCodeCacheFlushing -[..]time-for-long-running-java-applications/

Discussion about -XX:MinHeapFreeRatio parameter -[..]

The other detailed guide for VM parameters tuning -

Here is a more simple cookbook -

A outdated (1.4) , compehensive but still not really too detailed, overview of various GC tuning -

Some say following VM parameter is good enough
-server -Xmx -XX:+UseParallelGC[..]/page/binublog?entry=java_tuning_for_xml

Some say is useful if you have huge memory

Some say below parameter keep GC in low pause
Some say below parameter are very optimal
-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:NewSize=1200m -XX:SurvivorRatio=16[..]d.tss?thread_id=41258&ASRC=EM_NNL_347804
Some say those parameter is good

Just in case anyone is curious, the flags enabled by -XX:+AggressiveOpts in JDK 1.6.0_25 are:


Generate dump with OOME - -XX:+HeapDumpOnOutOfMemoryError

GC log sample of -XX:+UseConcMarkSweepGC -XX:PrintFLSStatistics=1 -XX:+PrintGCDetails -

A case study of tuning VM GC parameters -[..]ld-you-trust-the-default-settings-in-jvm

Explanation for few performance related VM parameters -[..]ine-options-jvm-performance-improvement/

(google search) (amazon search)

Tue Jul 21 15:34:40 HKT 2015 From /weblog/health/food


benefits-of-nuts -

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

(google search) (amazon search)

Mon Jul 20 23:58:49 HKT 2015 From /weblog/photographic


Photo editing -[..]pair-outdoor-photo-map-steps-for-example[..]1/3/basic-lightroom-adjustments-fog-mist

About marco photograhy -[..]7237/depth-of-field-in-macro-photography

動 態 攝 影 分 享 -[..]ts/gymnastics-fundraiser-portfolio-shoot

世盃攝影師落場 三機三鏡是基本 -[..]om/realtime/all/latest/20140624/52618252

India guide -

請問點影一個人行緊過黎既情景 -[..]

Street photographic - , 呈圓狀, 二等分, 重覆式, 同形狀

What is the real meaning of Aperture in zoom len -

How to take building photo look proper vertically -

How to take astro landscape photo -

Star photo processing -

How to take a good photo -

Think about composition rule -[..]or-beautiful-light-painting-photographs/

Using shifted len to create create landscape photo -[..]-can-teach-you-about-street-photography/

HDR -[..]iv-%E5%9F%B7%E8%B5%B0%E9%AC%BC%E5%BD%B1/

你也可以做得到]超簡易DIY證件相拍攝 -

淺談燈光人像, 逆光和壓光 -[..]%87%E7%87%88%E5%85%89%E4%BA%BA%E5%83%8F/

Top 5 Tips to Photograph Stars & Night Sky -[..]top-5-tips-to-photograph-stars-night-sky[..]otography-tutorial-lightroom-5-photoshop

Tutorial about using DSLR to take good movie -

How to take cloud sea photo -

Informaton of light pillar -

How to take Lightning photos -

How to take children photo -

進階對焦技巧 – 快門對焦分開處理 -[..]%A6%E5%88%86%E9%96%8B%E8%99%95%E7%90%86/

水底攝影入門(一):水底光線的考慮 -[..]active-photography-skill-tree-beginners/

Zone system -

How to use flash in studio -

Tips of taking photo for wild life -

簡易四步驟處理高清銀河 -

(google search) (amazon search)

Mon Jul 20 23:58:22 HKT 2015 From /weblog/entertainment


讓我狠狠想你——王家衛電影的思念與愛情 -[..]%9D%E5%BF%B5%E8%88%87%E6%84%9B%E6%83%85/

十大最浪漫電影 -[..]A3%E5%B9%B4%E8%8F%AF-%E4%B8%8A%E6%A6%9C/

不按牌理出牌!影史10大即興演出 -[..]02/top-10-deadliest-horror-villains.html

歎為觀止的一鏡到底!影史著名12顆長鏡頭畫面 -

你是動作科幻迷嗎?影史40把知名槍械大集合! -

「我要打十個!」 回顧甄子丹7場精彩武打場面 -

喜劇之外:班史堤勒 -

中土世界的魔法師:彼得傑克森 -

Famous robots -

Robin Williams -[..]-actor-and-comedy-genius-robin-williams/

鈕承澤 -

Matrix -[..]hings-you-probably-didnt-know-about.html

[專題] 從黑澤明的《七武士》淺談剪接在電影發展裡的奧祕 -

(google search) (amazon search)

Sun Jul 19 16:04:00 HKT 2015 From /weblog/career/jobs

interviewer tip

The best way I've found to interview candidate developers is to pair program with them to do real work on the actual code of the project that is hiring. If not possible, give programming exercise which is:

The exercise must involve working with current development tools.
The exercise must require the candidate to apply important features of the language.
The exercise must involve understanding and working with existing code.
The exercise must involve error handling.
The exercise must involve testing.
The exercise must offer scope for domain modelling.
The exercise must involve asking questions.
The exercise must be realistic.
The exercise must involve changing requirements.
The exercise must offer the candidate enough rope to hang themselves.
The exercise must test many different skills and practices.

A good interview programming exercise takes at least an hour. -

The other interesting reading -[..]ass-kickin-interviewscreening-questions/

Phone interview -

Questions that somebody like to ask... although I think this guy is a bit arrogance -[..]y-favorite-java-developer-interview.html

Another interview question and answer -[..]/howto-pass-silicon-valley-software.html

How about lie at CV?[..]mon?entry=lying_on_your_r%C3%A9sum%C3%A9

Interviewing in google -

What interviewee should asked at interview -[..]programmer-should-ask-on-a-job-interview

What should not waste time to ask the candidate -[..]303_use-technique-ace-job-interview.html

Beware of the small things during interview -

The concern of putting negotiable in salary -

(google search) (amazon search)

Sun Jul 19 15:54:50 HKT 2015 From /weblog/trip/travelling

south america

阿根廷的觀鳥天堂 -[..]

magnificent-torres-del-paine-national-park-photos-you-absolutely-have-to-see -[..]tos-you-absolutely-have-to-see/?view=all

Hotel next to Perito Moreno Glacier -

(google search) (amazon search)

Sun Jul 19 00:27:14 HKT 2015 From /weblog/software_engineering


Why code review beats testing: evidence from decades of programming research -[..]the-best-ways-to-find-bugs-in-your-code/

1: Review often
2: Review informal and short
3: Review with difference people
4: Keep it positive
5: Enjoy it[..]/08/06/5-tips-to-make-good-code-reviews/

Why review on naming is important -[..]code-and-code-reviews-whats-in-name.html

Maybe useful... can take a look -[..]ary/11-proven-practices-for-peer-review/

checklist -[..]com/java/code-review-checklist-for-java/[..]-with-our-code-review-checklist-example/

another doc about review -[..]ode-reviews-before-you-even-run-the-code

(google search) (amazon search)

Wed Jul 15 16:23:04 HKT 2015 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

(google search) (amazon search)

Wed Jul 08 11:34:43 HKT 2015 From /weblog/design


Refactoring to Patterns Catalog -

Article talk about the book:

Catagories smell into "smell in class" and "smell between class" -

Known but good to remind[..]10/01/6-steps-to-master-refactoring.html

An experience sharing -[..]m/2011/05/refactor-hudson-god-class.html[..]treme-Refactoring-with-Brian-Button.aspx

Refactoring should not introduce bug... -[..]01/so-why-are-you-refactoring-again.html

A way to have formal refactoring, through Feature Clustering, Rapid Scratch Refactoring and Twisting Classes -[..]rom-michael-feathers-brutal-refactoring/

Not all code change is refactoring - , and

Some common issues about refactoring code in a team -[..]/2008/01/28/dont-be-a-refactoring-bigot/[..]01/dangers-of-premature-refactoring.html , beware taking the balance -[..]ith-beautiful-code-the-refactor-syndrome

Refactory if needed -

Refactoring, when start, when stop? -

Refactoring metric -[..]rics-based-refactoring-for-cleaner-code/

Getting rid of util class
1) If the family of methods uses different parameters, depending on optional input or representations of the same input, then consider transforming the Helper via a fluent interface using the Builder pattern: from a collection of static methods like Helper.calculate(x), calculate(x, y), calculate(x, z), calculate(y, z) we could easily get to something like newBuilder().with(x).with(y).calculate(). The helper class would then offer behaviours, reduce its list of business methods and provide more flexibility for future extensions. Callers would then use it as internal field for reuse or instantiate it where needed. The helper class (as we knew it) disappeared.
2) If the helper class provides methods which are actually actions for different inputs (but, at this point, for the same domain), consider applying the Command pattern: the caller will actually create the required command (which will handle the necessary input and offer a behaviour) and an invoker will execute it within a certain context. You may get a command implementation for each static method and your code would move from an Helper.calculate(x, y), calculate(z) to something like invoker.calculate(new Action(x, y)). Bye bye helper class.
3) If the helper class provides methods for the same input but different logics, consider applying the Strategy pattern: each static method may easily become a strategy implementation, vanishing the need of its original helper class (replaced by a context component then).
4) If the given set of static methods concerns a certain class hierarchy or a defined collection of components, then consider applying the Visitor pattern: you may get several visitor implementations providing different visit methods which would probably replace partially or entirely the previously existing static methods.
5) If none of the above cases met your criteria, then apply the three most important indicators: your experience, your competences in the given project and common sense.[..]-to-get-rid-of-helper-and-utils-classes/

Converting forloop to streaming -

(google search) (amazon search)