埃蒙小镇

埃蒙小镇真是纷乱尘世里的一方净土。

Bug-free Development

A myth says, and lots of people believe, that every program has bugs.

This is only a myth, however. Consider this program:

void     main(void)
{
}

This program has no bugs, because it does not do anything. This program has lots of unsupported features, however. It does not do whatever we can think of, or in other words, the entire world is its complement.

You may say this is a quibble, and tweak the statement a little bit and say: Every acting program has bugs.

Then please consider this famous program, which does nothing but printing “hello, world” followed by a line-feed:

#include <stdio.h>

void     main(void)
{
   puts(“hello, world”);
}

We acknowledge that this program has lots of unsupported features as well. It cannot print “good morning, world”, “goodbye, world”, etc. However, again, it has no bugs.

A program may have unsupported features, but can be bug-free. In my 19-year programming life, no post-release bugs were discovered from my codes. I worked for a company that manufactured semiconductor measurement instruments. I wrote a program that made the company’s program looked like sequential execution, but actually run in parallel way. The patent-owning program had over 2000 lines, and since the day its first version was written (2003), the company’s QA team did not find any bug from it. Two years after I left the company, I talked with my ex-colleague by chance. He told me that the guy, who was assigned the QA to audit my code, did not find a single bug. But since the QA believed the myth “Every program has bugs” so blindly, he preservered with it for two years, and ended up with nothing.

When I was young and arrogant, I drafted a “bug-free guarantee” and attach it to every piece of my source code, and said:

If anyone finds the first bug in my code, I would pay him/her 1 dollar, then for the second bug he/she finds, I would pay 2 dollars. 4 dollars for the third, 8 dollars for the fourth, and the number increases exponentially.

Nobody ever got a buck from me.

In theory, in reality, bug-free development is possible. I am planning to share ideas about bug-free programming in some of my future blogs. Such blogs will use “bug-free” tag.

中华

金星合木星

反转鼠标

鼠标不知怎的,忽然移动方向反转,往上推就往下走,往左拽就往右走。虽然还是很快适应了,但@玲玲_400 童鞋给了个创意解决方案:先反转左右按键,再倒持鼠标即可。

诗经·小雅·出车

默写豪放诗

@汉唐网:“请背诵并默写一篇诗词歌赋,内容要求豪放大气,字数不限,家长或基友签字。”

归真堂、全聚德、驴香馆

一大早看见归真堂说:“全聚德片鸭子,该不该上市?”后来似乎悟到全聚德不是活剐鸭子,默默删帖了。从前有种“驴香馆”,在地上挖四个洞,把驴栽在里面,驴没法曲腿,无从逃出。客人指定吃那个部位,店家就割那块。割之前,还先泼上滚烫的开水,据说这样驴肉才脆嫩。割上五六天,一头驴才能咽气。这馆子如果今天上市,归真堂的比喻才切。

违缘和助缘

从世俗层面上来说,净饭王是悉达多最大的违缘,也是最大的助缘。如果不是他把悉达多在安乐窝里软禁那么久,当悉达多看到生老病死时,震动恐怕也不会那么剧烈。从胜义上说,没这些弯弯绕,释迦牟尼本来就是来演示一下觉醒的过程,不论净饭王如何做,那一世的觉醒都是必然的。

 

关于南京市访问团的几点感想

被人抡圆了抽一嘴巴,次日才开始发娇嗔,这说明脸皮过厚,信号从脸皮表面进入大脑,整整走了一天。

名古屋一事,除了暴露南京访团极弱的应变能力,还说明他们完全不做课前预习。对手是谁,“个人见解”如何,会前两眼一抹黑。究其原因,大约是国内开会习惯了,两肩扛一大脑袋,眯眼打盹,偶然醒来,微笑点头即可。

这几天有两个速度令人注目。日本骑行者在武汉丢了自行车,武汉警方彻夜寻回。南京官方访团在名古屋,被对方市长当面告知“南京大屠杀不存在”,会后还赠送对方礼物,一天后想起来应该发飙。

@南京发布: 【南京快讯】南京市人民政府外事办公室新闻发言人经授权发布:鉴于现任名古屋市市长河村隆之否认南京大屠杀史实,严重伤害了南京人民的感情,南京市暂停与名古屋市政府间的官方交往。