Publish! 2

.

Anything you do not publish,

will disappear with with you.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

Anything you do not publish,

will disappear in this world after your life.

— Me@2010.03.08

.

.

.

2010.03.10 Wednesday copyright ACHK

時間定義

時間 = 因果網絡

all the necessary conditions(所有先決條件)= sufficient condition(充份條件)

(廣義)原因 = one of the necessary conditions(先決條件之一)

(狹義)原因 = 主要原因 = 主要先決條件

先決條件: 不能有 B 而沒有 A 的話,那 A 就是 B 的先決條件。

怎樣判別一個先決條件是不是主要先決條件?

— Me@2010.02.10

2010.03.09 Tuesday (c) All rights reserved by ACHK

A great artist

Anybody can look at a pretty girl and see a pretty girl. An artist can look at a pretty girl and see the old woman she will become. A better artist can look at an old woman and see the pretty girl that she used to be. But a great artist — a master — and that is what Auguste Rodin was — can look at an old woman, portray her exactly as she is… and force the viewer to see the pretty girl she used to be…. and more than that, he can make anyone with the sensitivity of an armadillo, or even you, see that this lovely young girl is still alive, not old and ugly at all, but simply prisoned inside her ruined body. He can make you feel the quiet, endless tragedy that there was never a girl born who ever grew older than eighteen in her heart…. no matter what the merciless hours have done to her. Look at her, Ben. Growing old doesn’t matter to you and me; we were never meant to be admired — but it does to them. Look at her! (UC)

— Robert A. Heinlein

.

.

2010.03.09 Tuesday ACHK

Past papers 6

雖然原理你已明白,但是到你執行時,一定受你原本的習慣所影響,未必能妥善貫徹。所以,這些心理技巧和工作方法,一定要在平日溫習時先行練習,養成習慣,化成自然反應。

當年我考 ALevel pure maths (高考純數學)時, section A(短題目)竟然 7 題題目中,有 4 題不懂做。但是,我當時十分鎮定,立刻停止不懂的題目,儲存住那些時間,先去做 section B(長題目)。完成所有 section B 的題目後,我才回頭做剛才不懂的 4 題 section A 短題目,結果 4 題都給我想通了。

那時,我為何可以那麼鎮定呢?現在的我反而沒有那麼鎮定。大部分人亦不會那麼鎮定,去立刻停止當時想不到的題目。通常都會覺得 “只差一點點,就會想通那道題目” ,所以再花一些時間。結果還是想不到。但是已花了額外的時間去想,放棄的話會更加心有不甘,所以會花再多的時間去想。 … … 那樣,就會不知不覺墮進惡性循環,浪費極多的時間。

高考時的我可以那麼鎮定,是因為我平日溫習時,幾乎每日都做按年份的 pastpaper。做 pastpaper 會限時間和計分數。每日都有模擬考試,所以已經習慣了 “有題目想不通” 的情況。”唔識就飛” (想不通就立刻停止原本的題目,去做下一題)已成了我的反射動作。

所以說,我不斷提醒你們的,是一些考試必須的情緒技巧,一定要在平日已經練習好。否則,你在考試時的心理質素差的話,即使知識水平夠,你也不能獲取高分數。

— Me@2010.03.06

2010.03.08 Monday (c) All rights reserved by ACHK

Curry–Howard correspondence 2

The Curry–Howard correspondence also raised new questions regarding the computational content of proof concepts which were not covered by the original works of Curry and Howard. In particular, classical logic has been shown to correspond to the ability to manipulate the continuation of programs and the symmetry of sequent calculus to express the duality between the two evaluation strategies known as call-by-name and call-by-value.

Speculatively, the Curry–Howard correspondence may be expected to lead to a substantial unification between mathematical logic and foundational computer science:

— Wikipedia on Curry–Howard correspondence

2010.03.08 Monday ACHK

Curry–Howard correspondence

If one now abstracts on the peculiarities of this or that formalism, the immediate generalization is the following claim: a proof is a program, the formula it proves is a type for the program. Most informally, this can be seen as an analogy which states that the return type of a function (i.e., the type of values returned by a function) is analogous to a logical theorem, subject to hypotheses corresponding to the types of the argument values passed to the function; and that the program to compute that function is analogous to a proof of that theorem. This sets a form of logic programming on a rigorous foundation: proofs can be represented as programs, and especially as lambda terms, or proofs can be run.

The correspondence has been the starting point of a large spectrum of new research after its discovery, leading in particular to a new class of formal systems designed to act both as a proof system and as a typed functional programming language.

— Wikipedia on Curry–Howard correspondence

2010.03.07 Sunday ACHK

Past papers 5

“Past papers” means “past HKCEE/HKAL examination papers”. The topic is for Hong Kong students who are facing HKCEE or HKAL. But the general principles can also be used for tackling other public examinations.

基本上,你把每天的溫習化成模擬考試(即是按年份做 pastpaper)就可以。然後根據每日的分數和每日的錯處,來決定下一日溫什麼。

有一個原理就是,千萬不要企圖完成所有事情。大部分的情況下,你的時間只會足夠完成 “所有事情” 中的一小部分。你可以達到的,就是選最重要的事去做。

比喻說,有一個人入了急症室。他的 心、眼、手 都有危險。那樣,醫生應先救哪一個器官呢? 

— Me@2010.03.06

2010.03.07 Sunday (c) All rights reserved by ACHK

天空堤壩

Talent at its best and character at its worst

.

Lord Acton said we should judge talent at its best and character at its worst. For example, if you write one great book and ten bad ones, you still count as a great writer — or at least, a better writer than someone who wrote eleven that were merely good. Whereas if you’re a quiet, law-abiding citizen most of the time but occasionally cut someone up and bury them in your backyard, you’re a bad guy.

— Paul Graham

.

才能方面,如果一個人的最高點是可以接受的話,你就可以錄用他,即使他有其他任何才能缺點;

品德方面,如果一個人的最低點是不可接受的話,你就千萬不要錄用他,即使他有其他任何品德優點。

— KinOn’s presentation, modified by Me@2010.03.06

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

才能方面,一個太陽可以照亮整個天空;

品德方面,一條裂縫可以摧毀整個堤壩。

— Translation by Me@2010.03.06

.

.

.

2010.03.07 Sunday copyright ACHK

Hacker ethic

* Access to computers — and anything which might teach you something about the way the world works — should be unlimited and total. Always yield to the Hands-On Imperative!
Levy is recounting hackers’ abilities to learn and build upon pre-existing ideas and systems. He believes that access gives hackers the opportunity to take things apart, fix, or improve upon them and to learn and understand how they work. This gives them the knowledge to create new and even more interesting things (Levy, 1984:226). Access aids the expansion of technology.

* All information should be free.
Linking directly with access, information needs to be free for hackers to fix, improve, and reinvent systems. A free exchange of information allows for greater overall creativity. In the hacker viewpoint, any system could benefit from an easy flow of information.

* Mistrust authority — promote decentralization.
The best way to promote the free exchange of information is to have an open system that presents no boundaries between a hacker and his quest for knowledge. Hackers believe that bureaucracies, whether corporate, government, or university, are flawed systems.

* Hackers should be judged by their hacking, not criteria such as degrees, age, race, sex, or position.
Inherent in the hacker ethic is a meritocratic system where superficiality is disregarded in esteem of skill. Levy articulates that criteria such as age, sex, race, position, and qualification are deemed irrelevant within the hacker community. Hacker skill is the ultimate determinant of acceptance. Such a code within the hacker community fosters the advance of hacking and software development.

Testament to the hacker ethic of equal opportunity, L. Peter Deutsch, a twelve-year-old hacker, was accepted in the TX-0 community, though was not recognised by non-hacker graduate students.

* You can create art and beauty on a computer.
Hackers deeply appreciate innovative techniques which allow programs to perform complicated tasks with few instructions. A program’s code was considered to hold a beauty of its own, having been carefully composed and artfully arranged. Learning to create programs which used the least amount of space almost became a game between the early hackers.

* Computers can change your life for the better.

Hackers felt that computers had enriched their lives, given their lives focus, and made their lives adventurous. Hackers regarded computers as Aladdin’s lamps that they could control. They believed that everyone in society could benefit from experiencing such power and that if everyone could interact with computers in the way that hackers did, then the Hacker Ethic might spread through society and computers would improve the world. The hacker succeeded in turning dreams of endless possibilities into realities. The hackers primary object was to teach society that “the world opened up by the computer was a limitless one” (Levy 230:1984)

… free and open source software allows hackers to access the code used to create the software to improve or reuse it. In effect the free and open source software movements embody all of the hacker ethics.

— Wikipedia on Hacker ethic

.

“Hacker” here means a highly skilled programmer, not a computer criminal. — Me

The basic difference is this: hackers build things, crackers break them. — Eric S. Raymond

“In academia, a “hacker” is a person who follows a spirit of playful cleverness and enjoys programming.” -– Wikipedia on Hacker (academia)

.

.

2010.03.06 Saturday ACHK

Past papers 4

“Past papers” means “past HKCEE/HKAL examination papers”. The topic is for Hong Kong students who are facing HKCEE or HKAL. But the general principles can also be used for tackling other public examinations.

這個原理除了可以應用在溫習的時間管理外,也可以應用在考試時的時間管理上。例如,整份試卷共有五題。很多人做第一題時,往往會力臻完美:寫字慢慢地寫,字體很優美;錯了又要用塗改液塗,然後慢慢等它乾;答案過份詳細;有少部分不懂,又要堅持想不到不罷休 … … 那樣的話,通常其餘四題會不夠時間做。

question 1 20/20
question 2 15/20
question 3 10/20
question 4 10/20
question 5 05/20

total 60/100

正確的政策是,要根據題目的分數多少,來決定應花多少時間在每一題。例如,某一題的適當時限是半小時,大概在 25 分鐘的時候,你就應該準備收筆,趕快寫下最後一句,然後立刻問始做下一題。無論心裡有多麼不舒服,你一定要迫自己停筆,迫自己趕快開始下一題。寧願在所有題目都大概完成了後,還有剩餘時間的話,才回第一題,修正不完美的地方。即使沒有時間給你修正,導致不能取滿分,起碼所有題目都大概完成,保證你會有一個不低的分數。

question 1 15/20
question 2 15/20
question 3 15/20
question 4 15/20
question 5 15/20

total 75/100

— Me@2010.03.05

2010.03.05 Friday (c) All rights reserved by ACHK

Category Theory | Lisp

My current self-study programme includes

1. read almost everything written by Paul Graham

public domain image
Wikipedia

2. learn Lisp programming language (Common Lisp/Scheme) by reading Paul Graham’s textbooks

3. learn Category Theory so that I can read almost everything written by John Baez

public domain image
Wikipedia

Yester-night and tonight, I discovered that they are related:

“Lists, and recursive operations on them, are an excellent case in point. But the path connecting them to their mathematical underpinnings is a long and winding one, which lays in the realm of Category Theory.” — jao

I had never expected that. They are one thing.

Paul Graham –> Lisp –> Category Theory –> John Baez

I have been learning Lisp since 2000 (Machine Intelligence course), since 2006 (Structure and Interpretation of Classical Mechanics, Structure and Interpretation of Computer Programs), since 2010. I have been learning Category Theory since 2006-2008 (John Baez), since 2008 (Sets for Mathematics), since 2010. I had never expected that they are just two different languages of the same thing.

— Me@2010.03.04

2010.03.05 Friday (c) All rights reserved by ACHK

Hacker ethic

Hacker 4

.

.

* Access to computers — and anything which might teach you something about the way the world works — should be unlimited and total. Always yield to the Hands-On Imperative!

* All information should be free.

* Mistrust authority — promote decentralization.

* Hackers should be judged by their hacking, not criteria such as degrees, age, race, sex, or position.

* You can create art and beauty on a computer.

* Computers can change your life for the better.

… free and open source software allows hackers to access the code used to create the software to improve or reuse it. In effect the free and open source software movements embody all of the hacker ethics.

— Wikipedia on Hacker ethic

.

.

.

[10] Hacker here means a highly skilled programmer, not a computer criminal. — Me

The basic difference is this: hackers build things, crackers break them. — Eric S. Raymond

“In academia, a “hacker” is a person who follows a spirit of playful cleverness and enjoys programming.”

– Wikipedia on Hacker (academia)

2010.03.05 Friday  ACHK

Past papers 3

“Past papers” means “past HKCEE/HKAL examination papers”. The topic is for Hong Kong students who are facing HKCEE or HKAL. But the general principles can also be used for tackling other public examinations.

千萬不要打算 “溫完書” 才做 pastpaper。因為書是溫不完的,你打算 “溫完書” 才做 pastpaper 的話,你將會沒有時間做 pastpaper。

我以前中五時有考會考(公開試)美術科。中三時的美術老師教了一樣考試技巧。會考時,會有三小時畫一幅畫。例如,那幅畫是一幅郊外風景圖。畫內有一間屋、一棵樹 和 一隻狗。假如,你畫那間屋時力臻完美,你就會花了大部分時間,導致沒有足夠時間畫那棵樹和那隻狗。整幅畫只有那間屋是完整的,你的美術科會不合格。

正確的方法是,第一步,先簡略描繪了屋、樹、狗的外型。然後,為 屋、樹、狗 加第一重的細節。還有時間的話,就加第二重的細節。還有時間的話,就加第三重的細節。如此類推。這個方法的好處是,無論考官在什麼時候宣佈 “停筆”,你也可以宣稱,你已經完成了那幅畫,不會不合格。

這可以引申做溫習和考試的什麼道理呢?

如果你打算 “溫完書” 才做 pastpaper,又或者 打算 “溫完” 一個 topic 才溫下一個 topic 的話,你很容易會不自覺地花了大部分時間於一個 topic,導致你沒有足夠時間溫其他 topic。例如,你對 mechanics 很熟,其他 topics 沒有足夠時間溫習,你整份 physics 卷的分數將會很低,甚至不合格:

    mechanics 18/20

    EM 05/20

    wave 05/20

    optics 05/20

    atomic physics 05/20

    total 38/100

但是,如果你不斷按年份做 pastpaper 的話,因為每年的 pastpaper 都有多個 topic 的題目,你每個 topic 即使不太熟,也不會太生疏。你整份 physics 即使不高分,也不會不合格:

    mechanics 12/20

    EM 12/20

    wave 12/20

    optics 12/20

    atomic physics 12/20

    total 60/100

在這個基礎,想再提升分數的話,可以用梅花間竹的方法,按年份做 pastpaper:

按年份做 pastpaper(要計時間和計分數)–> 溫習特定 topic –> 按年份做 pastpaper –> 溫習特定 topic –> …

溫習特定 topic 和按年份做 pastpaper 之間就有這個關係。兩者其實是相輔相成的。例如,你按年份做 pastpaper,發現次次也是因為某一個 topic 導致損失十幾分的話,你就可以知道那個 topic,正正就是你特定要溫的 topic。那你在溫習時,就可以重點出擊。

溫習特定 topic = 溫習課文 + 做特定 topic 的 pastpaper

— Me@2010.03.04

2010.03.04 Thursday (c) All rights reserved by ACHK

Y Combinator

A fixed point combinator (or fixed-point operator) is a higher-order function that computes a fixed point of other functions.

— Wikipedia on Y Combinator

2010.03.04 Thursday ACHK

Hacker 3

.

The Jargon File has had a special role in acculturating hackers since its origins in the early 1970s. Many textbooks and some literary works shaped the academic hacker subculture; among the most influential are:

* Hackers: Heroes of the Computer Revolution, by Steven Levy
* Godel, Escher, Bach, by Douglas Hofstadter
* The Art of Computer Programming (TAOCP), by Donald Knuth
* The Mythical Man-Month, by Brooks
* Compilers: Principles, Techniques, and Tools (“the Dragon Book”), by Aho, Sethi, and Ullman
* Structure and Interpretation of Computer Programs (SICP), by Abelson and Sussman
* The C Programming Language (K&R), by Kernighan and Ritchie
* The Hitchhiker’s Guide to the Galaxy, by Douglas Adams
* The Tao of Programming, by Geoffrey James
* The Illuminatus! Trilogy, by Robert Shea and Robert Anton Wilson
* Principia Discordia, by Greg Hill and Kerry Thornley
* The Soul of a New Machine, by Tracy Kidder
* The Cuckoo’s Egg, by Cliff Stoll
* The Unix System, by Stephen R. Bourne
* Hackers & Painters, by Paul Graham
* The Cathedral and the Bazaar, by Eric S. Raymond
* The essays of Richard M. Stallman (many published in Free Software, Free Society: Select Essays of Richard M. Stallman)

— Wikipedia on Hacker (programmer subculture)

.

.

[10] “Hacker” here means a highly skilled programmer, not a computer criminal. — Me

The basic difference is this: hackers build things, crackers break them. — Eric S. Raymond

In academia, a “hacker” is a person who follows a spirit of playful cleverness and enjoys programming.

— Wikipedia on Hacker (academia)

.

.

.

2010.03.04 Thursday ACHK

Past papers 2

“Past papers” means “past HKCEE/HKAL examination papers”. The topic is for Hong Kong students who are facing HKCEE or HKAL. But the general principles can be used for tackling other public examinations.

A:你有沒有按年份做 pastpaper(歷屆試題)?

KWY:我有按 topic(課題)做 pastpaper。我有做已溫習了的 topic 的 pastpaper。我打算溫完書後,才開始按年份做 pastpaper。

A:可以。這樣可以。但是不要太遲。例如,你打算按年份做十年的 pastpaper 的話,其實是要花很多時間的。

LKF:哪應該是集中先把一個 topic 溫完,才溫下一個 topic,還是一開始就分散溫比較好?

A:分散溫。主要應該用按年份做 pastpaper 的方法來溫比較好。如果你打算 “溫完” 一個 topic 才溫下一個 topic 的話,你到會考(公開試)前的一晚,也不會 “溫完” 所有課程的內容。

LKF:但是我已經沒有什麼時間溫 physics 了。 

A:現在,距離公開試只有三個多月的時間,是不會有一段時間,給你特意溫熟某一個課題的。即使有,因為任何一個 topic 都可以無限鑽研,你讀多久,也會覺得不夠熟。哪你如何可以客觀知道自己對某一個 topic 夠不夠熟呢?到頭來,你也是要在做會考題(pastpaper)時,才會知道。

其中一個方案是梅花間竹地按年份做 pastpaper:

按年份做 pastpaper(要計時間和計分數)–> 溫習特定 topic –> 按年份做 pastpaper –> 溫習特定 topic –> …

溫習特定 topic 和按年份做 pastpaper 之間就有這個關係,兩者其實是相輔相成的。例如,你按年份做 pastpaper,發現次次也是因為某一個 topic 導致損失十幾分的,你就可以知道那個 topic,正正就是你特定要溫的 topic。

— Me@2010.03.03

2010.03.03 Wednesday (c) All rights reserved by ACHK

diff

In computing, diff is a file comparison utility that outputs the differences between two files. It is typically used to show the changes between a file and a former version of the same file.

— Wikipedia on diff

2010.03.03 Wednesday ACHK

Hacker 2

.

* Creating software and sharing it with each other
* Placing a high value on freedom of inquiry; hostility to secrecy
* Information-sharing as both an ideal and a practical strategy
* Upholding the right to fork
* Emphasis on rationality
* Distaste for authority
* Playful cleverness, taking the serious humorously and their humor seriously

The difference between hackers and crackers, according to them, is that where hackers use their skills and knowledge to learn more about how systems and networks work, crackers will use the same skills to author harmful software (like viruses, trojans, etc.) and illegally infiltrate secure systems with the intention of doing harm to the system.

「hacker」們建設,而「cracker」們破壞。

真實的黑客所指主要指的是高級程式員,… 而不是為人所誤解專指對電腦系統及程式進行惡意攻擊及破壞的人。

— Wikipedia on Hacker (programmer subculture)

.

.

.

2010.03.03 Wednesday ACHK