RSS feed [root] /




login:

password:

title search:




 


Sun Jul 23 22:00:11 HKT 2017



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

Tue Aug 15 23:21:02 HKT 2017 From /weblog/learning

habit


How habit affecting you - http://stephencfchan.blogspot.com[..]2012/02/poor-study-habit-and-remedy.html

How to change habit - http://cn.wsj.com/big5/20120420/trv075618.asp?source=rss

How to quit bad habit - http://now.eloqua.com[..]028&elq=2220804c77864d95acba08b4a6f21c23

好奇心,细节 - http://blog.sina.com.cn/s/blog_47841af70102e1yi.html

The most interesting things I've learnt about learning - http://jchyip.blogspot.com.au[..]-most-interesting-things-ive-learnt.html

The most interesting things I've learned about improvement - http://jchyip.blogspot.com.au[..]t-interesting-things-ive-learned_14.html

* Increase your exposure to new and different ideas
* Spend as much time learning from your trading as you actually spend trading
* Manage yourself, not just your risk and your positions

http://traderfeed.blogspot.hk[..]hree-best-practices-of-best-traders.html

http://traderfeed.blogspot.com[..]/energy-well-being-and-success-four.html

直覺的奧妙 — Blink - https://thestandnews.com[..]%A6%BA%E7%9A%84%E5%A5%A7%E5%A6%99-blink/

1)  How does the person spend his or her free time?  Per Ayn Rand's observation above, what does he or she do for enjoyment?  

2)  How does the person respond to your successes?  Many people are willing to commiserate with you when you're down and elevate themselves in the process.  A person of genuine goodwill celebrates your successes and is happy for your happiness.

3)  What strong beliefs does the person voice and live through their actions?  Character means standing for what you believe in and living your beliefs.  Go along and get along might be comfortable, but commitment is what powers effective action in the world.

http://traderfeed.blogspot.hk[..]hree-powerful-measures-of-character.html

Ask as a habit - https://thestandnews.com[..]%83%E9%80%99%E5%80%8B%E5%95%8F%E9%A1%8C/

practice consistently, stay warm - http://www.zmescience.com[..]brain/halo-starcraft-practice-excellence

Wake up early - https://medium.com[..]e-guide-for-waking-up-early-a750c011eb07

(google search) (amazon search)


Mon Aug 14 21:30:59 HKT 2017 From /weblog/learning

maths


How to learn maths? Make a story about it - https://hackernoon.com[..]not-to-memorise-mathematics-98fef71aefcf

(google search) (amazon search)


Wed Aug 09 11:37:20 HKT 2017 From /weblog/design

null


Use present and absent rather than NULL - http://binkley.blogspot.com/2012/01/better-than-null.html

Propose of enhancement, null handelers and null reference - http://shemnon.com[..]01/null-handelers-and-null-refere-1.html

How null breaks polymorphism - http://eureka3d.com[..]s-polymorphism-or-the-problem-with-null/ http://eureka3d.com[..]orphism-or-the-problem-with-null-part-2/

Discussion about forbid NULL as parameter and return - http://javablog.co.uk[..]5/07/null-parameters-and-returning-null/

Default object in C# - http://www.kodefuguru.com[..]t/2012/09/25/Default-Objects-with-C.aspx

Discussion about using optional - http://blog.jooq.org/2015/08/20/divided-we-stand-optional/

Some suggest about do something better than use null - https://blog.jetbrains.com/idea/2017/08/code-smells-null

(google search) (amazon search)


Wed Aug 09 00:23:01 HKT 2017 From /weblog/career

productivity


Links of tips of how to be a productivity person - http://freelanceswitch.com[..]-read-productivity-tips-for-freelancers/

Ten ways to ensure that you finish work on time

1. Ensure that you learn from your calls
2. Make sure that you complete an entry for the knowledge base
3. Make sure that the users understand the help desk opening hours.
4. Ensure that you deal with calls effectively.
5. Cut out the unnecessary chatter.
6. Don’t feel guilty about finishing at your appointed time.
7. Organize your day so that the urgent stuff gets done first,
8. Start on time.
9. Some people think that the boss will be impressed by seeing you stay late. A good boss will not be fooled by this
10. A recent survey showed that the longer you stay at work the more your efficiency declines.

- http://blogs.techrepublic.com.com/helpdesk/?p=968

http://manwithnoblog.com[..]0/01/14/improving-your-listening-skills/

http://www.dextronet.com[..]0-best-tricks-of-fooling-myself-to-work/

Don't denial what really happening - http://www.michelemmartin.com[..]blog/2015/08/why-denial-doesnt-work.html

Isolation, Bimodal, habit and rest - https://medium.com[..]roduce-deep-meaningful-work-d9aafc3d32e3

Count 5 second before start - https://betterhumans.coach.me[..]done-with-the-5-second-rule-b7abea890087

(google search) (amazon search)


Tue Aug 08 22:57:56 HKT 2017 From /weblog/software_engineering/SCM

branch


Why merge often - http://queue.acm.org/detail.cfm?id=1643030

http://www.cmcrossroads.com[..]/cgi-bin/cmwiki/view/CM/BranchYesMergeNo

http://paulhammant.com/2013/12/04/what_is_your_branching_model

A lot of resource here - http://www.cmcrossroads.com[..]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.

http://discuss.joelonsoftware.com[..]arent=16312&ixDiscussGroup=3&cReplies=11

Subversion branching technique and tips - http://binkley.blogspot.com[..]version-best-practices-branching_01.html http://www.dehora.net[..]version_tips_dealing_with_branches.html/

Another discussion - http://www.codinghorror.com/blog/archives/000968.html

Branch visualization - http://codicesoftware.blogspot.com[..]07/05/linus-torvalds-on-git-and-scm.html http://www.youtube.com/watch?v=CABIi-Eu2zA

One way of manage branching and merging, the summary is, frequency create new branch for pre-merge instead of one time big merge - http://designbygravity.wordpress.com[..]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... http://blogs.open.collab.net/svn/2007/09/what-subversion.html

No branch? https://cacm.acm.org[..]-of-code-in-a-single-repository/fulltext http://www.infoq.com[..]s/2017/08/How-Google-build-Web-framework

(google search) (amazon search)


Tue Aug 08 18:12:08 HKT 2017 From /weblog/design/distribute

event


Event Bus Implementation(s) - https://hackernoon.com/event-bus-implementation-s-d2854a9fafd5 http://www.infoq.com[..]2017/08/Summary-event-bus-implementation

(google search) (amazon search)


Tue Aug 08 09:54:14 HKT 2017 From /weblog/security

crack


How to use basic UNIX tool to steal other facebook identity - http://blog.mostof.it/how-to-steal-a-facebook-identity/

More on BGP Attacks - http://blog.wired.com/27bstroke6/2008/08/how-to-intercep.html

Discussion of crack protection - http://discuss.joelonsoftware.com/default.asp?design.4.579670 http://www.focusoncode.com/exe-packers-crypters-and-compressors/ , introduce tools - http://www.pelock.com/

Ten Immutable Laws of Security
Law #1: If a bad guy can persuade you to run his program on your computer, it's not your computer anymore
Law #2: If a bad guy can alter the operating system on your computer, it's not your computer anymore
Law #3: If a bad guy has unrestricted physical access to your computer, it's not your computer anymore
Law #4: If you allow a bad guy to upload programs to your website, it's not your website any more
Law #5: Weak passwords trump strong security
Law #6: A computer is only as secure as the administrator is trustworthy
Law #7: Encrypted data is only as secure as the decryption key
Law #8: An out of date virus scanner is only marginally better than no virus scanner at all
Law #9: Absolute anonymity isn't practical, in real life or on the Web
Law #10: Technology is not a panacea

http://www.microsoft.com[..]s/security/essays/10imlaws.mspx?mfr=true

An example of buffer overflow attack - http://www.thegeekstuff.com/2013/06/buffer-overflow/

hack yourself! - https://blog.codinghorror.com/hacker-hack-thyself/

(google search) (amazon search)


Sun Aug 06 17:21:16 HKT 2017 From /weblog/unix/script

text


10 awk tips - http://www.catonmat.net/blog/ten-awk-tips-tricks-and-pitfalls/

8 Powerful Awk Built-in Variables – FS, OFS, RS, ORS, NR, NF, FILENAME, FNR - http://www.thegeekstuff.com[..]iables-fs-ofs-rs-ors-nr-nf-filename-fnr/

Tutorial of text editing commands - http://www.ibm.com[..]works/aix/library/au-unixtext/index.html

wc and nl tutorial - http://www.thegeekstuff.com/2013/02/wc-nl-examples/ https://enkipro.com/insight/558ac712249a234c00842b68

tips for uniq, like show only items have duplications - http://www.thegeekstuff.com/2013/05/uniq-command-examples/

Tips of "cat", include display by column and by delimiter - http://www.thegeekstuff.com/2013/06/cut-command-examples/

Using lynx to convert HTML to text - https://enkipro.com/insight/558aaea45800843200bca364

(google search) (amazon search)


Sun Aug 06 17:20:16 HKT 2017 From /weblog/unix/script

file


Various ways to working with file - http://www.catonmat.net/blog/bash-one-liners-explained-part-one/

Use truncate to pad the file size up - http://www.lainoox.com/truncate-shrink-extend-files/

Making a file unalterable with chattr - https://enkipro.com/insight/558ac712249a234c00842b68

(google search) (amazon search)


Sun Aug 06 16:15:20 HKT 2017 From /weblog/trip

hk_beach


周末熱辣辣 落水消暑! 11個環保署評定「一級」靚水質 香港沙灘 - http://www.weekendhk.com[..]%E7%B4%9A-%E7%92%B0%E4%BF%9D%E7%BD%B2/2/

(google search) (amazon search)


Sun Aug 06 09:37:23 HKT 2017 From /weblog/database/transaction

transaction


Transaction, same as all the concept in computing, is an approach and trade-off - http://www.allthingsdistributed.com[..]d.com/2007/12/eventually_consistent.html

Transaction file system - http://www.infoq.com/news/2008/01/file-systems-transactions http://myjavatricks.com/jtfs.aspx

Explanation about database isolation level - http://highscalability.com[..]-and-their-effects-on-performance-a.html https://begriffs.com[..]08-01-practical-guide-sql-isolation.html

A nice article explain about transaction process - http://www.theserverside.com[..]Nuts-and-Bolts-of-Transaction-Processing

http://vladmihalcea.com[..]guide-to-acid-and-database-transactions/

(google search) (amazon search)


Sat Aug 05 00:18:58 HKT 2017 From /weblog/entertainment

music


Prince - http://list25.com[..]-the-artist-you-knew-as-prince/?view=all

elvis-presley - http://list25.com[..]ting-facts-about-elvis-presley/?view=all

george-michael - http://list25.com[..]-not-know-about-george-michael/?view=all

【傾聽音樂】中世紀音樂是宗教的奴僕,還是高貴的婢女 - https://thestandnews.com[..]%98%E8%B2%B4%E7%9A%84%E5%A9%A2%E5%A5%B3/

(google search) (amazon search)


Fri Aug 04 23:45:53 HKT 2017 From /weblog/trip/camping

tips


http://list25.com[..]ng-hacks-that-are-truly-genius/?view=all

8字結 - http://www.ropelab.com.au/figure-8-descenders/

http://list25.com[..]ke-your-weekend-more-enjoyable/?view=all

【防蚊香包】
材料:小茴香、艾葉、白芷、薄荷、石菖蒲、藿香各10克
做法:將所有材料混合均勻,放在紗布袋內,可隨身攜帶或放在多蚊處驅蚊
*孕婦及皮膚敏感人士忌用

【止痕外洗方】
材料:地膚子、土茯苓、白蘚皮、紫草各20克
做法:將材料連同5碗水,用中火煲30分鐘,待暖後外洗患處
*孕婦及皮膚敏感人士忌用
http://hk.apple.nextmedia.com/realtime/news/20160520/55106709

https://www.outsideonline.com/2217271/20-lost-arts-outdoors

(google search) (amazon search)


Thu Aug 03 18:22:14 HKT 2017 From /weblog/design

refactoring


http://c2.com/cgi/wiki?RefactoringLanguage

Refactoring to Patterns Catalog - http://www.industriallogic.com/xp/refactoring/catalog.html

Article talk about the book: http://www.oreillynet.com/ruby/blog/2006/03/transformation.html

Catagories smell into "smell in class" and "smell between class" - http://www.codinghorror.com/blog/archives/000589.html

Known but good to remind http://www.thecodejunkie.com[..]10/01/6-steps-to-master-refactoring.html

An experience sharing - http://www.javacodegeeks.com[..]m/2011/05/refactor-hudson-god-class.html http://www.peterprovost.org[..]treme-Refactoring-with-Brian-Button.aspx

Refactoring should not introduce bug... - http://jchyip.blogspot.com[..]01/so-why-are-you-refactoring-again.html

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

Not all code change is refactoring - http://parlezuml.com/blog/?postid=850 , and

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

Refactory if needed - http://dreamhead.blogbus.com/logs/24874404.html

Refactoring, when start, when stop? - http://martinfowler.com/bliki/OpportunisticRefactoring.html

Refactoring metric - http://www.grahambrooks.com[..]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.

http://www.refactoringideas.com[..]-to-get-rid-of-helper-and-utils-classes/

Converting forloop to streaming - http://martinfowler.com/articles/refactoring-pipelines.html

Refactoring JavaScript from Sync to Async in Safe Baby-Steps - http://www.natpryce.com/articles/000812.html

code-refactoring-dos-donts - https://jaxenter.com/code-refactoring-dos-donts-135960.html

(google search) (amazon search)


Thu Aug 03 00:35:47 HKT 2017 From /weblog/health/food

vegi


Pros and Cons for vegi - http://thehousenews.com[..]84%E5%BC%8A%E8%88%87%E5%88%A9-%E4%B8%80/

B12 is important - http://www.yimho.com/1821.html

熟吃損失多少維生素? - http://www.healthcare-kingdom.com[..]0%91%E7%B6%AD%E7%94%9F%E7%B4%A0%EF%BC%9F

中國城市人的香椿情結 - http://cn.wsj.com/big5/20140418/rcu180822.asp?source=rss

西蘭花如何幫助身體應對空氣污染 - http://cn.wsj.com/big5/20140613/ren161006.asp?source=rss

13 Easy Ways to Eat More Greens - http://www.webmd.com/food-recipes/ss/slideshow-greens

Recipes that use veggies from garden - http://list25.com[..]s-and-veggies-from-your-garden/?view=all

lutein-veggies-cognitive-protection - http://www.zmescience.com[..]n-veggies-cognitive-protection-01082018/

(google search) (amazon search)



Mon Jul 31 13:57:56 HKT 2017 From /weblog/security

password


Make sure all your passwords are 12 characters or more, Use bcrypt or PBKDF2 exclusively to hash anything you need to be secure. - http://www.codinghorror.com/blog/2012/04/speed-hashing.html

Password is only worked for one time - http://www.mobileread.com/forums/showthread.php?threadid=6462

crack captcha - http://sam.zoy.org/pwntcha/

Java password mask - http://java.sun.com[..]er/technicalArticles/Security/pwordmask/

OpenID resource - http://openid.net/ http://www.arachna.com[..]ge/spidaman/20070225#the_openid_snowball http://developers.sun.com/identity/ http://www.theserverside.com[..]_id=46569&asrc=EM_NLN_2030603&uid=703565

OpenID explain - http://ravichodavarapu.blogspot.com/2007/06/what-is-openid.html

A technique that crack winxp password at 3 min - http://www.infoq.com/news/2007/09/rainbowtables

Using image as password - http://dsc.discovery.com/news/briefs/20060306/password_tec.html

The other interesting idea, Evolving Password - http://www.docuverse.com[..]uid=79730e53-1d30-47ae-98e8-abb55201429b

Passphrase Evangelism - http://www.codinghorror.com/blog/archives/000360.html

Rainbow Hash Cracking - http://www.codinghorror.com/blog/archives/000949.html , add salt (token) to prevent it - http://blog.cfelde.com/2011/04/hashing-passwords/

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? - http://www.baekdal.com/tips/password-security-usability

Discussion about if some old suggested rules about still valid or not - http://queue.acm.org/detail.cfm?id=2422416&ref=fullrss

Using quantum for password? - https://www.inside.com.tw/2017/03/01/quantum-key-distribution

Salted Password Hashing - Doing it Right - https://crackstation.net/hashing-security.htm http://www.infoq.com[..]w-to-encrypt-the-user-password-correctly

It sound like outsource is better - https://blog.plan99.net/building-account-systems-f790bf5fdbe0

(google search) (amazon search)


Sun Jul 30 17:10:51 HKT 2017 From /weblog/unix

performance


Few config suggestions - http://blog.monitis.com[..]20-linux-server-performance-tips-part-2/

Linux kernel profiling with perf - https://perf.wiki.kernel.org/index.php/Tutorial http://lxr.free-electrons.com/source/tools/perf/design.txt

Intel VTune Amplifier profiler - http://software.intel.com/en-us/intel-vtune-amplifier-xe

Oracle solaris studio - http://www.oracle.com[..]torage/solarisstudio/overview/index.html

http://www.brendangregg.com/linuxperf.html <- "This page links to various Linux performance material I've created, including the tools maps on the right."

(google search) (amazon search)


Thu Jul 27 10:50:05 HKT 2017 From /weblog/health

mental


depression - http://list25.com[..]pression-and-improve-your-mood/?view=all

【壹週刊健康】認識ADHD》腦裡有嘭嘭聲乜都喊 - http://hk.apple.nextmedia.com/realtime/magazine/20160512/55085578

鍛煉能改善孤僻和拖延? - http://cn.wsj.com/big5/20170726/LIF164153.asp?source=rss

(google search) (amazon search)


Wed Jul 26 10:57:03 HKT 2017 From /weblog/database

time series


Some information about Time Series:

http://en.wikipedia.org/wiki/S-PLUS
http://download-west.oracle.com[..]ocs/cd/A87860_01/doc/inter.817/index.htm
http://www.sas.com/
http://oracledmt.blogspot.com/2006/10/time-series-revisited.html
http://oracledmt.blogspot.com[..]1/time-series-forecasting-part-1_23.html

Discussion of time in time series database - UTC or local - http://quant.stackexchange.com[..]ime-in-time-series-database-utc-or-local

Market data:
http://cs.nyu.edu/cs/faculty/shasha/fintime.html

and a book:
http://sql-info.de[..]iented-database-applications-in-sql.html
http://www.cs.arizona.edu/people/rts/tdbbook.pdf

Should we use DATE as key or INT as key? http://quant.stackexchange.com[..]senting-time-series-implementation-level

Collections of column-oriented stores - http://quant.stackexchange.com[..]s/1392/usage-of-nosql-storage-in-finance

时序数据库深入浅出之存储篇 - http://www.infoq.com/cn/articles/storage-in-sequential-databases

深入浅出时序数据库之压缩篇 - http://www.infoq.com/cn/articles/condense-in-sequential-databases

pretreatment - http://www.infoq.com[..]les/pretreatment-in-sequential-databases

Why - http://www.infoq.com/cn/news/2017/07/Why-time-series-database

分级存储 - http://www.infoq.com[..]archical-storage-of-sequential-databases

(google search) (amazon search)


Wed Jul 26 10:20:22 HKT 2017 From /weblog/web

performance


One of many tips of how to design a website that deliver content faster - http://alexander.kirk.at[..]006/02/02/10-steps-to-a-faster-web-site/

The other, for user to read quick - http://www.vandelaydesign.com[..]0-ways-to-design-for-impatient-visitors/

Webmaster tools, marketing - http://www.sitepronews.com/archives/2007/aug/3.html
Webmaster tools, page development - http://manwithnoblog.com/2007/08/05/css-debugging-tools/
and tools to tune page performance - http://skytechgeek.com[..]tools-to-boost-up-your-site-performance/

Tips from codinghorror - http://www.codinghorror.com[..]og/2011/06/performance-is-a-feature.html

Tips from ACM - http://queue.acm.org/detail.cfm?ref=rss&id=2512489

Web Framework Benchmarks - http://www.techempower.com/benchmarks/

How taobao optimize their mobile app - http://www.infoq.com[..]bao-521-performance-optimization-project

The timeline of how browser showing the page, and how to optimize it - http://www.nateberkopec.com[..]rontend-performance-chrome-timeline.html https://medium.com[..]-for-the-browser-f2f51a29c572#.7ivccwl5e

How a page loaded fast - https://varvy.com/pagespeed/wicked-fast.html https://medium.baqend.com[..]d-page-loads-lessons-learned-4bb1be3ed07

About making picture load faster - http://www.infoq.com[..]icles/yelp-lossless-compression-pictures

(google search) (amazon search)


Tue Jul 25 11:18:11 HKT 2017 From /weblog/trip/travelling

south america


阿根廷的觀鳥天堂 - http://cn.wsj.com/big5/20120510/trv081838.asp

http://thenatureoftheworlds.blogspot.com.au[..]m.au/2013/10/iguazu-falls-argentina.html

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

Hotel next to Perito Moreno Glacier - http://www.eolo.com.ar/home_eng.htm

一個中國人在沒有馬奎斯的波哥大- https://theinitium.com[..]0170211-culture-travel-marquez-columbia/

世界獨一無二 哥倫比亞彩虹河奇觀 - https://dq.yam.com/post.php?id=2498

(google search) (amazon search)


Tue Jul 25 00:48:50 HKT 2017 From /weblog/science

light


Interesting, test speed of light with ping - http://physics.stackexchange.com[..]experiments-to-derive-the-speed-of-light

History of color photograph - http://writescience.wordpress.com/2012/11/21/in-living-color/

光電效應:愛因斯坦的諾貝爾 - https://phycat.wordpress.com[..]19/photoelectric-effect-einsteins-nobel/

光速:宇宙高速公路的速度限制 - https://phycat.wordpress.com/2016/12/08/speed-of-light/

What exactly is a photon? Definition, properties, facts - http://www.zmescience.com/science/what-is-photon-definition-04322

Why Gold is yellow in color - http://www.zmescience.com[..]other/feature-post/gold-color-relativity

(google search) (amazon search)


Fri Jul 21 17:24:58 HKT 2017 From /weblog/database/performance

Note of SQL performance tuning


Note of this book - http://www.ocelot.ca/tuning.htm

1) Order of "and" and "or" is matter, if no cost-base optimizer

where column1 = 'a' and column2 = 'b' -> where column2 = 'b' and column1 = 'a' if column2 'b' is less likely

2) <> is more expensive than =

3) Can force to use index if SELECT * FROM table WHERE indexed_column > 0

4) UPPER(column) might lose information, use LOWER is better

5) WHERE column = 'WORD' or column = 'word' is always faster than WHERE LOWER(column) = 'word' , even faster version is test if database if case-insensitive: WHERE column = 'WORD' or ('WORD' <> 'word' AND column = 'word')

6) 32bit integer is the fastest datatype for 32bit OS

7) column in (?, ?) is faster than column =? or column = ? for some database, and don't slow in any database

8) For aggregate functions, prevent using having, try to use fewer columns in group by and use subquery if possible

9) In fact, count(1) is not faster than count(*)

10) CAST before aggregate function: SELECT CAST(SUM(column) AS INT) -> SELECT SUM(CAST(column as INT))

11) Use constant as much as possible, e.g.: select * from t1, t2 where t1.c1 = t2.c1 and t1.c1 = 1 -> select * from t1, t2 where t1.c1=1 andn t2.c1=1

12) Information of Join vs Subqueries

13) Information of optimum column type (VARCHAR, TIMESTAMP, WORD size INT and CHAR(1) usually better), shift effect for page

14) prevent NULL for porting issue

15) Low level table physical information

Some related links - http://www.techartifact.com[..]9/12/sql-optimization-tipsquestions.html

16) Prevent database level transaction, prevent joining, prevent locking ( like auto increment key ), pretty good suggestion - http://www.aviransplace.com/2015/08/12/mysql-is-a-great-nosql/

Few good tips, like avoid cursors - http://www.javaworld.com[..]ent/21-rules-for-faster-sql-queries.html

(google search) (amazon search)


Wed Jul 19 17:07:17 HKT 2017 From /weblog/political

democracy


Problem?? http://cn.wsj.com/big5/20110419/GOK075032.asp?source=rss

民主、法治與自由 - http://cn.wsj.com/big5/20111010/WES071154.asp?source=rss

憲政與民主:孰先孰後? http://cn.wsj.com/big5/20130131/YXZ070844.asp?source=rss

Noam Chomsky - http://list25.com/25-facts-about-noam-chomsky/?view=all

從思考終審法院的多數決制度我們能學到什麼? -
https://thestandnews.com[..]%BD%E5%AD%B8%E5%88%B0%E4%BB%80%E9%BA%BC/

(google search) (amazon search)