RSS feed [root] /



title search:


Wed Apr 15 10:18:54 HKT 2020

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

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)

Sun Apr 19 20:51:31 HKT 2020 From /weblog/trip/travelling


Milford Sound -[..]7%9A%84%E6%A8%82%E9%9F%BB-milford-sound/[..]015/05/new-zealand-travel-itinerary.html[..]/08/air-safaris-new-zealand-glacier.html

澳洲十大秘景 -

澳洲旅攝大作戰 (維多利亞和塔斯曼尼亞篇) -

【澳洲】旅行家的六大夢幻地,出發澳洲圓夢去! -

Tips for getting sim in AU -[..]%b2%e9%9b%bb%e8%a9%b1%e5%8d%a1%ef%bc%81/

紐西蘭的星空聖地——Tekapo -

Sydney -

Melbourne countryside -

Summer at AU -

【新西蘭旅遊】雪地飛機近距離睇最大冰川 入最高山峰冰川探險 -[..]style/realtime/article/20180820/58576663

【新西蘭南極光】極罕見!直擊追光兩星期 攝影達人教授睇極光秘訣 -[..]style/realtime/article/20180820/58576709

Underwater Hotel Opens in Australia on Great Barrier Reef -[..]eat-barrier-reef?dom=rss-default&src=syn[..]ons/things-to-do-north-stradbroke-island[..]reserve-castle-hill-bush-walks-for-kids/[..]do/picnic-areas/kellys-falls-picnic-area

(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)

Mon Mar 16 07:43:47 HKT 2020 From /weblog/software_engineering/testing


A nice example of convert dbunit from using junit to testng -[..]h/blog.php?name=philzoio&mydate=20050826

redirect junit output to a file -

invokeNCopiesWithTimeout, run a test ( in runnable() ) for n times and see if it ok for multi-thread likely or not -[..]/running-n-foreground-tasks-in-java.html

Use theories to execute test with a lot difference input, probably possible for all cases -[..]010/01/31/new-feature-of-junit-theories/[..]using-junit-4-theories-to-test-contracts

The other features, rule, perform some rule on test cases -

Adding timeout -

Testing exceptions at Junit -[..]ting-expected-exceptions-with-junit.html[..]ays-of-handling-exceptions-in-junit.html[..]-java-unit-testing-frameworks-tools.html

Skip test for some cases, or create test only for some cases -[..]unit-rule-to-conditionally-ignore-tests/

What new in junit5 -[..]it-5-next-generation-testing-on-the-jvm/

(google search) (amazon search)

Sun Mar 15 19:36:47 HKT 2020 From /weblog/java/performance


Will you get any performance improvement if you manage memory yourself? -[..]ne-is-faster-java-heap-or-native-memory/

More heap, GC will get slower -[..]ing-heap-size-beware-of-the-cobra-effect

Collection of tools to analysis GC activities -

Another presentation of performance hint for hotspot or memory -

Show how to enable and analyze the verbose:gc out data -[..]3/01/java-verbose-gc-tutorial-video.html

Discussion and comparison of difference GC at Java 1.7 -[..]7/java-garbage-collection-distilled.html . And here is the detail experiment among those difference GC, look like G1 is quite promising -[..]ng-and-benchmarking-java-7s-garbage.html

Memory is not allocate to single block, thus even you allocate enough memory in term of size, it may not enough to held individual object -

Introduction to metaspace -[..]optimising-memory-consumption-first.html

Some comments about System.gc() -[..]om/2015/12/why-i-dont-like-systemgc.html[..]ng-your-java-garbage-collection-overhead

Logging stop-the-world pauses in JVM -[..]log/logging-stop-the-world-pauses-in-jvm

Why we should put difference app in same VM -[..]0/generational-disparity-in-garbage.html

Atlassian GC tuning guide -[..]ollection-gc-tuning-guide-461504616.html

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

Troubleshooting-Java-Memory-Issues -

Useful parameters for OOME -

(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)

Wed Mar 04 08:23:59 HKT 2020 From /weblog/design


Having functional program in java?

Functional programming in old java, with eclipse template -[..]functional-programming-with-map-and.html

Functional Programming For The Rest of Us -

collection-pipeline -

Make code composable -[..]ical-functional-programming-6d7932abc58b

A primer on functional architecture -[..]cture/primer-on-functional-architecture/

(google search) (amazon search)

Mon Mar 02 20:33:42 HKT 2020 From /weblog/network


【Arm 專欄】一表了解 SIM、 eSIM 與 iSIM -[..]article/19065-what-are-sim-esim-and-isim

(google search) (amazon search)