Sunday, June 29, 2008

Is this true??

** When your subordinate display family photo on the table**
If your subordinate is a ‘He’, you feel “wow!! He taking care of his family, a responsible man”
If your subordinate is a ‘She’, you feel “career is not important for her; do not expect she will do her best to contribute in works!”
看到男下屬的桌上擺放著全家福的照片, 老板心想:「嗯!他一定是個顧家,負責的好男人。」
看到女下屬的桌上擺放著全家福的照片 ,老板心想:「事業對她來說不會是最重要的,看來不用寄望她會全心全意為公打拼了



**When your subordinate table is very messy or untidy**
If your subordinate is a ‘He’, you feel “he is so hardworking, till do not have extra time to tidy up the table”
If your subordinate is a ‘She’, you feel “she is so untidy, sure not organized!”
看到男下屬雜亂的桌面,老板心想:「他真的是很努力,很用功看,連收拾桌面的時間都沒有。」
看到女下屬雜亂的桌面, 老板心想:「原來她這麼亂,組織能力一定不行!」


**When your subordinate is talking with other colleagues**
If your subordinate is a ‘He’, you feel “he must be discussing about the new project, so aggressive”
If your subordinate is a ‘She’, you feel “gossiping again!!! Gifted paparazzi!!”
看到男下屬在跟同事說話,老板心想:「他一定是在討論最近的project, 真是積極。」
看到女下屬在跟同事說話,老板心想:「哼!又在說人是非道長短,女人就是長舌,唉!天性、天性!」


**When your subordinate is working overtime**
If your subordinate is a ‘He’, you feel “it’s very difficult to hire such hardworking employee anymore”
If your subordinate is a ‘She’, you feel “ladies has limited capabilities, need to spend so much time on such little things”
看到男下屬加班, 老板心想:「現在已經很難請到這麼勤勞的員工了。」
看到女下屬加班, 老板心想:「女人就是能力有限,一點小事也要花這麼長的時間來做!」


**When your subordinate got promoted**
If your subordinate is a ‘He’, you feel “he must have great potential”
If your subordinate is a ‘She’, you feel “she must be having affairs with the boss”
看到男下屬很快地受到經理的賞識而升職, 老板心想:「這個人一定潛力十足。」
看到女下屬很快地受到經理的賞識而升職, 老板心想:「這個人一定是跟經理有一腿!」

**When your subordinate applies leave**
If your subordinate is a ‘He’, you feel “he hasn’t apply leave for a long time, should go for relax”
If your subordinate is a ‘She’, you feel “seems like she always apply leave, is she going for job interview”
看到男下屬請假, 老板心想:「好像很久沒看他請假,也應該去輕鬆一下了。」
看到女下屬請假, 老板心想:「好像整天看她請假,是不是去應徵別的工作?」


**When your subordinate is distributing wedding dinner invitation card**
If your subordinate is a ‘He’, you feel “he will have greater sense of responsibility after the marriage, should give him big wedding gift (ang pow)!!!”
If your subordinate is a ‘She’, you feel “she will pregnant soon, after that will have maternity leave, then will resign and taking care of children at home… great losses, thus, no need to give her big wedding gift (ang pow)”
看到男下屬發喜帖, 老板心想:「他從此就會更有責任感,給他個大紅包鼓勵一下吧!」
看到女下屬發喜帖, 老板心想:「她不久就會懷孕,就會經? `去檢查身體,很快就要請產假 ,然後就會辭職在家帶孩子。嘩!損失慘重,那紅包N不用包太大包了


“Sex discrimination!!!” ????

These are good ones!

ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy

OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime

SHOPPING MATH
A man will pay $20 for a $10 item he needs.
A woman will pay $10 for a $20 item that she doesn't need.

GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.

HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.

LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.

PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.

DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

HOW TO STOP PEOPLE FROM BUGGING YOU ABOUT GETTING MARRIED
Old aunts used to come up to me at weddings, poking me in the ribs and cackling, telling me, "You're next." They stopped after I started doing the same thing to them at funerals.

Saturday, June 28, 2008

Puzzle on Ruby - Part 2

Let's reviews back the previous last puzzle on "Puzzle on Ruby - Part 1":

Puzzle:

ABC + BDE = CEF

Condition #1: Every alphabet is represent a digit between 0 to 9.
Condition #2: Whenever a digit has been used, that digit cannot be used anymore for other alphabets.
Condition #3: 8 * ( ABC - BDE ) = CEF

Answer:
A = 5, B = 4, C = 9, D = 2, E = 7, F = 6 because

549 + 427 = 976 and
8 * (549 - 427) = 976

Hopefully, you also got the answer correctly.

~..~..~ The End ~..~..~

Okay! Let's improve puzzle on Part 1 to become as below:

Puzzle:

GHIJ + HABC + IBDE = JCEF

Condition #1: Every alphabet is represent a digit between 0 to 9.

Total is 175725 solutions available when only condition #1 is applied. (Pretty easy, right? You could find a lot of different solutions easily.)

Condition #2: Whenever a digit has been used, that digit cannot be used anymore for other alphabets.

Total is 80 solutions available when condition #1 and #2 are applied. (Oh Gosh! This is pretty hard. You may not even find one solution out through many many trials and errors)

How about giving one more condition to the puzzle? Will it be more harder to be solved?

Condition #3: GHIJ, HABC, IBDE, and JCEF are even numbers.

Total is 1 solution available. (And...it's pretty easy to solve.)

As you can see, the number of solutions is limited by the content of puzzle's conditions. And the more conditions applied to the puzzle, the less solutions the puzzle can have.

The level of a puzzle depends on the conditions as well. Level of a puzzle is proportional to the number of conditions applied to that puzzle. However, this statement is not always true. Like the puzzle above, when the third condition applied, the puzzle becomes simple and lost its challenging characteristic anymore.

Anyway, you may be curious and want to find the only one solution out. Good luck to you!


Thursday, June 26, 2008

Some Jokes

Here are some actual label instructions on consumer goods.(haha so funny!!!!!!)

On a Sears hairdryer: Do not use while sleeping. (and that's the only time I have to work on my hair).

On a bag of Fritos: You could be a winner! No purchase necessary. details inside. (the shoplifter special)?

On a bar of Dial soap: "Directions: Use like regular soap." (and that would be how?)

On some Swanson frozen dinners: "Serving suggestion: Defrost." (but, it's "just" a suggestion ).

On Tesco's Tiramisu dessert (printed on bottom): "Do not turn upside down." (well...duh, a bit late, huh)!

On Marks & Spencer Bread Pudding: "Product will be hot after heating." (...and you thought?)

On packaging for a Rowenta iron: "Do not iron clothes on body." (but wouldn't this save me more time?)

On Boot's Children Cough Medicine: "Do not drive a car or operate machinery after taking this medication." (We could do a reduce the rate of construction accidents if we could just get those 5-year-olds with head-colds off those forklifts.)

On Nytol Sleep Aid: "Warning: May cause drowsiness." (and...I'm taking this because?)

On most brands of Christmas lights: "For indoor or outdoor use only." (as opposed to...what?)

On a Japanese food processor: "Not to be used for the other use." (now, somebody out there, help me on this. I'm a bit curious.)

On Sunsbury's peanuts: "Warning: contains nuts." (talk about a news flash )

On an American Airlines packet of nuts: "Instructions: Open packet, eat nuts." (Step 3: maybe, uh...fly Delta?)

On a child's superman costume: "Wearing of this garment does not enable you to fly." (I don't blame the company. I blame the parents for this one)

On a Swedish chainsaw: "Do not attempt to stop chain with your hands or genitals." (...was there a lot of this happening somewhere?)

推呀!

讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚
讚讚讚讚讚一一讚讚讚讚一一讚一一讚讚讚讚讚
讚讚讚讚讚一讚讚讚讚讚一讚讚一讚讚讚讚讚讚
讚讚讚讚讚一讚讚讚讚一讚讚一讚讚一讚讚讚讚
讚讚讚一一一一一讚讚一一一一一一一一讚讚讚
讚讚讚讚讚一讚讚讚一一讚讚讚一讚讚讚讚讚讚
讚讚讚讚讚一讚讚一讚一讚讚讚一讚讚讚讚讚讚
讚讚讚讚讚一讚讚讚讚一一一一一一一讚讚讚讚
讚讚讚讚讚一讚一讚讚一讚讚讚一讚讚讚讚讚讚
讚讚讚讚讚一一讚讚讚一讚讚讚一讚讚讚讚讚讚
讚讚讚一一一讚讚讚讚一一一一一一一讚讚讚讚
讚讚讚一讚一讚讚讚讚一讚讚讚一讚讚讚讚讚讚
讚讚讚讚讚一讚讚讚讚一讚讚讚一讚讚讚讚讚讚
讚讚讚讚讚一讚讚讚讚一讚讚讚一讚一讚讚讚讚
讚讚讚一一一讚讚讚讚一一一一一一一一讚讚讚
讚讚讚讚一讚讚讚讚讚一讚讚讚讚讚讚讚讚讚讚
讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚讚

Wednesday, June 25, 2008

Puzzle on Ruby - Part 1

I like to play puzzles solving game, especially puzzles that related to numbers. In this post, I going to use Ruby to solve a puzzle. Here it is

ABC + BDE = CEF

Condition #1: Every alphabet is represent a digit between 0 to 9.

Based on the condition above, this puzzle can be came out a lot of solutions. Some of the solutions are

000 + 000 = 000 (haha...this is a solution too based on the condition #1)
123 + 202 = 325
639 + 348 = 987
...and so on

Okay! Let's get the Ruby rolling. I'm going to use a "brute-force" method to solve this puzzle, and find as much as possible available solutions. Here is the Ruby code

# abc loop
(0..999).each do abc
b = (abc % 100) / 10
c = abc % 10

# de loop
(0..99).each do de
bde = 100 * b + de
e = bde % 10

# f loop
(0..9).each do f
cef = 100 * c + 10 * e + f
if (abc + bde == cef)
print sprintf("%03d", abc) + " + "
print sprintf("%03d", bde) + " = "
puts sprintf("%03d", cef)
end
end
end
end


Even the solver is brute-force method, the Ruby program only tooks 5 seconds to finish. Wow! I'm so amazing. It's realy really fast.

Total is 500 solutions available!!! So, you might want to think that this puzzle was too EASY to you, and you probably can find out two or three dozen of solutions easily.

Okay! Let's make this puzzle more challenging by adding one more condition.

Condition #2: Whenever a digit has been used, that digit cannot be used anymore for other alphabets.

000 + 000 = 000 (this solution is no longer stands)
123 + 202 = 325 (this one too...)
639 + 348 = 987 (Oh...this one is perfect match for condition #2, so it's a solution!)

You may need some time to solve it. Total is 81 solutions available! GOOD LUCK!

--- Extra ---

Condition #3:
8 * ( ABC - BDE ) = CEF

ONLY a solution exists! Try it out. It's pretty easy I tell you. Send me a comment with this answer...

Tuesday, June 24, 2008

十九種不良生活習慣

1. 起床先疊被

人體本身─也是一個污染源。在一夜的睡眠中,人體的皮膚會排出大量的水蒸氣,使被子不同程度地受潮。人的呼吸和分布全身的毛孔所排出的化學物質有145 種,從汗液中蒸發的化學物質有 151種。被子吸收或吸附水分和氣體,如不讓其散發出去,起床就立即疊被,易使被子受潮及受化學物質污染。

2. 不吃早餐

不吃早餐的人則通常飲食無規律,容易感到疲倦,頭暈無力,天長日久就會造成營養不良、貧血、抵抗力降低 ,並會產生 胰、膽結石 。

3. 飯後鬆褲帶

飯後鬆褲帶可使腹腔內壓下降,消化器官的活動與韌帶的負荷量增加,從而促使腸子蠕動加劇,易發生腸扭轉,使人 腹脹、腹痛、嘔吐,還容易患胃下垂 等病。

4. 飯後即睡

飯後即睡會使大腦的血液流向胃部,由於血壓降低,大腦的供氧量也隨之減少,造成飯後極度疲倦,易引起心口灼熱及消化不良,還會發胖 。如果血液原已有供應不足的情況,飯後倒下便睡,這種靜止不動的狀態,極易招致中風 。

5. 飽食

飽食容易引起 記憶力下降,思維遲鈍 ,注意力不集中 ,應激能力減弱。經常飽食,尤其是 過飽的晚餐,因熱量攝入太多,會使體內脂肪過剩,血脂增高,導致腦動脈粥樣硬化。還會引起一種叫'纖維芽細胞生長因子'的物質在大腦中數以萬倍增長,這是一種促使動脈硬化的蛋白質。腦動脈硬化的結果會導致大腦缺氧和缺乏營養 ,影響腦細胞的新陳代謝。經常飽食,還會誘發膽結石、膽囊炎、糖尿病 等疾病,使人 未老先衰 ,壽命縮短。

6. 空腹吃糖

越來越多的証據表明,空腹吃糖的嗜好時間越長,對各種 蛋白質吸收的損傷程度越重。由於蛋白質是生命活動的基礎,因而長期的空腹吃糖,更會影響人體各種正常機能,使人體變得衰弱以致縮短壽命。

7. 吃太鹹的食物

鈉在人體內滯留,容易形成或加重高血壓和心臟病 。

8. 留鬍子

鬍子具有 吸附有害物質的性能。當人吸氣時,被吸附在鬍子上的有害物質就有可能被吸入呼吸道內。據對留有鬍子的人吸入的空氣成分進行定量分析,發現吸進的空氣中含有幾�抮埵陵`物質,其中包括 酚、甲苯、丙酮、異戊問二烯等多種致癌物,留有鬍子的人吸入的空氣污染指數,是普通空氣的 4.2 倍。如果下巴有鬍子,又留八字鬍其污染指數可高達 7.2 倍再加上 抽煙因素,污染指數將高達普通空氣的 50 倍。

9. 蹺二郎腿

蹺二郎腿會使腿部血流不暢,影響健康。如果是靜脈瘤、關節炎、神經痛、靜脈血栓患者,蹺腿會使病情更加嚴重。尤其是腿長的人或孕婦,很容易得靜脈血栓 。

10. 瞇眼看東西、揉擦眼睛

瞇眼看東西,眼角易出現魚尾狀皺紋 。習慣性瞇眼還可使眼肌疲勞、眼花頭疼。揉眼時,病菌會由手部傳染眼睛,導致發炎、睫毛折斷或脫落。

11. 強忍小便

強忍小便有可能造成 急性膀胱炎,出現尿頻、尿疼、小腹脹疼等症狀。美國科學家發布的一份研究報告指出,有憋尿習慣的人患膀胱癌的可能性比一般人高 5倍 。憋尿時,膀胱貯存的尿液不能及時排出,形成人為的尿瀦留。如經常憋尿,就會使括約肌和逼尿肌常常處於緊張狀態;如果憋尿時間過長,膀胱內尿量不斷增加,還會使內壓逐漸升高,時間長了就會發生膀胱頸受阻症狀,造成 排尿困難、不暢,或漏尿、尿失禁 等毛病。在尿瀦留時還易引起並發感染和結石,嚴重時還影響腎功能 。

12. 伏案午睡

一般人在伏案午睡後會出現暫時性的視力模糊,原因就是眼球受到壓迫,引起角膜變形、弧度改變造成的。倘若每天都壓迫眼球,會造成 眼壓過高,長此下去視力就會受到損害 。

13. 俯睡 (趴著睡 )

俯睡使脊柱彎曲 ,增加肌肉及韌帶的壓力,使人在睡覺時仍然得不到休息。此外,還會增加胸部、心臟、肺部及面部的壓力,導致睡醒後 面部浮腫,眼睛出現血絲。

14. 睡前不洗臉

留在臉上的化妝品不洗掉,會引起粉刺和針眼 之類的炎症,還能使眼睛發炎,引起 皮膚過敏反應。

15. 睡前不刷牙

睡前刷牙比起床後刷牙更重要 ,這是因為遺留在口腔中和牙齒上的細菌、殘留物在夜裡對牙齒、牙齡有較強的腐蝕作用。

16. 睡懶覺

睡懶覺使大腦皮層抑制時間過長,天長日久,可引起一定程度人為的大腦功能障礙 ,導致 理解力和記憶力減退,還會使免疫功能下降 ,擾亂肌體的生物節律,使人懶散,產生惰性,同時對肌肉、關節和泌尿系統也不利。另外,血液循環不暢,全身的營養輸送不及時,還會影響新陳代謝。由於夜間關閉門窗睡覺,早晨室內空氣混濁,戀床很容易造成 感冒、咳嗽等呼吸系統疾病的發生。

17. 熱水淋浴時間過長

在自來水中, 氯仿和三氯化烯是水中容易揮發的有害物質,由於在沐浴時水滴有更多的機會和空氣接觸,從而使這兩種有害物質釋放很多。據收集到的數據顯示,若用熱水盆浴,只有 25 %的氯仿和40%的三氯化烯釋放到空氣中;而用熱水淋浴,釋放到空氣中的氯仿就要達到50% ,三氯化烯高達 80 %。

18. 賭博

賭博之所以有害於一個人的身心健康,是因為賭博本身是一種強烈刺激,長期進行賭博,可使中樞神經系統長期處於高度緊張狀態,容易引起激素分泌增加,血管收縮,血壓升高,心跳和呼吸加快等,會增加心血管疾病的發病率,還會患消化性潰瘍和緊張性頭疼。

19. 生活過度緊張

從事腦力勞動和做生意的一些中青年人,他們的生命機器在整日超負荷運轉,由於他們在心理上的競爭欲強,在生理和心理方面皆承受著巨大的壓力。過度的腦力和體力勞動後,隨之而來的是抗疲勞和防病能力的減弱,進而可能引發多種疾病。


關心自己也關心別人喔!

Monday, June 23, 2008

Tarzan Papa (泰山爸爸)


Comics:
Blog:

Why Do We Do That?

This is an experiment I heard about quite a long time ago, but I would like to share it with you all.

Start with a cage containing five monkeys. Inside the cage, hang a banana on a string and place a set of stairs under it. Before long, a monkey will go to the stairs and start to climb towards the banana. As soon as he touches the stairs, all of the other monkeys are sprayed with cold water. After a while, another monkey makes an attempt with the same result, and all the other monkeys are sprayed with cold water. Pretty soon the monkeys will try to prevent it.

Now, put away the cold water. Remove one monkey from the cage and replace it with a new one. The new monkey sees the banana and wants to climb the stairs. To his surprise and horror, all the other monkeys attack him. After another attempt and attack, he knows that if he tries to climb the stairs he will be attacked.

Next, remove another of the original five monkeys and replace it with a new one. The newcomer goes to the stairs and is attacked. The previous newcomer takes part in the punishment with enthusiasm! Likewise, replace a third original monkey with a new one, then a fourth, then the fifth.

Every time the newest monkey takes to the stairs, he is attacked. Most of the monkeys that are beating him have no idea why they were not permitted to climb the stairs or why they are participating in the beating of the newest monkey. After replacing all the original monkeys, none of the remaining monkeys have ever been sprayed with cold water. Nevertheless, no monkey ever again approaches the stairs to try for the banana.

Why not? Because as far as they know, that’s the way it’s always been done around there. Do you do something because that's what you are asked to do without asking why you are doing it?

Do you do something because that's the way you have seen it being done by others? ARE YOU A MONKEY ENGINEER?

Some of you may laugh at this but there's a much deeper philosophical meaning to the above experiment (which I heard is a real experiment done in the past century). I hope you understand the meaning and change the way we do things...

Sunday, June 22, 2008

想做的事就去做!

「不要人在天堂,錢在銀行」∼要及時行樂 喔!共勉之!

很多人都有一大堆計劃留到退休後去做,但到了那時候,現在想來快樂的事,屆時已不快樂了。想做就馬上去做,儘管不景氣,這仍是大前研一的諍言

我說「人生不妨繞路走」,讀者或許不知道什麼是繞路。我就試著從我接觸過的多位經營者的(痛苦)小巧引出我的看法吧!

過去30年間,我至少和一千位經營者共事過。正確的數字我沒算過,但是一年30個人,30年下來應該有這個數目吧。我所謂的經營者,都是社長(總經理)、會長(董事長)等事業成功的企業人士,也都是孜孜矻矻忙著賺錢的人。

這些日本企業領袖多半愛談退休後的生活。有人說想每天打高爾夫球悠悠哉哉的日子,有人想回到面臨瀨戶內海的美麗故鄉天天釣魚,有人想和老妻帶著珍愛的相機環遊世界,有人只希望含飴弄孫、忘掉工作,還有人夢想參加非營利組織(NPO)到東南亞當技術指導,有人甚至想在郊外蓋間房子晴耕雨讀,或是長住澳洲。

他們年老後的夢想五花八門,可謂百人百樣,但只有一點我非常確定:他們之中沒有一個人完成夢想。為什麼呢?

首先,他們熬不到圓滿退休,最近半途失意退職、悄悄過日子的案例尤其多。其中多半是公司裡發生了意想不到的狀況,恰巧位在高層的他們,只好引咎辭職。另一個原因是位居高層的時間太久、積勞過度而猝逝。

同樣地,歷任會長、董事會顧問、顧問、最高顧問、監察人等職位,一過了80歲,便被送進老人院的情形也很多。他們在60歲上下時侃侃而談退休後的希望和夢想,但是一過了70歲,卻突然開始想做「終身經營者」,怎麼也不肯退休。那些能幸運退休的情況又如何呢?好像也有問題。沒有人每天釣魚、打高爾夫球。每天做這些事其實很痛苦。打高爾夫球、釣魚和旅行之所以快樂,是因為這些事情並非日常之事。

每天打高爾夫球得找到球伴,每天和同一個對手打也無趣,況且往往很快就累了。人上了年紀,打球的分數增減也很有限。只有當場地和對手都不同時,才會覺得有趣。每天要做到這樣,似乎很難。我在美國佛羅里達常看到退休老人打高爾夫球,他們幾乎是為了健康而打、為了防止老人痴呆而打,讓人感覺不到退休前所期待的「樂趣」。

釣魚則更慘。釣到的魚得有人高興吃掉。老夫妻沒那份食慾;老伴每天表現出最大限度的歡喜,其實都是裝出的。釣魚必須有人樂享成果。如果還是社長任內,因為是偶一為之,擅長逢迎的職員會起鬨作樂,爭相討魚。孫子也會討好說:「爺爺好厲害哦!」如果住在市區,分送鄰居也皆大歡喜。但是在瀨戶內海的村釣魚,和漁夫沒有什麼不同。在只有老人的村子裡每天釣魚,一點也不快樂。本來還有這種夢想的經營者,現在都已打消念頭。

童年時釣魚是很快樂,當社長時偶爾去釣魚也很快樂。可是真正退休後天天釣魚,就不是這麼回事了。

那位想環遊世界拍攝照片的人還是繼續旅行,只是不再拍照了。他當副社長時去過南美洲的伊瓜蘇瀑布,拍了一些幻燈片回來,當時是很稀奇,他以「副社長的南美報告」為題,宴請屬下,同時展示攝影成果。席間讚語不絕:「照相技術真是一流啊!」「哇!我也想去一次看看。」真個是賓主盡歡。他退休後又去尼羅河上游,拍回一些珍貴的照片,但是這回屬下就不捧場了。不是推說有事在忙,就是告罪下週有預算會議或要出差,理由儘管不一樣,總之就是沒人來看。就連孫子若不利誘也不肯來。結果落得只有和看過實景的老妻一起整理相簿的下場。從此他出門時不再带沉重的手動照相機,換成用過即丟的即可拍相機了。看來,即使完全實現年老後的夢想,也沒有當初所想的那般快樂。

我的結論只有一句,這輩子都不要說:「我以後要怎樣怎樣……」。

我的建議是,如果有「以後」想做的事,現在,沒錯,就請現在去做!想做的時候正當其時。

現在覺得快樂的事,上了年紀以後,不一定覺得快樂。更積極地說,現在就做覺得快樂的事,才能學會年老也覺得快樂的方法,退休後就能成為真正的玩家, 快樂地生活。

想做的事就去做!

∼ 摘自:文╱大前研一

Friday, June 20, 2008

精警愛情絕句!

什麼叫浪漫?明知那個女孩兒不愛他,還送給她999朵玫瑰;
什麼叫浪費?明知那個女孩兒很愛他,還送給她999朵玫瑰。
--------------------某青年作家定義浪漫與浪費

每個女人都有兩個版本:精裝本和平裝本。
精裝本是給別人看的,平裝本是給家人和丈夫看的。
婚姻中的丈夫只看到妻子的平裝本和其她女人的精裝本。
這就是婚外戀情的動機。
--------------------男士對婚外戀情的動機作如是分析,實在是妙喻

結婚是愛情的墳墓,但是如果不結婚,愛情就死無葬身之地。
--------------------清大 BBS 上一句」經典愛情宣言」

男人從不擔心他的未來,直到他找到一個妻子;
女人常常擔心她的未來,直到她找到一個丈夫。
--------------------青年女作家南鶯看男女關係

吃胃能消化的食物,娶自己能養活的女人。
--------------------男人長壽的秘訣

男人掏錢是情人關係;
女人掏錢是夫妻關係;
男女搶著掏錢是朋友關係。
--------------------餐廳服務員經驗實錄

婚姻不是1+1=2,而是0.5+0.5=1。
即:兩個人各削去自己的個性和缺點,然後湊合在一起。
--------------------青年作家張弘的婚姻公式

Thursday, June 12, 2008

Ruby

Ruby is
.... script language.
.... genuine object-oriented.
.... so simple and easy to learn.
.... designed to make programmers happy.

Learning a programming language usually from pick up a book and read it throughly. Amazon website is a good place to find book that you need. Type 'Ruby' keyword on the search will came out all relevant results for you, simple and quick. Besides that, you also can refer to users' reviews on each book in order to pick up a book suit to your taste. For me as a beginner, my favorite books are


  • The Ruby Programming Language, by David Flanagan and Yukihiro Matsumoto - This book is GREAT. This book is covered every single detail about Ruby's grammar and syntax. By the way, Yukihiro Matsumoto (a.k.a Matz) is the creator of Ruby. Thanks to him for come out this powerful and easy to use script language.
  • Programming Ruby: The Pragmatic Programmer's Guide, by Dave Thomas, Char Fowler, and Andy Hunt - I like this book because it covered some information that the previous book didn't. And it also contains the standard libraries section which I refer it most of the time.
  • The Ruby Way: Solutions and Techniques in Ruby Programming, by Hal Fulton - As the book's title described, this book contains information about applications of Ruby language on different fields with at least one solution you can pick up. This book quite useful to me whenever I hit a "dead-end".
  • Best of Ruby Quiz (Pragmatic Programmers), by James Gray - This book is my favorite. It contains 25 different quizes. Each one with more than one solution which given by challengers around the world. You also can refer on this website http://rubyquiz.com/ for more quizes. By the time I wrote this post, the website already contains 156 quizes!

Enough for the Ruby's books recommendations. Now, I am going to write a Ruby script to perform a trivial task. The task is to retrieve Ruby's book cover images from Amazon website and save them into computer.

...OMG! How am I going to attach the code inside the blog...

This script will go through the Amazon website's search results on keyword "Ruby" on Computer and Internet section page by page, then downloads every book cover's image with title contains words "Ruby" or "Rails" into a folder named "ruby_books_cover".

Here is the list of Ruby books:

Ruby in Rails Books (55/95):

  1. Advanced Rails
  2. Advanced Rails Recipes: 84 New Ways to Build Stunning Rails Apps (Pragmatic Programmers)
  3. Agile Testing with Ruby and Rails
  4. Agile Web Development with Rails, 2nd Edition
  5. Ajax on Rails
  6. Beginning Google Maps Applications with Rails and Ajax: From Novice to Professional
  7. Beginning Rails: From Novice to Professional (Beginning from Novice to Professional)
  8. Beginning Ruby on Rails (Wrox Beginning Guides)
  9. Beginning Ruby on Rails E-Commerce: From Novice to Professional (Rails)
  10. Beyond Rails with Capistrano: Managing Production Systems with Ruby, Python, Perl and More
  11. Build Your Own Ruby on Rails Web Applications
  12. Building Dynamic Web 2.0 Websites with Ruby on Rails
  13. Deploying Rails Applications: A Step-by-Step Guide (Facets of Ruby)
  14. Developing Facebook Platform Applications with Rails
  15. Enterprise Rails
  16. Flexible Rails: Flex 3 on Rails 2
  17. Foundations of RSpec: Behavior-driven Development with Ruby and Rails (Foundations)
  18. Hacking with Ruby: Ruby and Rails for the Real World
  19. Head First Rails: A learner's companion to Ruby on Rails
  20. Learning Rails (Learning)
  21. Practical JRuby on Rails Web 2.0 Projects: Bringing Ruby on Rails to Java (Expert's Voice in Java)
  22. Practical REST on Rails 2 Projects (Practical Projects)
  23. Practical Rails Projects (Expert's Voice)
  24. Practical Rails Social Networking Sites (Expert's Voice)
  25. Practical Reporting with Ruby and Rails (Expert's Voice in Open Source)
  26. Pro Active Record: Databases with Ruby and Rails (Pro)
  27. Professional Ruby Collection: Mongrel, Rails Plugins, Rails Routing, Refactoring to REST, and Rubyisms CD1 (Addison-Wesley Professional Ruby Series)
  28. Professional Ruby on Rails (Programmer to Programmer)
  29. Rails Cookbook (Cookbooks (O'Reilly))
  30. Rails Pocket Reference
  31. Rails Recipes (Pragmatic Programmers)
  32. Rails Solutions: Ruby on Rails Made Easy (Solutions)
  33. Rails for Java Developers
  34. Rails for PHP Developers (Pragmatic Programmers)
  35. Rails in a Nutshell
  36. Rails: Up and Running
  37. RailsSpace
  38. RailsSpace Ruby on Rails Tutorial (Video Training) (LiveLessons)
  39. RailsSpace: Building a Social Networking Website with Ruby on Rails (Addison-Wesley Professional Ruby Series)
  40. Ruby On Rails Bible
  41. Ruby for Rails: Ruby Techniques for Rails Developers
  42. Ruby on Rails
  43. Ruby on Rails Beyond the Basics
  44. Ruby on Rails Enterprise Application Development: Plan, Program, Extend
  45. Ruby on Rails For Dummies (For Dummies (Computer/Tech))
  46. Ruby on Rails Power!: The Comprehensive Guide (Power!)
  47. Ruby on Rails Web Development
  48. Ruby on Rails Web Mashup Projects
  49. Ruby on Rails for Microsoft Developers
  50. Ruby on Rails for PHP and Java Developers
  51. Ruby on Rails: Up and Running
  52. Rubyisms in Rails, Digital Shortcut
  53. Simply Rails 2
  54. The Art of Rails (Programmer to Programmer)
  55. The Rails Way (Addison-Wesley Professional Ruby Series)

Ruby Books (40/95):

  1. Beginning Ruby: From Novice to Professional (Beginning from Novice to Professional)
  2. Best of Ruby Quiz (Pragmatic Programmers)
  3. Design Patterns in Ruby (Addison-Wesley Professional Ruby Series)
  4. Enterprise Integration with Ruby
  5. Everyday Scripting with Ruby: For Teams, Testers, and You
  6. FXRuby: Create Lean and Mean GUIs with Ruby (Pragmatic Programmers)
  7. From Java to Ruby: Things Every Manager Should Know (Pragmatic Programmers)
  8. Game Programming with Python, Lua, and Ruby (Game Development)
  9. JRuby Cookbook
  10. Learning Ruby (Learning)
  11. Making Use of Ruby
  12. Mongrel: Developing, Extending and Deploying Your Ruby Applications (Addison-Wesley Professional Ruby Series)
  13. Mongrel: Serving, Deploying and Extending Your Ruby Applications, Digital Shortcut
  14. Objektorientierte Programmiersprachen: Einführung und Vergleich von Java - C++ - C# - Ruby
  15. Practical Ruby Gems
  16. Practical Ruby Projects: Ideas for the Eclectic Programmer (Books for Professionals by Professionals)
  17. Practical Ruby for System Administration (Expert's Voice in Open Source)
  18. Pro Ruby (Pro)
  19. Programming Ruby: A Pragmatic Programmer's Guide
  20. Programming Ruby: The Pragmatic Programmers' Guide, Second Edition
  21. Programming With Ruby VTC Training CD
  22. Raven: Scripting Java Builds with Ruby
  23. Regular Expression Pocket Reference: Regular Expressions for Perl, Ruby, PHP, Python, C, Java and .NET (Pocket Reference (O'Reilly))
  24. Ruby Cookbook (Cookbooks (O'Reilly))
  25. Ruby Developer's Guide
  26. Ruby In A Nutshell
  27. Ruby Phrasebook (Developer's Library)
  28. Ruby Pocket Reference (Pocket Reference (O'Reilly))
  29. Ruby Programming for Medicine and Biology (Jones and Bartlett Series in Biomedical Informatics)
  30. Ruby Programming for the Absolute Beginner (For the Absolute Beginner)
  31. Ruby by Example: Concepts and Code
  32. Ruby in Practice
  33. Ruby: The Programming Language
  34. Ruby: Visual QuickStart Guide
  35. Sams Teach Yourself Ruby in 21 Days (Sams Teach Yourself)
  36. The Ruby Programming Language
  37. The Ruby Way (Addison-Wesley Professional Ruby Series)
  38. The Ruby Way, Second Edition: Solutions and Techniques in Ruby Programming (2nd Edition) (Addison-Wesley Professional Ruby Series)
  39. The Well-Grounded Rubyist
  40. Wicked Cool Ruby Scripts: Useful Scripts that Solve Difficult Problems

Ruby is more valuable than a ruby. Ruby is priceless, and price-less too!

Friday, June 6, 2008

簡單最動人

第一句沒有一百分的另一半 只有五十分的兩個人

第二句付出真心 才會得到真心 卻也可能傷得徹底保持距離 就能保護自己 卻也註定永遠寂寞

第三句通常願意留下來跟你爭吵的人 才是真正愛你的人

第四句有時候 不是對方不在乎你 而是你把對方看得太重

第五句冷漠 有時候並不是無情 只是一種避免被傷害的工具

第六句如果我們之間有1000步的距離 你只要跨出第1步我就會朝你的方向走其餘的999步

第七句為你的難過而快樂的 是敵人為你的快樂而快樂的 是朋友為你的難過而難過的 就是那些 該放進心裡的人

第八句就算是believe 中間也藏了一個lie

第九句真正的好朋友 並不是在一起就有聊不完的話題而是在一起 就算不說話 也不會感到尷尬

第十句朋友就是被你看透了 還能喜歡你的人