Daily Archives: 2012-11-25

Quotes about programming languages

—————————————————————————————————

Quotes about programming languages

2012-xx-xx
Scriptol.com

What computer scientists, authors and programmers think of popular programming languages.All languages

Tony Hoare quote about programming languages

“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”

Tony (C.A.R.) Hoare.

Computing professor, implemented Algol 60, searcher at Microsoft Research.

Algol 60 (Then taken in C)

“I couldn’t resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.”

Tony (C.A.R.) Hoare.

Basic

“It is practically impossible to teach good programming style to students that [sic] have had prior exposure to BASIC; as potential programmers they are mentally mutilated beyond hope of regeneration.”

E. W. Dijkstra in “The Threats to Computing Science” .

Edsger Wybe Dijkstra contributed to the first Algol 60 compiler. Known for the Disjkstra algorithm and numerous contributions to computer science.

C

“A C program is like a fast dance on a newly waxed dance floor by people carrying razors.”

Waldi Ravens. Programmer.

“In My Egotistical Opinion, most people’s C programs should be indented six feet downward and covered with dirt.”

Blair P. Houghton. Programmer.

“Going from programming in Pascal to programming in C, is like learning to write in Morse code.”

J.P. Candusso. Programmer.

“One of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.”

Robert Firth. Author of programming books.

“Writing in C or C++ is like running a chain saw with all the safety guards removed.”

Bob Gray. Author.

“It’s 5.50 a.m…. Do you know where your stack pointer is?”

Anonymous.

C++

“C makes it easy to shoot yourself in the foot.
In C++ it’s harder, but when you do, you blow off your whole leg.”

Bjarne Stroustrup. Creator of C++.

“The evolution of languages: FORTRAN is a non-typed language. C is a weakly typed language. Ada is a strongly typed language. C++ is a strongly hyped language.”

Ron Sercely. Programmer.

“I invented the term ‘Object-Oriented’, and I can tell you I did not have C++ in mind.”

Alan Kay. Creator of Smalltalk.

“The latest new features in C++ are designed to fix the previously new features in C++.”

David Jameson. Author.

“Fifty years of programming language research, and we end up with C++ ?”

Richard A. O’Keefe. Computer scientist.

“Ever spend a little time reading comp.lang.c++ ? That’s really the best place to learn about the number of C++ users looking for a better language.”

R. William Beckwith.

“C++ has its place in the history of programming languages. Just as Caligula has his place in the history of the Roman Empire.”

Robert Firth.

“Java is C++ without the guns, knives, and clubs.”

James Gosling, co-inventor of Java.

“C++ is an horrible language. Even if
the choice of C were to do *nothing* but keep the C++ programmers out,
that in itself would be a huge reason to use C.”

Linus Torvalds, inventor of Linux.

COBOL

“The use of COBOL cripples the mind; its teaching should therefore be regarded as a criminal offense.”

E.W. Dijkstra.

Fortran

“FORTRAN is not a flower but a weed — it is hardy, occasionally blooms, and grows in every computer.”

Alan J. Perlis. Computer scientist and professor (Yale).

“FORTRAN, the infantile disorder, by now nearly 20 years old, is hopelessly inadequate for whatever computer application you have in mind today: it is now too clumsy, too risky, and too expensive to use.”

E. W. Dijkstra.

“FORTRAN was the language of choice for the same reason that three-legged races are popular.”

Ken Thompson. Co-creator of B, Unix, Plan 9 and the Go programming language.

Java

“If Java had true garbage collection, most programs would delete themselves upon execution.”

Robert Sewell. Programmer.

Lisp

“Lisp isn’t a language, it’s a building material.”

Alan Kay.

Perl

“Perl is the only language that looks the same before and after RSA encryption.”

Keith Bostic. Programmer, created Sleepycat, contributed to free BSD unices.

PHP

“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil, perpetrated by skilled but perverted professionals.”

Jon Ribbens. Programmer.

Bash and other shells

“It is easier to port a shell than a shell script.”

Larry Wall. Creator of Perl.

And finally…

“There are only two kinds of programming languages: those people always bitch about and those nobody uses.”

Bjarne Stroustrup.

Unfortunately, I believe he is right. However, there have always been two schools, one for clear and safe languages (Pascal, and then scripting languages) and the other for languages facilitating hacking but with random results.

How to Avoid an Affair

多么有用的一篇文章!哈、哈、哈。

Never talk personal things with the opposite sex.

—————————————————————————————————

How to Avoid an Affair: Admit That You Could, Conceivably, Have an Affair

Nov 13 2012, 8:52 AM ET The Atalantic

Almost anyone is capable of cheating, given the right circumstances. The trick is to avoid compromising situations in the first place.

Fort Cambell General Returns

Christopher Berkey/AP Images

A beautiful young woman comes to visit a middle-aged general while he’s living in a war zone, far from his family. They go on long runs where she asks him probing, admiring questions. The general doesn’t start out intending to have an affair: He simply sees this woman as a confidante, an ally, possibly someone to mentor. But their relationship does blossom into an affair, with devastating consequences for both the woman and the general, both professionally and personally.

Some have asked how a man as disciplined as General David Petraeus let himself cheat on his wife with his biographer. But when you look at the circumstances—the dangerous location, the distance from his family, the deep emotional bond that developed between the two of them—the question is really, How could he have avoided having an affair?

“A lot of people think, ‘You just make up your mind. You’re not the kind of person who has an affair,'” said Gretchen Rubin, creator of The Happiness Project. But that’s not true—hardly anyone goes into marriage expecting they’re going to have an affair, yet more than a quarter of men and 15 percent of women admit to cheating at some point in their marriages.

A few years ago, Rubin posted a thought-provoking list of rules to follow to avoid having an office affair:

1. Never take a first step in flirtation, even in jest.

2. Never have more than one drink with people from work. If that.

3. Never confide details from your personal life to people from work, and don’t allow them to confide in you.

4. Never allow yourself to have a “special friend” of the opposite sex (sometimes called a “work spouse”) to whom you turn for particular support.

5. Unless it’s an unmistakably professional context, don’t meet alone with a colleague or client of the opposite sex. E.g, when a client calls with tickets for the U.S. Open, don’t go in a twosome.

She’s since added two more rules to the list: If you do end up with a platonic “work spouse,” make an effort to get to know their family: “that changes things,” Rubin says. And if you do find yourself alone with a colleague or client of the opposite sex, ask yourself what your spouse would think if he or she were to walk into the situation. She explains says: “If you imagined your spouse or your partner reading an email or walking into a room, suddenly, would you feel like there’s something to be embarrassed about?

What all these rules have in common is that they acknowledge that most people, given the right combination of circumstances, could be strongly tempted to have an affair. The secret is to prevent yourself from getting into a situation where it would be easy to cheat on your spouse.

“People aren’t really good at resisting temptation,” Rubin said. “It’s easier to have a rule that you just follow, so you’re not constantly having to weigh circumstances.”

学习要从专家是对入手

高人当然会错,但机会不大。—————————————————————————————————

张五常:學習要從專家是對入手

2012-06-02 01:22:50
新月

写给妈妈

真知灼见。

————————————————————————

写给妈妈

Aug.28   Jay

妈,

这封信有可能会拯救你,也有可能激起你更大的反抗。无论如何,我都有必要把真相都告诉你,能否领悟到真相,从此获得拯救,就看你自己了。作为儿子,我能做的就这样么多了。有些事情,即使是亲生母亲的健康与幸福,我也只能旁观看缘分。勉强不得。

我知道,从你小时候开始就过得很辛苦。7岁父亲去世,然后母亲又因为重男轻女,把家里好的资源都给了几个舅舅,让你缀学,务农。你从小受欺负,受轻视,所以你变得很要强,你要超过别人,以此来获得从小就失去的安全感。

因为要强,你变得不会开玩笑,不懂幽默,甚至觉察不到幽默,因为你时时刻刻都在战斗,每一个幽默你都要自己分析敌我情形。所以别人稍微跟你开个玩笑,你就当真,认为别人怎么欺负你。于是别人都不怎么想跟你说笑,因为一不小心就会触犯你的自尊。所以你不会交际,交不到朋友。即使连最亲近的人都被你折磨。想想你的妹妹,我的阿姨。你太容易被得罪,就比如上次你来杭州,我做得好好的,然后你一个人在客厅就莫名其妙的哭起来,好像有多大委屈。你觉得自己非常重要,别人哪怕稍微一丁点的闪失,都是对自己的看轻,都是敌人,都要绝交。

因为要强,你永远不会有满足感,以为一旦让自己满足就等于让自己停滞不前,也就陷入了被别人超过的危机,你也就不会获得安宁,所以只有不满足,不敢满足你才能有安全感。你跟我爸结婚,我爸本来也不算非常差的男人,你自己也说过,早年他还是一个很努力奋斗的青年,结果,到了你手上,你在他受挫是不懂得安慰,反而严厉对待;你在他获得成就时不懂得鼓励,反而认为理所应当;你在他累的时候不懂得温柔,撒娇,你甚至觉得撒娇会让自己看上去不够强大。到最后导致他厌倦你,逃避你,孤立你。你的这种人生态度,连知心朋友都找不到,当然也很难跟一个男人建立一生的伴侣关系。无论是哪个男人,成功的有钱的男人会直接跟你离婚,没钱没势的,只好忍着你。
如果你不承认,那么请你自己问问自己,跟我爸结婚这么多年来,你有没有跟他说过一句:老公你辛苦了!有没有跟他说过一句:老公你好棒!有没有给他捶过一次背?有没有撒过一次娇?仅仅一次?

因为要强,你把所有人都当成竞争者,好像全世界都在跟你比赛,好像全世界都喜欢看你闹笑话,看你失败。其实不然,大家既不想看你失败,也没有想看你成功,大家都很忙碌,有自己的生活要过,没空也没心情来关注你。这个世界成功的人太多,即使大家要嫉妒,也轮不到来嫉妒你,这个世界失败的人更多,即使大家要看笑话,也懒得来看你,你在别人眼里,只是一个平平常常,普普通通的人而已。但是你自己不这么想,你把自己看得太重,你这种处处跟人竞争的态度,最后都导致别人远离你而去。你自己想想,从小到大,有多少个本来想跟你成为朋友的人,一旦跟你走近,最后都变成你的了敌人,这些人两只手是否数的过来?其实敌人也只是你自己的单方面想法,在别人看来,他们只是不想理你了,因为你这个人太锋利,太刺人,他们不想生活的这么辛苦,避开你,仅此而已。

你没有能够获得朋友,也没有能够获得家庭幸福,你的老公被你逼得一生不幸,你的儿子,无论在哪个家庭都值得骄傲的儿子,从小到大,成绩年级段前三,从小学会干家务活,7岁帮你喂猪,晒谷子,能做一桌饭菜,长大后正直善良,有抱负,毕业两年就年薪10万的儿子,最终因为创业暂时没有新的收入,被你看轻,认为毫无建树,到最后你还用你的悲剧的性格影响我,导致我连续几天心情不好,没法正常工作。你根本不知道,所有成功的人,所有有巨大财富的人,他真正成功的真正的财富是他的抱负,以及为此默默付出的努力。你看到了表面,却没看到本质。

你一切都以钱来衡量。你说,没有钱人生不可能幸福。其实不是这样,没有钱,只要不是穷的饿死,人生是可以幸福的,古往今来多少人粗茶淡饭,活得开开心心,有儿孙绕膝,有老伴相拥,能赏日落,能赏花香。你所真正害怕的不是没有钱,你真正的原因是不敢去相信没有钱也能幸福。因为那样就等于给自己变成穷人的机会,你认为一旦变成穷人,就彻底的失去了重新获得安全感的可能性,也就是彻底的失败,你所认为的失败。所以你只有不断的给自己压力,把钱看的比一切还要重要,只有这样,你才能觉得自己在往正确的方向前进,总有一天超过别人,继而获得童年时失去的安全感。

你现在已经到了人生低谷,而且是只有你一个人孤身奋战的低谷。一个人到达人生低谷时,要么一句不振,坠落深渊;要么,大彻大悟,痛改前非,重新做人。这种状态不会持续很长时间,我是亲眼看着你健康一步一步下滑,如果按照现在这样下去,不出两三几年,你就会死,到时候可能你连孙子孙女都没机会看一眼。

但是你如果大彻大悟,认识到自己的性格的问题。那种跟全世界竞争的性格,那种永不满足的性格,那种极其缺乏安全感,极其脆弱敏感的性格,其实是不健康的性格,其实是造成你现在所有悲剧的根源。如果你能够认识到这种性格的成因,并且克服它。那么你会重新慢慢获得幸福,能够重新让这个家庭起死回生,其乐融融,大家都能笑开颜,你的很多健康问题都会自动痊愈,根本不需要治疗。你也能重新交到朋友。我爸爸也会重新对家庭有所依恋,也不会每天晚上出去打牌避开。所有的幸福都会重新慢慢汇聚,你也能重新享受老年生活。不用担心物质,因为现在家里的经济状况,已经完全足够你们两个人安度晚年,而我的生活也是完全不需要你们来担心,你们也担不起这个心。我会自己去奋斗。

要走出低谷,第一步,也是最难的,就是承认自己的失败。承认自己的脆弱,承认自己其实只是缺乏安全感,其实是很善良的人。真的,人只有承认自己的脆弱,才能变得真正的坚强。越是敢越说自己笨,说自己丑,说自己穷,说自己没什么的人,越是强大。而越是什么都要争,一点都不能得罪,处处跟人争斗的人,越是弱小。

如果你能够承认自己的脆弱与失败。那么接下来自然而然就会敞开心扉重新做人,你要跟我爸道歉,你要让自己敢于受伤,敢于让人冷落自己,敢于接受别人比自己强,也愿意同情比自己弱的人。

你能否自我拯救,最终还是看你自己。作为儿子,我有自己的独立人生,我有我的奋斗目标,我有我自己以后独立的家庭,我不可能把自己完全卷入到你的悲剧中,因为那样只会摧毁我的人生,影响我的家庭,我的孩子。我能够一清二楚的看清你的悲剧,也一清二楚的看清楚救命稻草在哪里,但是我不能替你抓住,最终还是要看你自己,我只能祝你安康!

儿子,上!

凄凉的时光,日日都有

抱怨惹人烦。
————————————————————————————

凄凉的时光,日日都有

image_thumb

昨天上班,一出地铁口,就有大喇叭吆喝号召签名,促内地彻查李旺阳死因。
看过那段新闻的人,看过那张遗照的人,必然印象深刻,到现在,我想到那张窗边的遗照,想到李掷地有声百折不回的声音,仍然心灵震颤,有一日光复了,这些人才应该写入教科书,建立纪念馆,这些人才是真正的民族英雄,人类中的英雄。

如果我仍在中环上班,一定回去参加遮打花园的悼念仪式,现在我工作繁忙,回去要照顾妻女,唯一能做的,就是就近签名联署,签上真名。
Cynical的人处处有,HK更加多,我们看到万计的人参加了祭奠仪式,万计的人大热天的举着遗照出来游行,然而,有百万计的人是这么想的:
不要和我谈政治,我现在过的挺好,上班辛勤工作,下班照顾妻儿老小,我只求一个平稳的生活,做人最紧要开心,你别拿这些政治事件来搞我啦~~那是内地的事,我是HK人,我在HK。我不关心政治,我只想多赚点钱,只想国家繁荣稳定,起码HK繁荣稳定,我的楼不要跌价。。。。。
恐怕这才是HK的主流。
一个人拿出这样的理由来解释自己的行为,还有什么好说?
重庆大唱红歌时,全国人民都笑了,觉得和自己无关,连岳说:重庆人和你我一样,并不傻,别以为自己比重庆人聪明。
这句话适用于所有人。
现在做这些事,不是所谓“搞政治”,而是人类良知。最基本的良知,如果连这个也没有,除了直立行走,基本上已经不再具备人类特征。
周末游行上,一个父亲抱着大概只有三四岁的小女儿接受记者采访时说,我带她来参加,是教给她最基本的是非黑白。
是的,不过是最基本的是非黑白,不是什么统战、维稳、革命,不是什么“搞政治”,只不过走出来告诉其它同类:我还是一个人。
HK人一定要教育好自己的子女,长大别听党的话。

HK有个荒唐的政党,叫做民主党,DAB是一群擦鞋舔P毫无政治操守可言的保皇党,民主党则是一群除了清高什么也没有的孱头。
昨天民主党一个中常委的老党员冯伟光参加政府副局长招聘的面试,然后一帮党友,包括党主席走出来说他加入政府是卖党求荣,他辩驳说:没什么好卖的。
他退党了,党友又说:天要下雨,娘要嫁人,不会阻人发达;但加入民主党就不要求荣华富贵。

这是什么逻辑?
虽然,政府工作的确是个美差–起码在薪资上是。虽然,这个冯伟光也不是什么好鸟。但民主党的逻辑还是令人震惊的,包括公民党这群所谓泛民主派,不懂政治游戏规则就回家洗洗睡,闷声大发财,出来学人组党干嘛?
他们的逻辑是:不要加入政府,因为加入政府会被边缘化,被“花瓶”,被拿来做统战工具。。。。
难怪特首选举时,大家开玩笑说,万一何俊仁不小心当选,估计他自己都会惊慌,不知道要做什么,要怎么做。他们认定了加入现在的政府是妥协,是被我党收买,在他们的想象中,一套完整成熟的民主制度建立了,才可以参加游戏,而他们就是一帮坐等这个完美制度从天而降的人。
我觉得最不可原谅的,就是这种预设思维,不如你让他加入政府,他真的卖党求荣了,真的被统战了,再出来批评也不迟吧。再说妥协有什么不好?为何就不能相信自己的力量,可以由妥协开始,逐渐让别人妥协?

这是连基本的逻辑也没有的一群自命清高者,从政的魅力在于最大限度的改变社会,以此为目的,加入政府是最好的方法,组党而不从政,实在滑稽可笑,既然为了高风格,光明磊落,清风两袖,去做宗教领袖好了,别学人组党,政治必然有看不见的秘密,别想光明磊落,政治必然要运用权术(甚至阴谋)达到目标,有时要牺牲,有时要妥协。放诸天下皆如此,不论民主社会还是独裁社会。

刚来HK时,遇到区议员选举,同事说,以前我都是闭着眼睛投民主党的,现在我不投票了。
一句口号叫了二十三年,什么都没做成的党,还不如解散的好。

昨天曾荫权参加了最后一次立法会答问大会,标题就是他的发言,他说,最近几个月,凄凉的时光,日日都有。因为宗教关系,我每天都反省自己,这三个月来,反省的更多,他甚至说他不再吹口哨了—-这可是曾气定神闲从容不迫的标志。

这几个月他是够凄凉的,也为自己的政治生涯,画上了一个打着“贪婪”标签的句号,虽然他不过是个熬了几十年终于做到大老板的小职员,终于吐气扬眉,可以挥霍权力,虽然他每次住宿机票都有发票和批文。

笑与不笑,这是一个问题

借用一术语,“文化自觉”。

——————————————————————————————————————————————————————

教训

早知道回国的时候不把银行帐户关掉了,不在里面留些存款,害得我现在只能看着Steam干瞪眼啊啊,T_T、T_T、T_T。经验因人而异!

万恶的资本主义!总是引起我消费的欲望!

补:某些商品不能跨区购买。