话说,为了更好地理解所服务的产品,尤其是API接口的部分,因此愉快地做出一个决定:重修编程。万万没想到,在毕业很多年之后,再一次使用代码问候世界,这感觉就好像:费尽千辛万苦地爬上一座高地,视野陡然开阔,眼前展开一片明媚的崭新世界,等待你探索开拓,情不自禁地张开双臂,放声喊道:Hello world!
虽然有点儿矫情,但还是想说:突然感到,传说中木讷、机械、冰冷的理工科,竟意外地蕴藏着温度与情怀——每一个初试编程的麻瓜,都是被hello world引导入门;每一个初试运行的环境,都是以hello world开启测试……
那么 hello world 又是从何而来的呢?
Brian Kernighan
上图中的这位大胡子,名叫Brian Kernighan,是贝尔实验室的著名研究员。他在1973年出版的《B 程序设计语言的入门教程(Tutorial Introduction to the Language B)》中,首次将hello和world一起使用。1978年,在与Dennis Ritchie合作撰写的《C 程序设计语言(The C Programming Language)》中,他再次延用了hello,world句式,作为开篇第一个程序——没有人想到,这个语言和教程对今天的编程领域如此重要;也没有人想到,从此使用hello world向世界打招呼成为惯例。
《C 程序设计语言(The C Programming Language)》第一版封面
2011年11月,Brian Kernighan在接受Forbes India的采访时,被问及hello world的灵感来源。然而他已无法确切地说出最初的情景:我只记得自己看过一个卡通片,里面有一只鸡蛋和一只母鸡。母鸡说:‘Hello, World’”。
Q: C has probably the most famous computer program in the world that prints ‘Hello, World’ on the screen? Why did you choose those words?
A: Memory is dim now. What I do remember is that I had seen a cartoon that showed an egg and a chick and the chick was saying, “Hello, world”.
1978年,由Brian Kernighan亲笔手书的hello world程序。
领取专属 10元无门槛券
私享最新 技术干货