RSS feed [root] /



title search:


Wed Feb 17 21:56:00 HKT 2021

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

Wed Dec 30 20:49:03 HKT 2020 From /weblog/java/concurrency


An API to get the state of a thread, but someone say it is not reliable -[..]5.0/docs/api/java/lang/Thread.State.html[..]readed-programs-tf3627394.html#a10128844

Having said that, I have to note that using Thread#getState() is not
something you can absolutely rely on as the behavior isn't guaranteed
to be the same on all platforms. That is, it can be a useful tool for
debugging and test-driving but not ideal for regression (unit)

Overview of Java thread -[..]t-thread-and-javalangthread-in-java.html

Loom -

(google search) (amazon search)

Tue Dec 29 22:18:24 HKT 2020 From /weblog/security


Make sure all your passwords are 12 characters or more, Use bcrypt or PBKDF2 exclusively to hash anything you need to be secure. -

Password is only worked for one time -

crack captcha -

Java password mask -[..]er/technicalArticles/Security/pwordmask/

OpenID resource -[..]ge/spidaman/20070225#the_openid_snowball[..]_id=46569&asrc=EM_NLN_2030603&uid=703565

OpenID explain -

A technique that crack winxp password at 3 min -

Using image as password -

The other interesting idea, Evolving Password -[..]uid=79730e53-1d30-47ae-98e8-abb55201429b

Passphrase Evangelism -

Rainbow Hash Cracking - , add salt (token) to prevent it -

How to make password harder to be guessed, but I guess there should be simple way to guess "this is fun", other than take 2537 years? -

Discussion about if some old suggested rules about still valid or not -

Using quantum for password? -

Salted Password Hashing - Doing it Right -[..]w-to-encrypt-the-user-password-correctly

It sound like outsource is better -

Hash explained -[..]-passwords-in-your-next-application-4e2f

(google search) (amazon search)

Tue Dec 29 22:03:33 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

Top explain -

(google search) (amazon search)

Fri Dec 25 22:15:53 HKT 2020 From /weblog/design


Nothing specific, mostly code clean up, refactoring and simplification, the performance boost was a surprise. <- This is a good one -[..]12/07/disruptor-v3-faster-hopefully.html

Is there anything we can do about this when designing algorithms and data-structures? Yes there is a lot we can do. If we perform chunks of work on data that is co-located, and we stride around memory in a predictable fashion, then our algorithms can be many times faster. For example rather than using bucket and chain hash tables, like in the JDK, we can employ hash tables using open-addressing with linear-probing. Rather than using linked-lists or trees with single items in each node, we can store an array of many items in each node. -[..]emory-access-patterns-are-important.html

Skip lists are used instead of b-trees because b-trees don’t scale. -[..]ast-mvcc-inmem-lockfree-codegen-and.html

Beware about the performance issue of static initalization -[..]-cause-problems-with-multi-threading-how

Experiment show why arraylist is better in most cases -

How to design low latency application in java -[..]5/chronicle-and-low-latency-in-java.html[..]ciples-of-high-performance-programs.html[..]principles-of-high-performance-programs/

Suggestion about how to determine number of thread pool -[..]rmine-Web-Applications-Thread-Poll-Size/

Beware the performance penalty of logging -

Keep thing dynamic -[..]ciples-of-high-performance-programs.html[..]st-rule-of-performance-optimisation.html[..]u/~rcs/research/interactive_latency.html[..]aling-data-platforms.html?SSLoginOk=true

Discuss about developing low latency financial application -

Discussion of object pooling -[..]-but-forgotten-trick-object-pooling.html[..]m_performance_part_1_object_pooling.html

Efficiency - the amount of work you need to do.
Performance - how fast you can do that work
Efficiency - governed by your algorithm
Performance - governed by your data structures.[..]e-difference-between-efficiency-and.html

Turning off power save mode on the CPU reduced brought the max latency from 11 msec down to 8 msec.
Guaranteeing threads will always have CPU resources using CPU isolation and thread affinity brought the maximum latency down to 14 microseconds.[..]eduler-jitter-using-cpu-isolation-a.html[..]

About design for performance for webapi -[..]y-decision-as-a-service-design-patterns/

check list -[..]ery-software-development-team-should-ask

Beware if system utilization over 80% -[..]/20/service-latency-and-utilisation.html

scalable-io-events-vs-multithreading-based -[..]lable-io-events-vs-multithreading-based/

How to find out bottleneck -[..]entile-latencies-in-Chronicle-Queue.html

Compiler Performance and LLVM -

Know Thy Complexities! -[..]oW9D2qyCTt3qMftzYxsdz7KJs8LkSeRPWLzguwpA

10 大高性能开发宝石 -

How to detect and fix IO related performance issue -

(google search) (amazon search)

Fri Dec 25 12:40:57 HKT 2020 From /weblog/software_engineering/SCM


Suggestful github project -

GIT to SVN command guide -[..]vs-svn-commandline-syntax-reference.html

pretty cool guide -[..]e-to-an-ioke-dev-env-from-source-part-1/[..]rticleId=240160261&siteSectionName=tools[..]&siteSectionName=architecture-and-design

Some comments about possible issues -[..]an-streamline-your-writing-projects.html

Several ppl blog about why GIT better than SVN -[..]tages-of-git-over-subversion-svn-a-brief[..]03/09/its-time-to-stop-using-subversion/

A suggested branching model -

Some advantage of GIT over Mercurial -[..]hy-i-switched-to-git-from-mercurial.html

#undo last commit
git reset HEAD^

#show files in a given commit
git show --pretty="format:" --name-only rev_number

#remove untracked files and directories
git clean -f -d

#track remote branch
git branch --track branch_name origin/master

# given you created a new local branch 'branch_name'
# pushes 'branch_name' to 'origin/branch_name', creating the remote branch for you
git push origin branch_name

#delete remote branch
git push origin :remote_branch_name


Some more suggested workflow -

Move from SVN, experience of JIRA -[..]from-subversion-to-git-and-the/240009175

Merge or Rebase?[..]13/10/git-team-workflows-merge-or-rebase[..]ntial-tips-for-git-and-github-users.html

change-default-git-commit-message-template -[..]nge-default-git-commit-message-template/

Git cheat list -[..]re-development/git/git-commands-tutorial[..]nds-in-less-than-10-minutes-c53922625a73[..]ployment-for-non-developers-7811dcf508bb

(google search) (amazon search)

Fri Dec 25 11:28:30 HKT 2020 From /weblog/languages


Free tutorial -

History -[..]/design_principles_behind_smalltalk.html

Smalltalk Zoo -[..]troducing-the-smalltalk-zoo-25b64ebeb642

(google search) (amazon search)

Fri Dec 25 11:26:31 HKT 2020 From /weblog/health/food


Peppermint -[..]/ss/slideshow-health-benefits-peppermint

(google search) (amazon search)

Thu Dec 24 08:49:03 HKT 2020 From /weblog/languages/c


The long past of C, how standard growth in C -

The state of C -[..]int?articleId=223000089&siteSectionName=

Reference of C libraries -[..]out-there-that-include-the-gnu-c-library

Reflection for C -[..]/25/reflection-in-c-part-1-introduction/

Interesting idea, integrate C and lisp -

How to prevent code duplication in C -[..]read/thread/b4d029524579944e?hl=en&pli=1

Why need header -[..]7/why-does-c-need-a-separate-header-file

How to monitor file usage -

C programming questions -

Taking input for compilation -

Understand lvalues and rvalues -[..]standing-lvalues-and-rvalues-in-c-and-c/

You may have something like
switch (x) {
case 1 ... 100:
printf("1 <= %d <= 100\n", x);

Tutorial -

C Is Not a Low-level Language -

(google search) (amazon search)

Wed Dec 23 20:46:42 HKT 2020 From /weblog/ai


(google search) (amazon search)

Wed Dec 23 20:45:42 HKT 2020 From /weblog/science


蓋亞假說:美麗的神話 -[..]%8E%E9%BA%97%E7%9A%84%E7%A5%9E%E8%A9%B1/

色彩斑斕的動物 -

地球上仍存活的最古老生物 -

deep-sea-mysteries-and-oddities-that-will-leave-you-baffled -[..]nd-oddities-that-will-leave-you-baffled/

rare-flowers-that-are-stunning-to-look-at -

earth-facts-that-might-surprise-you -

north-pole-facts-most-people-are-not-aware-of -[..]s-most-people-are-not-aware-of/?view=all

earth-facts-you-probably-have-not-considered -[..]u-probably-have-not-considered/?view=all

amazon -[..]he-most-unique-places-on-earth/?view=all

25 Interesting Tidbits About Deserts That Will Make You Glad For Rain -[..]at-will-make-you-glad-for-rain/?view=all

Antarctica is one of the coldest, most desolate places in the world, and today you're going to learn all about it. -[..]interesting-facts-that-you-probably.html

great-barrier-reef -[..]-reef-facts-youll-want-to-hear/?view=all

Types of mountains -[..]st/main-types-mountains-earths-ups-downs

bizarre-ocean-phenomena -[..]ean-phenomena-you-wont-believe-are-real/[..]ology/animals-ecology/animal-speed-limit

Ocean -[..]ising-ocean-facts-most-people-dont-know/

Earth -

sinkholes -[..]other/science-abc/science-abc-sinkholes/

ecosystems -[..]what-they-are-and-why-they-are-important[..]ture-post/what-is-supervolcano-18032018/[..]/feature-post/largest-river-world-43223/

What is soil? Here’s the inside scoop -

What causes an Ice Age? A simple explainer -[..]water-dont-underestimate-the-connection/[..]108-why-the-world-is-running-out-of-sand

Even a little extra CO2 is triggering big changes in forests -[..]o2-is-triggering-big-changes-in-forests/

Christmas flakes: macro photography reveals unique snowflake design -[..]/great-pics/christmas-snowflakes-photos/

This is the secret behind biodiversity hotspots -[..]ience/biodiversity-hotspot-source-35243/

Looking back on Palmyra’s recent history, Wegmann sees it as a source of hope. Tropical islands may seem fragile, but they can turn out to be surprisingly robust. The conservation story of Palmyra should remind us of two things, he says: “One, nature is resilient. And two, we as humans can engineer ourselves out of some of the major problems that we’ve caused.” -[..]w-tropical-islands-got-rid-of-their-rats

Rivers can change colors as time passes, and this is linked to ecosystem health -[..]-and-this-is-linked-to-ecosystem-health/

(google search) (amazon search)

Wed Dec 23 07:38:52 HKT 2020 From /weblog/hardware

raspberry pi

Beginner guide -[..]rs-guide-to-diying-with-the-raspberry-pi


christmas-lights-with-java-and-raspberry-pi -[..]s-lights-with-java-and-raspberry-pi.html

(google search) (amazon search)

Mon Dec 21 21:36:51 HKT 2020 From /weblog/health/food


healthy-carbs -[..]eshow-your-guide-to-eating-healthy-carbs

(google search) (amazon search)

Sun Dec 20 22:24:50 HKT 2020 From /weblog/java/performance


How can jruby take advantage of hotspot -[..]nderstanding-jvm-jit-and-helping-it.html

Discussion about OOME -[..]01/14/jvm_lies_the_outofmemory_myth.html

How hotspot optimization ofoptimzate Polymorphism -

List of tools -

an issue of hotspot but haven't handle in 5 year -

A test for how hotspot inline method -[..]ggressive-is-method-inlining-in-jvm.html

Various JIT optimization that JVM doing -[..]uper-useful-jit-optimization-techniques/[..]ava_as_fast_as_c_when_it_comes_to_stack/

(google search) (amazon search)

Sat Dec 19 21:29:27 HKT 2020 From /weblog/software_engineering


(google search) (amazon search)

Thu Dec 17 07:36:51 HKT 2020 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

Napoleon was the Best General Ever, and the Math Proves it. -[..]ever-and-the-math-proves-it-86efed303eeb[..]tal-math-tricks-that-will-blow-your-mind

The mind-bendy weirdness of the number zero, explained -[..]/7/5/17500782/zero-number-math-explained

幾何世界新成員:scutoid -

Pattern of prime -[..]h/prime-numbers-crystal-lattice-17092018

莫比烏斯環 (Möbius strip或Möbius band) -

The most beautiful and important mathematical equations -[..]athematical-equations-beautiful-30112018[..]/the-man-who-invented-modern-probability

Random -[..]ndomness-awarded-prestigious-math-prize/

calculus -[..]-calculus-and-how-to-get-the-hang-of-it/

secret-link-uncovered-between-pure-math-and-physics -[..]-uncovered-between-pure-math-and-physics

What are prime numbers and why they matter — yes, even in your day to day life -[..]re-post/what-are-prime-numbers-15122020/

(google search) (amazon search)

Fri Dec 11 21:02:43 HKT 2020 From /weblog/science/animal


Biggest bugs -

Ant -[..]he-remarkable-self-organization-of-ants/[..]logy/fire-ants-hurricane-harvey-01092017[..]tures-to-access-food-and-avoid-drowning/

看星星跳舞來找路 糞金龜比你會導航 -

Bufferfly act snake -

earwigs -

bed-bugs -

Bee -[..]logy/incredible-pollinating-animals-bees[..]ence/bees-grasp-numerical-symbols-04234/

cockroaches -[..]ists-discover-cockroaches-good-survivors

Butterflies -[..][..]hiny-shell-helps-it-hide-in-plain-sight/[..]chers-collectors-indonesia-market-blumei[..]/where-have-all-the-insects-gone-feature

Photos from inside a tree reveal intimate lives of wild honeybees -[..]ees-intimate-lives-inside-a-tree-feature

This beetle’s armor can survive being run over by a car. Here’s why it’s nearly indestructible -[..]car-heres-why-its-nearly-indestructible/

Honey bees use tool made of poop to repel giant hornet attacks -[..]/honey-bees-feces-hornet-attacks-094532/

(google search) (amazon search)

Fri Dec 04 20:24:52 HKT 2020 From /weblog/trip


(google search) (amazon search)

Wed Dec 02 21:09:08 HKT 2020 From /weblog/design

logging[..]08/12/16/7-good-rules-to-log-exceptions/ - look obvious but a lot of program still make those mistakes.

Do you prefer log more or log smarter? It is good to log smart but if you log more, even if you not smart enough, you still have the data. -

Basic log techniques -

Advances and Challenges in Log Analysis -

Filtering only useful stacktrace -[..]ter-irrelevant-stack-trace-lines-in.html

Some suggestion about logging -[..]/10-tips-proper-application-logging.html and

9 Logging Sins in Your Java Applications, the "Logging Plain User Input" is a good one -[..]9-logging-sins-in-your-java-applications

Java Logging Best Practices: 10+ Tips You Should Know to Get the Most Out of Your Logs -[..]ogging-what-should-you-log-and-what-not/

(google search) (amazon search)

Wed Dec 02 21:08:20 HKT 2020 From /weblog/software_engineering/team

Team work

Building trust for team -[..]nity-of-practice-and-trust-building.html

One nice article about teamwork:

Directing (hi directive + lo supportive, for "enthusiastic beginners")
Supporting (hi directive + hi supportive, for "disillusioned learners")
Coaching (lo directive + hi supportive, for "reluctant contributors")
Delegating (lo directive + lo supportive, for "peak performers")[..]bbthreads/showflat.php?Cat=&Number=64809

Is it a people problem or process problem -[..]01/21/people-problem-or-process-problem/

importance of teamwork -[..]leS.MichaelFeathers.ProgrammingOnYourOwn

5 Dysfunctions of a Team -

A Leaner Start: Reducing Team Setup Times - , I think article "letting-go" is really insightful -[..]007/09/24/onboarding-strategy-letting-go

A good explanation of what is courage, and the result of didn't have courage. It also mention a bit of how to bulit courage within the team, but not much about it -

A potential issue of focus too much on people, rely on few heros -[..]12/people-over-process-misses-point.html

Our agile process requires people to spend the effort to listen and talk to each other, working closely. You have to be a people person to like it. It doesn't suit sociopaths. Accidently hiring a sociopath is going to make XP impossible. Trust me, I know. To me this is XP's fundamental weakness.[..]12/extreme-programmings-fundamental.html

What important is team but not idea -[..]g/2010/01/cultivate-teams-not-ideas.html

A Measure of Your Team’s Health: How You Treat Your “Idiot” -[..]r-teams-health-how-you-treat-your-idiot/[..]ur-teams-health-how-you-treat-your-idiot

How to Create a Great Team Culture (and Why It Matters) -

Psychological Safety -[..]tally-healthy-environment-for-developers[..]chological-safety-heres-how-to-create-it

‘As long as everyone got a chance to talk, the team did well. But if only one person or a small group spoke all the time, the collective intelligence declined.’ -[..]its-quest-to-build-the-perfect-team.html

(google search) (amazon search)

Wed Dec 02 06:10:43 HKT 2020 From /weblog/health/food


What is keto -

Science Might Have Identified the Optimal Human Diet -[..]fied-the-optimal-human-diet-ec618b2fb8f2

New Mom’s Guide to Nutrition After Childbirth -

Green Mediterranean diet may be even better for losing weight than regular Mediterranean -[..]osing-weight-than-regular-mediterranean/

(google search) (amazon search)

Sun Nov 29 20:24:10 HKT 2020 From /weblog/%E6%97%A5%E5%B8%B8%E7%94%9F%E6%B4%BB


how-often-clean-this -[..]guides/ss/slideshow-how-often-clean-this

natural-cleaning -[..]s/ss/slideshow-guide-to-natural-cleaning

guide-how-to-wash -

How to Remove Stains and Sanitize -

Beat Germs All Over Your House -

Is This Clean? Common myths and real ways to clean up your act — and your hands -[..]ays-to-clean-up-your-act-and-your-hands/[..]ng-tips-we-learned-from-pro-housekeepers

下水道堵塞无需花上百澳元 Bunnings10澳分“神器”解决问题! -

cleaning-with-bleach-harmful-mistakes-youre-making -[..]ith-bleach-harmful-mistakes-youre-making

(1) 小梳打(Baking Soda)

(2) 醋

清洗玻璃窗 /玻璃器皿,可以混和了食鹽和醋的軟布洗擦

每天20分鐘的日常清潔程序,可讓您度過週末 -[..]tine-that-ll-give-you-your-weekends-back

(google search) (amazon search)

Sun Nov 29 20:19:22 HKT 2020 From /weblog/health


Relaxing tips -[..]%9B%E5%A3%93%E5%B0%8F%E8%B2%BC%E5%A3%AB/

積極思考能夠緩解壓力,這一點毫不令人意外。不過明尼蘇達大學卡爾森管理學院工作及組織學教授、該報告的作者之一格隆布(Theresa Glomb)說,事實證明,積極正面的思考可能比用人單位目前采取的很多抗擊工作壓力的方法都更實用,這些方法包括提供靈活的工作安排或創建新的組織結構圖,而這實際上并沒有改變辦公室的日常生活。

寫下一天中發生的好事本身就很有價值,但格隆布說,真正的影響來自寫下為何這些事會讓你感覺良好。這樣做會凸顯出一個人在工作生活中獲得的資源和支持,比如技能、幽默感、讓你感到鼓舞的家人、或是一個富有同情心的老板。 -

5 Things We Need For Sustainable Performance At Work -[..]for-sustainable-performance-at-work.html

什么時候說“不”? -

界(刀)手 -[..]%92%E5%BA%A6%E4%BD%9C%E6%8E%A2%E8%A8%8E/

【朝朝正能量】七招減壓秘技讓你活在當下 -[..]realtime/international/20140724/52721787

【健康online】deadline趕到無氣抖 上班族5招踢走工作壓力 -

Burnout -[..]u-can-do-to-replenish-your-mental-energy

“In many ways, anxiety is the experiential component of stress, and it’s dependent on how a person perceives that external source of stress,” -[..]-between-stress-and-anxiety-dc0f24a9ab0d

Short, 10-minute periods of massage or rest can help ease stress -[..]t-massage-rest-relaxation-stress-262452/

How to be resilient -[..]-muscle-build-it-up-when-life-pulls-down

(google search) (amazon search)

Sun Nov 29 19:50:48 HKT 2020 From /christianity


道德議題應該包括甚麼? -[..]%2594%259a%25e9%25ba%25bc%25ef%25bc%259f

The surprising downsides of empathy -[..]icle/20200930-can-empathy-be-bad-for-you

What other cultures can teach us about forgiveness -[..]-cultures-can-teach-us-about-forgiveness

輟學背後,更多的是原住民長期無法獲得主流社會認同的現實。沙克耀坦言,很多原住民小孩不愛上學,並不是因為他討厭學習,而是學校的課堂教育和課外活動,從來都不談論原住民的歷史與文化。「我們學的永遠是馬來人歷史、伊斯蘭世界史、13世紀(馬來)王朝的歷史,在那之前的呢?原住民的歷史呢?他們(歷史課本)甚至談論原始人如『霹靂人(Perak man)』的歷史,但不知道什麼原因,從原始人一下子跳到13世紀,中間的缺口去了哪裏?」(編註:「霹靂人」是馬來西亞考古學者於1991年在霹靂州的玲瓏谷發現的古人類遺骸,證明馬來西亞早在1萬年多前,就已經有人居住。玲瓏谷也是非洲大陸以外最古老的人類遺址。)
腓 2:6 他本有神的形像,不以自己與神同等為強奪的;
腓 2:7 反倒虛己,取了奴僕的形像,成為人的樣式;
腓 2:8 既有人的樣子,就自己卑微,存心順服,以至於死,且死在十字架上。[..]laysia-batek-indigenous-people-deaths-2/

(google search) (amazon search)

Sat Nov 28 20:26:50 HKT 2020 From /weblog/science


mushrooms -

dangerous-plants -[..]us-plants-that-could-seriously-hurt-you/

Amber -

Rock -[..]her/feature-post/rock-cycle-geoloby-abc/

What is the Wilson Cycle, builder and slayer of supercontinents? -

clouds -

What is THC: the main psychoactive ingredient in marijuana -

different-types-plants-world -[..]nce/biology/different-types-plants-world

oldest tree -

Sugar -[..]her/feature-post/sugar-history-00432432/

淺談水龍捲 -[..]%BA%E8%AB%87%E6%B0%B4%E9%BE%8D%E6%8D%B2/

The science behind why leaves change color in autumn -

螞蟻與植物竟然共同演化,原來為了… -[..]96-%E5%8E%9F%E4%BE%86%E7%82%BA%E4%BA%86/[..]e/gingko-biloba-immortal-lifespan-05264/

受盡威脅,也要幫這些台灣植物活下去:走訪福山植物園 -[..]00605-culture-botanical-garden-taiwan-1/

Some trees may 'social distance' to avoid disease -[..]020/07/tree-crown-shyness-forest-canopy/[..]her/feature-post/why-is-the-ocean-salty/

The rare plants that ‘bleed’ nickel -[..]ia-the-plants-that-mine-poisonous-metals

Deepest Dive Ever Under Antarctica Reveals a Shockingly Vibrant World -[..]-frozen-beauty-exotic-creatures-penguins

As the Antarctic Peninsula heats up, the rules of life there are being ripped apart. Alarmed scientists aren’t sure what all the change means for the future. -[..]ula-ice-melt-krill-penguin-leopard-seal/

why-leaves-fall-down-and-why-it-happens-during-autumn -[..]l-down-and-why-it-happens-during-autumn/

(google search) (amazon search)