Rob Pike

Rob Pike, AT&T Bell Lab前Member of Technical Staff ,现在google研究操作系统。

(图)Rob Pike Rob Pike

罗伯伯是Unix的先驱,是贝尔实验室最早和Ken Thompson以及 Dennis M. Ritche 开发Unix的猛人,UTF-8的设计人。他还在美国名嘴David Letterman 的晚间节目上露了一小脸,一脸憨厚地帮一胖子吹牛搞怪。让偶佩服不已的是,罗伯伯还是1980年奥运会射箭的银牌得主。他还是个颇为厉害的业余天文学家,设计的珈玛射线望远镜差点被NASA用在航天飞机上。

他还是两本经典,The Unix Programming Environment 和 The Practice of Programming 的作者之一。如果初学者想在编程方面精益求精,实在该好好读读这两本书。它们都有中文版的说。罗伯伯还写出了Unix下第一个基于位图的窗口系统,并且是著名的blit 终端的作者。当然了,罗伯伯还是号称锐意革新的操作系统,Plan9,的主要作者。可惜的是,Plan9并没有引起多少人的注意。

罗伯伯一怒之下,写出了振聋发聩的雄文 Systems Software Research is Irrelevant,痛斥当下系统开发的不思进取,固步自封的弊病。虽然这篇文章是罗伯伯含忿出手,颇有偏激之词,但确实道出了系统开发的无奈:开发周期越来越长,代价越来越大,用户被统一到少数几个系统上,结果越来越多的活动是测量和修补,而真正的革新越来越少。

就在罗伯伯郁闷之极的时候,google登门求贤来乐。如果说现在还有一家大众公司在不遗余力地把系统开发推向极致的话,也就是google乐。随便看看google的成果就知道了。具有超强容错和负载平衡能力的分布式文件系统GFS (现在能够用100,000台廉价PC搭起一个巨型分布系统,并且高效便宜地进行管理的系统也不多哈),大规模机器学习系统(拼写检查,广告匹配,拼音搜寻。。。哪个都很牛的说),更不用说处理海量并行计算的各式google服务了。Rob在System Software Research is Irrelevant里萧瑟地说现在没有人再关心系统研究的前沿成果了。想不到他错了,应为google关心。google网络了大批功成总是试图吸取系统研究的最新成果。想必Rob Pike在google很幸福。愿他做出更棒的系统。

目录

[显示全部]

个人简介

Rob Pike 何许人也?作家?不错,Rob 和贝尔实验室的Kernighan 合作出版了《Unix 编程环境》(The Unix Programming Environment)和《程序设计实践》(The Practice ofProgramming)。这两本书都有中文译本,为初学者研习和提高编程技术提供了很好的方法和理念。天文学家?这是 Rob 的副业。牛烘烘的他曾在70年代得到加拿大皇家天文协会多伦多中心的资助,对光污染进行研究,写有相关论文若干篇。更厉害的是,他设计的伽马望远镜差一点被用在航天飞机上(如果他没有开玩笑的话)。

(图)Rob Pike Rob Pike

Robert C. Pike (born 1956) is a software engineer and author. He is best known for his work at Bell Labs, where he was a member of the Unix team and was involved in the creation of the Plan 9 from Bell Labs and Inferno operating systems, as well as the Limbo programming language.

He also co-developed the Blit graphical terminal for Unix; before that he wrote the first window system for Unix in 1981. Pike was the applicant for AT&T patent number 4555775 or " backing store patent" that is part of the X graphic system protocol. Pike is a prominent proponent of software patents. [1]

Over the years Pike has written many text editors; sam and acme are the most well known and are still in active use and development.

Pike, with Brian Kernighan, is the co-author of The Practice of Programming and The Unix Programming Environment. With Ken Thompson he is the co-creator of UTF-8. Pike also developed lesser systems such as the vismon program for displaying images of faces of email authors.

Pike also appeared once on The Late Show with David Letterman, as a technical assistant to the comedy duo Penn and Teller.

As a joke Pike claimed to have won the 1980 Olympic silver medal in Archery; however, Canada boycotted the 1980 Summer Olympics.

Pike, a Canadian citizen, is married to Renée French, and currently works for Google.

精彩引言

"Not only is UNIX dead, it's starting to smell really bad." - circa 1991 [1]

(图)Robert C. Pike Robert C. Pike

"Object-oriented design is the roman numerals of computing." - [2] "There's no such thing as a simple cache bug." [3] 
"Caches aren't architecture, they're just optimization." [4] 
"Sockets are the X windows of IO interfaces." [5] 
"Sometimes when you fill a vacuum, it still sucks." - on the X Window System [6] 
"Unix never says `please.'" [7] 
"Those days are dead and gone and the eulogy was delivered by Perl."[8] - on one tool for one job 
"I started keeping a list of these annoyances but it got too long and depressing so I just learned to live with them again. We really are using a 1970s era operating system well past its sell-by date. We get a lot done, and we have fun, but let's face it, the fundamental design of Unix is older than many of the readers of Slashdot, while lots of different, great ideas about computing and networks have been developed in the last 30 years. Using Unix is the computing equivalent of listening only to music by David Cassidy."[9]

《程序设计实践》中文版本

Brian W.Kernigham、Rob Pike
本书是Brian W. Kernighan和Rob Pike合著的最新力作。本书从排错、测试、性能、可移植性、设计、界面、风格和记法等方面,讨论了程序设计中实际的、又是非常深刻和具有广泛意义的思想、技术和方法,它的翻译出版将填补国内目前这方面书籍的空白。本书值得每个梦想并努力使自己成为优秀程序员的人参考,值得每个计算机专业的学生和计算机工作者阅读,也可作为程序设计高级课程的教材或参考书。

Brian Kernighan 和 Rob Pike
Brian Kernighan 和 Rob Pike 两位都是贝尔实验室里搞计算机的元老了。Brian 年纪比较大,Rob 比较年轻。Brian 是 AWK 语言的作者之一,也是 C 语言最经典教材《C 程序设计语言》的作者之一,和 Rob 一起,他还写过《程序设计实践》。Rob 则是研究系统的,Plan 9 和许多其他项目都有他的功劳。他在 80 年代还很早地为我们引荐了鼠标操作和可视化终端这样的好东东。

(图)《程序设计实践》。 《程序设计实践》

目      录
译者序
前言
第1章   风格 1
1.1   名字 2
1.2   表达式和语句 4
1.3   一致性和习惯用法 8
1.4   函数宏 14
1.5   神秘的数 15
1.6   注释 18
1.7   为何对此费心 22
第2章   算法与数据结构 23
2.1   检索 23
2.2   排序 25
2.3   库 27
2.4   一个Java快速排序 29
2.5   大O记法 31
2.6   可增长数组 33
2.7   表 35
2.8   树 39
2.9   散列表 43
2.10   小结 46
第3章   设计与实现 48
3.1   马尔可夫链算法 48
3.2   数据结构的选择 50
3.3   在C中构造数据结构 51

(图)Rob Pike Rob Pike

3.4   生成输出 54
3.5   Java 56
3.6   C++ 59
3.7   Awk和Perl 61

3.8   性能 63
3.9   经验教训 64
第4章   界面 67
4.1   逗号分隔的值 67
4.2   一个原型库 69
4.3   为别人用的库 72
4.4   C++实现 79
4.5   界面原则 82
4.6   资源管理 84
4.7   终止、重试或失败 86
4.8   用户界面 90
第5章   排错 93
5.1   排错系统 94
5.2   好线索,简单错误 95
5.3   无线索,难办的错误 98
5.4   最后的手段 101
5.5   不可重现的错误 103
5.6   排错工具 105
5.7   其他人的程序错误 107
5.8   小结 108
第6章   测试 110
6.1   在编码过程中测试 110
6.2   系统化测试 114
6.3   测试自动化 118
6.4   测试台 120
6.5   应力测试 123
6.6   测试秘诀 125
6.7   谁来测试 126
6.8   测试马尔可夫程序 127
6.9   小结 129
第7章   性能 130
7.1   瓶颈 130
7.2   计时和轮廓 135
7.3   加速策略 138
7.4   代码调整 140
7.5   空间效率 144
7.6   估计 145
7.7   小结 147
第8章   可移植性 149
8.1   语言 149
8.2   头文件和库 154
8.3   程序组织 156
8.4   隔离 159
8.5   数据交换 160
8.6   字节序 161
8.7   可移植性和升级 164
8.8   国际化 165
8.9   小结 167
第9章   记法 169
9.1   数据格式 169
9.2   正则表达式 174
9.3   可编程工具 180
9.4   解释器、编译器和虚拟机 182
9.5   写程序的程序 186
9.6   用宏生成代码 189
9.7   运行中编译 190
后记 195
附录:规则汇编 197
索引 200

我是笨人——读Rob Pike的《Notes on C Programming 》

Rob Pike, 是AT&T Bell Lab前Member of Technical Staff ,现在google研究操作系统,Unix先驱,UTF-8的设计人,The Unix Programming Environment 和 The Practice of Programming 的作者之一。 在《 Notes on C Programming 》中从另一个稍微不同的角度表述了 Unix 的哲学(或者说是程序局部优化6原则):

(图)Rob Pike Rob Pike

1. 你无法断定程序会在什么地方耗费运行时间。瓶颈经常出现在想不到的地方,所以别急于胡乱找个地方改代码,除非你已经证实那儿就是瓶颈所在。 
2. 估量。在你没对代码进行估量,特别是没找到最耗时的那部分之前,别去优化速度。 
3. 花哨的算法在 n 很小时通常很慢,而 n 通常很小。花哨算法的常数复杂度很大。除非你确定 n 总是很大,否则不要用花哨算法(即使 n 很大,也优先考虑原则 2 )。比如,解决常见问题时,最简单的树——二叉树(binary tree),总是比那些复杂的树(AVL树,伸展树(splay tree)和红黑树、B-树(B-tree),多叉树(trie))来的高校。 
4. 花哨的算法比简单算法更容易出 bug 、更难实现。尽量使用简单的算法配合简单的数据结构。
只要掌握了数据结构中的四大法宝,就可以包打天下,他们是:array 、linked list 、hash table、binary tree 。这四大法宝可不是各自为战的,灵活结合才能游刃有余。比如,一个用hash table组织的symbol table,其中是一个个由字符型array构成的linked list。
5. 以数据为中心。如果已经选择了正确的数据结构并且把一切都组织得井井有条,正确的算法也就不言自明。编程的核心是数据结构,而不是算法。 
6. 没有原则 6 。

E文全文地址:http://www.lysator.liu.se/c/pikestyle.html
      Most programs are too complicated - that is, more complex than they need to be to solve their problems efficiently.  Why? Mostly it's because of bad design, but I will skip that issue here because it's a big one.  But programs are often complicated at the microscopic level, and that is something I can address here. 
      Rule 1.  You can't tell where a program is going to spend its time.  Bottlenecks occur in surprising places, so don't try to second guess and put in a speed hack until you've proven that's where the bottleneck is.

      Rule 2.  Measure.  Don't tune for speed until you've measured, and even then don't, unless one part of the code overwhelms the rest.

      Rule 3.  Fancy algorithms are slow when n is small, and n is usually small.  Fancy algorithms have big constants. Until you know that n is frequently going to be big, don't get fancy.  (Even if n does get big, use Rule 2 first.)   For example, binary trees are always faster than splay trees for workaday problems.

      Rule 4.  Fancy algorithms are buggier than simple ones, and they're much harder to implement.  Use simple algorithms as well as simple data structures.

      The following data structures are a complete list for almost all practical programs:

array 
linked list 
hash table 
binary tree 
Of course, you must also be prepared to collect these into compound data structures.  For instance, a symbol table might be implemented as a hash table containing linked lists of arrays of characters. 
      Rule 5.  Data dominates.  If you've chosen the right data structures and organized things well, the algorithms will almost always be self evident.  Data structures, not algorithms, are central to programming.  (See Brooks p. 102.)

      Rule 6.  There is no Rule 6. 

 

Ken Thompson —— Unix 最初版本的设计者和实现者,禅宗偈语般地对 Pike 的原则4 作了强调:
拿不准就穷举

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值