RSS feed [root] /



title search:


Sat Nov 21 22:02:03 HKT 2020

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

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)

Mon Sep 28 22:53:18 HKT 2020 From /weblog/misc


真假難辨?Google 攜手 MyGoPen 教你用查核工具拆解不實資訊 -[..]5-google-mygopen-factcheck-give-you-tips

(google search) (amazon search)

Sun Sep 27 21:19:10 HKT 2020 From /weblog/science


Graphene -[..]/graphene-superconductor-insulator-43242

Around 40% of all the plastic we use is packaging. Single-use, plastic packaging. -[..]esign-revolution-plastic-design-02082018

metallic-wood -

recycled plastic -[..]what-should-we-do-about-recycled-plastic

Scientists make an 18-atom ring of pure carbon -[..]sts-make-an-18-atom-ring-of-pure-carbon/[..]e/pumice-uses-structure-feature-geology/[..]are-alive-and-double-as-hi-tech-sensors/[..]t-are-its-main-types-a-simple-explainer/[..]/geology/roman-concrete-seawater-043432/[..]material-we-stuff-our-wine-bottles-with/

Volcano-dwelling beetle inspires new ‘passive cooling’ material -[..]e/longicorn-beetle-coating-heat-9325234/

Metal-eating bacteria discovered in dirty lab glassware -[..]e/metal-eating-bacteria-manganese-05235/[..]s-the-worlds-first-un-cuttable-material/

Persians were making proto-stainless steel 1,000 years ago -[..]ng-proto-stainless-steel-1000-years-ago/

(google search) (amazon search)

Sat Sep 26 23:54:02 HKT 2020 From /weblog/security


Security Analysis of SMS as a Second Factor of Authentication -

(google search) (amazon search)

Sat Sep 26 23:09:02 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 大高性能开发宝石 -

(google search) (amazon search)

Thu Sep 24 21:21:09 HKT 2020 From /weblog/health/food


Extra virgin olive oil is rich in antioxidants and vitamin E, and researchers have found that it’s better at protecting against LDL cholesterol than other types of olive oil. Other types of olive oil are processed after the oil is extracted, which causes them to lose some nutritional qualities. -[..]0903-which-cooking-oil-is-the-healthiest

They’re most commonly found in oils and oily foods such as hazelnuts, sunflower seeds and avocados. -[..]s-essential-brain-development-263263467/

(google search) (amazon search)

Sun Sep 20 22:10:28 HKT 2020 From /weblog/design


5 Hints You're Using A Map When You Should Be Using a Cache? -[..]ints-your-using-map-when-you-should.html

How hibernate design the cache -

Consider to do more careful update, not just update DB and dirty cache, but update DB and cache in a same time -

Caching can be architectural smell, some hint and some alternative -[..]2/is_caching_an_architectural_smell.html

General caching discussion -[..]are-architecture/caching-techniques.html[..]10-program-busting-caching-mistakes.html[..]B/web-cache/cachingmistakes.aspx?azid=74

缓存穿透?击穿?雪崩? -

(google search) (amazon search)

Fri Sep 18 14:05:58 HKT 2020 From /weblog/house


【地球放大鏡】除了台北101,世界上還有哪些知名防震建築? -

(google search) (amazon search)

Thu Sep 17 16:04:41 HKT 2020 From /weblog/business


one suggestion about layout of presentation -

Some nice tips of having presentation

Do not spend half of your talk "motivating" your topic.
Have a rhythm. Let's be honest
Tell a story.
Make sure you solve an actual problem.
Not everything you say has to be brand new.
Never let anyone touch your slides after you have last seen them.[..]/how-to-get-better-at-presenting-in.html

The secret of Steve Job presentation -[..]-to-give-a-presentation-like-steve-jobs/

Don't just start slamming slides together
Don't be a compulsive bullet-pointer
Don't do live demosDon't do live demos
Don't darken the room
Don't use age-old clipart
Don't drone[..]6-mistakes-you-should-never-make-as.html

An average is better than an arbitrary point
A range is better than an average
A histogram is better than a range
A time series is better than a histogram

Tip, try to distrace yourself??? -

Tip for using online tool for presentation -

Compare about doing slide for presentation and information sharing - also tips about creating infodeck ( e.g. user guide ) -

看直播學簡報-解析陳時中部長的簡報技巧 -[..]ticle/19791-Chen-Shih-chung-presentation

聲音不好聽還能做節目嗎?無意識的冗言贅字該怎麼克服?INSIDE 專訪口語表達訓練講師潘月琪為創作者解惑! -[..]icle/20976-how-podcaster-to-be-talkative

(google search) (amazon search)

Tue Sep 15 21:12:43 HKT 2020 From /weblog/health/food


Slideshow: Surprising Food Combos for Big Flavor -

The unusual origins of our favorite spices -[..]-unusual-origins-of-our-favorite-spices/

Health Benefits of Cinnamon -

薑黃已成為流行健康食品 研究稱或能緩解膝關節疼痛 -[..]%a3%e8%86%9d%e9%97%9c%e7%af%80%e7%96%bc/

(google search) (amazon search)

Tue Sep 15 21:09:27 HKT 2020 From /weblog/health/food


嚴說養生 立夏吃雞蛋 -

烹制雞蛋美食的四種方法 -

More ways of cooking egg -

二十文錢劏房飯:仿西班牙蛋餅 -[..]%BF%E7%8F%AD%E7%89%99%E8%9B%8B%E9%A4%85/

In-depth analysis -[..]gs-are-the-healthiest-food-on-the-planet

(google search) (amazon search)

Tue Sep 15 21:08:57 HKT 2020 From /weblog/history


從木匠到水管工 瑪利歐的「跳躍」史 -

(google search) (amazon search)

Tue Sep 15 20:42:20 HKT 2020 From /weblog/%E6%97%A5%E5%B8%B8%E7%94%9F%E6%B4%BB


(google search) (amazon search)

Fri Sep 11 20:54:13 HKT 2020 From /weblog/learning


【英文本色】Even though 和 although 的分別 -

How to learn language in 30 days -[..][..]power-of-daily-positive-words-15115.html

Use "Nothing beats xxx", "mindful of" to replace "remember" and "dismiss the idea" -[..]%AB%E5%8D%81%E5%BE%8C%E5%AF%AB%E7%A5%9E/

Language make the difference -[..]shocked-by-chinese-multiplication-table/

crazy-facts-about-languages -

直譯英文誤會多,掌握「痛點」讓你高效學習 -

【世界公民】都是「小」,該用 Small 還是 Little? -

(google search) (amazon search)

Fri Sep 11 10:16:38 HKT 2020 From /weblog/science/animal


The Short Happy Life of a Serengeti Lion -[..]

Meet the güiña—a six-pound 'mystery cat' vulnerable to extinction -[..]-guina-mystery-cat-vulnerable-extinction[..]-of-earths-most-extreme-environs-feature[..]imals/2020/09/cheetahs-snow-south-africa

(google search) (amazon search)

Wed Sep 09 08:35:28 HKT 2020 From /weblog/trip/travelling


A nice place to visit -[..]/04/mont-saint-michel-castle-france.html

巴黎美味牛角面包何處尋? -[..]1-beautiful-unique-chateaus-stay-france/

【法國|南法】古羅馬建築 嘉德水道橋(Pont du Gard)/ 世界唯一的三層水道橋。 -

Eze 艾日山城/踏上普羅旺斯的天空之城 -

Nice -

【法國|南法】走進法國的霍格華茲:歐洲最大雙牆城堡卡爾卡松 Carcassonne -

France national park -[..]ark-a-new-model-for-sustainable-tourism/

(google search) (amazon search)

Tue Sep 08 09:16:25 HKT 2020 From /weblog/science/animal


about-search-and-rescue-dogs -[..]arch-and-rescue-dogs-youll-want-to-know/

絕跡山林50年 荒野歌神「唱犬」再度現身 -

Why chocolate is really, really bad for dogs -[..]/science/why-chocolate-bad-dogs-0532532/

(google search) (amazon search)

Mon Sep 07 09:41:59 HKT 2020 From /weblog/learning


When child lie...

How to encourage child -[..]4/09/fun-ways-to-teach-kids-to-code.html

Give Child some duty for good -

步入青春期的孩子最需要從父母那裡得到什麼? -

初中男生多煩惱,父母可知道? -

研究發現和沒有做家務或者十幾歲才開始做家務的孩子相比,3-4歲就開始做家務的青年成人更有可能和家人及朋友關系融洽、學習優秀、較早實現事業成功及經濟獨立。 -[..]uter-science-and-computational-thinking/

專家回答:這不容易,但還是有可能的。人際關系專家兼咨詢專欄作家April Masini說:“家長既要讓孩子繼續保持這種精神氣,又讓他們知道自己行為的後果,要在兩者之間找好平衡點。”她稱,家長可以通過具體的事例,來給孩子講述,在什麼場合、用哪些方法來質疑老師和長輩是OK的,還要解釋這樣做的可能後果。你這樣教育的目的,是讓孩子知道,有時候規則可以打破,邊界可以移動,但行為卻是會帶來風險的。

如何培養出真正的成年人 -

所以,你要做的不是告訴你的孩子冷靜下來,而是應該告訴他們,有機會展現自己的才能,是一件特別幸運的事。<- this is a simple suggestion -

No gifted child -[..]such-thing-as-a-gifted-child-einstein-iq

公平地“偏心”。確保每個孩子都得到優待:例如,如果把周末花在女兒的足球比賽上,那就在工作日找些時間關注你兒子的興趣愛好。 -

Science Says the Most Successful Kids Have Parents Who Do These 9 Things -[..]ids-who-thrive-science-says-do-thes.html

From 0 to 12 months -[..]nting/baby/ss/slideshow-baby-development

但為什麼不在早期教育中教授這些技能呢? 現任利茲大學商學院的Wandi Bruine de Bruin及其同事已經證明, 決策失誤的討論可以納入高中學生的歷史課程中 。 它不僅提高了後續合理性測試的表現; 它也促進了他們對歷史事實的了解。 -[..]9-has-humanity-reached-peak-intelligence

“Part of what is so interesting and surprising about our study is that a simple manipulation — just the way people think about a past event — is changing their conclusions about what they’re doing and whether they’re interested or not,” Niese said.

“It’s something people could do on their own if they wanted to and gain these benefits in situations where cultural stereotypes or pre-existing beliefs might be likely to bias their judgment or cloud their memories.”[..]erception-perspective-enjoyment-8235342/

Instead it is the quality of the conversation that is important. That is, the back and forth, turn-taking nature that requires listening and responding. It’s what Hirsh-Pasek and her long-time collaborator Roberta Golinkoff refer to as a “conversational duet”, because “you can’t sing it alone”. In fact, another study found that if a conversation is interrupted by a phone call, the child does not learn a newly presented word, but will learn it if the conversation is not interrupted. -[..]-that-affects-how-your-babys-brain-grows

They found that children who watched Sesame Street were more likely to be academically on track, and less likely to be held back, than those who didn’t. -[..]ren-find-weird-television-so-mesmerising

Instead of repeating the mistakes of previous generations with heavy-handed tactics, let’ understand the psychological source of the problem. Ultimately, parents’ goal should be to help kids learn strategies for coping with overuse on their own so that they do what’s good for them even when we’re not around. By teaching self-regulating habits, promoting intentional gaming, and helping kids find suitable alternatives, parents can help kids find what they are really looking for. -[..]mes-it-s-about-unmet-psychological-needs

Materials -[..]lp/#/login?productCode=tcb&ucn=637963938 User ID: schteachables46 Password: blue

因為讀書和上堂時,重要的是注意「大圖畫(Big Picture)」 -[..]6%9B%B8%E7%9A%84%E6%96%B9%E6%B3%95/65984

Indoor science experiment -[..]/family/2020/05/screen-time-alternatives

Young children would pass up a reward for a chance to explore -[..]science/young-children-explore-15082020/

Zooming in on keeping kids focused -[..]g-in-on-keeping-kids-focused-coronavirus

How to Set Up a Remote Learning Space for Your Kids -[..]utter/blog/remote-learning-space-set-up/

(google search) (amazon search)

Sat Sep 05 22:20:27 HKT 2020 From /weblog/languages


memory management -[..]s-switching-from-go-to-rust-a190bbca2b1f

Rust -[..]t-nix-easier-unix-systems-programming-3/

深入了解 Rust 异步开发模式 -

(google search) (amazon search)

Fri Sep 04 13:26:55 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/

Compare with jupiter -[..]8-09-13-junit-4-core-vs-jupiter-api.html

Beyond the simple: An in-depth look at JUnit 5’s nested tests, dynamic tests, parameterized tests, and extensions -[..]tests-parameterized-tests-and-extensions

(google search) (amazon search)

Wed Sep 02 13:47:43 HKT 2020 From /weblog/languages


Chinese character detail -

(google search) (amazon search)

Wed Aug 26 14:25:14 HKT 2020 From /weblog/java/features


Good : dynamic, generic
Bad: slow, don't work with Obfuscators and most searching and refactoring tools

A very nice tool to get parameter name - (e.g.: user of getUser(User user))

How to improve the performance -[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field -[..]7-writing-to-final-fields-via-reflection

Using reflection for using test -[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic -[..]ticles/Invokedynamic-Javas-secret-weapon

LamdbaMetafactory is pretty fast. (*) -[..]8/01/09/JavaReflectionButMuchFaster.html

(google search) (amazon search)

Fri Aug 21 21:54:46 HKT 2020 From /weblog/design

API design guideline

This is a message from a management blog, but I think the arguement is also apply API design. In fact, I think most critical difference of good and bad API is knowing which small detail is important and which is not -[..]

Design tips:[..]gView?showComments=true&entry=3258158706[..]its-of-highly-profitable-developers.html

About Compatibility issues

A blog of using interfaces-vs-abstract-classes[..]6/04/interfaces-vs-abstract-classes.html

XOM design overview -

You need to identify the business value but not pick any tools/design just because it is cool -

A lot of links here -

An introduction of good OSS project to study their source -[..]com/2007/06/28/learning-from-the-source/


Discussion of why getting feedback quick is important -[..]u-dont-know-until-you-take-the-next-step

Someone saying that routines is the greatest invention in CS, I agree -

New way of modeling system then layering, The Onion Architecture -

SOLID -[..]of-the-month-march-solid-principles.aspx <-- very good picture![..]d-principles-explained-in-plain-english/

Idempotent, Orthogonality, Immutability -

Some example of how to driven good API -[..]al/2009/5/11/good-api-design-part-3.html

It's not enough to write tests for an API you develop, you have to write unit tests for code that uses your API. When you do, you learn first-hand the hurdles that your users will have to overcome when they try to test their code independently.[..]MichaelFeathers.TheGoldenRuleOfApiDesign

Active interface vs. Passive interface, for me this is another way to under "Tell, don't ask" -[..]-on-api-design-call-stack-as-source.html

The Principles of Good Programming -[..]software-principles-you-must-understand/

Difference choice of how API evolute with change -[..]sive-api-evolution-with-java-interfaces/

JUnit's evolving structure. -

API performance contract -

Consistent naming conventions
Standard terminology
Uniform error responses
Attention to detail (that’s the love part for APIs)
REST APIs that work with only 2 resources and use 4 HTTP verbs (oh, there is so much more to talk about here…)
Avoid API design by way of method-driven approach – that leads you down a slippery slope
- See more at:[..]are-like-parenting/#sthash.Ux1LHMNU.dpuf[..]ake-this-mistake-when-developing-an-spi/

Guideline for webapi -

Good naming is part of design. It sets expectations and communicates a model, showing how something should be understood and used. If you mean to tell the reader getMillisSince1970, don’t say getTime. Specific names inspire you to consider alternatives, to question whether you’re capturing the right abstraction in the right way. It’s not just labeling and it’s not just java.util.Date: This is about the code you write and the code you use. -

(google search) (amazon search)