The Rise of Worse is Better

The Rise of Worse is Better

Richard P. Gabriel

Lucid, Inc

{an excerpt from "Lisp: Good News, Bad News, How to Win Big." [html]}

2.1 The Rise of Worse is Better

I and just about every designer of Common Lisp and CLOS has had extreme exposure to the MIT/Stanford style of design. The essence of this style can be captured by the phrase the right thing. To such a designer it is important to get all of the following characteristics right:

  • Simplicity -- the design must be simple, both in implementation and interface. It is more important for the interface to be simple than the implementation.
  • Correctness -- the design must be correct in all observable aspects. Incorrectness is simply not allowed.
  • Consistency -- the design must not be inconsistent. A design is allowed to be slightly less simple and less complete to avoid inconsistency. Consistency is as important as correctness.
  • Completeness -- the design must cover as many important situations as is practical. All reasonably expected cases must be covered. Simplicity is not allowed to overly reduce completeness.

I believe most people would agree that these are good characteristics. I will call the use of this philosophy of design the MIT approach Common Lisp (with CLOS) and Scheme represent the MIT approach to design and implementation.

The worse-is-better philosophy is only slightly different:

  • Simplicity -- the design must be simple, both in implementation and interface. It is more important for the implementation to be simple than the interface. Simplicity is the most important consideration in a design.
  • Correctness -- the design must be correct in all observable aspects. It is slightly better to be simple than correct.
  • Consistency -- the design must not be overly inconsistent. Consistency can be sacrificed for simplicity in some cases, but it is better to drop those parts of the design that deal with less common circumstances than to introduce either implementational complexity or inconsistency.
  • Completeness -- the design must cover as many important situations as is practical. All reasonably expected cases should be covered. Completeness can be sacrificed in favor of any other quality. In fact, completeness must be sacrificed whenever implementation simplicity is jeopardized. Consistency can be sacrificed to achieve completeness if simplicity is retained; especially worthless is consistency of interface.

Early Unix and C are examples of the use of this school of design, and I will call the use of this design strategy the New Jersey approach I have intentionally caricatured the worse-is-better philosophy to convince you that it is obviously a bad philosophy and that the New Jersey approach is a bad approach.

However, I believe that worse-is-better, even in its strawman form, has better survival characteristics than the-right-thing, and that the New Jersey approach when used for software is a better approach than the MIT approach.

Let me start out by retelling a story that shows that the MIT/New-Jersey distinction is valid and that proponents of each philosophy actually believe their philosophy is better.

Two famous people, one from MIT and another from Berkeley (but working on Unix) once met to discuss operating system issues. The person from MIT was knowledgeable about ITS (the MIT AI Lab operating system) and had been reading the Unix sources. He was interested in how Unix solved the PC loser-ing problem. The PC loser-ing problem occurs when a user program invokes a system routine to perform a lengthy operation that might have significant state, such as IO buffers. If an interrupt occurs during the operation, the state of the user program must be saved. Because the invocation of the system routine is usually a single instruction, the PC of the user program does not adequately capture the state of the process. The system routine must either back out or press forward. The right thing is to back out and restore the user program PC to the instruction that invoked the system routine so that resumption of the user program after the interrupt, for example, re-enters the system routine. It is called PC loser-ing because the PC is being coerced into loser mode, where loser is the affectionate name for user at MIT.

The MIT guy did not see any code that handled this case and asked the New Jersey guy how the problem was handled. The New Jersey guy said that the Unix folks were aware of the problem, but the solution was for the system routine to always finish, but sometimes an error code would be returned that signaled that the system routine had failed to complete its action. A correct user program, then, had to check the error code to determine whether to simply try the system routine again. The MIT guy did not like this solution because it was not the right thing.

The New Jersey guy said that the Unix solution was right because the design philosophy of Unix was simplicity and that the right thing was too complex. Besides, programmers could easily insert this extra test and loop. The MIT guy pointed out that the implementation was simple but the interface to the functionality was complex. The New Jersey guy said that the right tradeoff has been selected in Unix -- namely, implementation simplicity was more important than interface simplicity.

The MIT guy then muttered that sometimes it takes a tough man to make a tender chicken, but the New Jersey guy didn’t understand (I’m not sure I do either).

Now I want to argue that worse-is-better is better. C is a programming language designed for writing Unix, and it was designed using the New Jersey approach. C is therefore a language for which it is easy to write a decent compiler, and it requires the programmer to write text that is easy for the compiler to interpret. Some have called C a fancy assembly language. Both early Unix and C compilers had simple structures, are easy to port, require few machine resources to run, and provide about 50%-80% of what you want from an operating system and programming language.

Half the computers that exist at any point are worse than median (smaller or slower). Unix and C work fine on them. The worse-is-better philosophy means that implementation simplicity has highest priority, which means Unix and C are easy to port on such machines. Therefore, one expects that if the 50% functionality Unix and C support is satisfactory, they will start to appear everywhere. And they have, haven’t they?

Unix and C are the ultimate computer viruses.

A further benefit of the worse-is-better philosophy is that the programmer is conditioned to sacrifice some safety, convenience, and hassle to get good performance and modest resource use. Programs written using the New Jersey approach will work well both in small machines and large ones, and the code will be portable because it is written on top of a virus.

It is important to remember that the initial virus has to be basically good. If so, the viral spread is assured as long as it is portable. Once the virus has spread, there will be pressure to improve it, possibly by increasing its functionality closer to 90%, but users have already been conditioned to accept worse than the right thing. Therefore, the worse-is-better software first will gain acceptance, second will condition its users to expect less, and third will be improved to a point that is almost the right thing. In concrete terms, even though Lisp compilers in 1987 were about as good as C compilers, there are many more compiler experts who want to make C compilers better than want to make Lisp compilers better.

The good news is that in 1995 we will have a good operating system and programming language; the bad news is that they will be Unix and C++.

There is a final benefit to worse-is-better. Because a New Jersey language and system are not really powerful enough to build complex monolithic software, large systems must be designed to reuse components. Therefore, a tradition of integration springs up.

How does the right thing stack up? There are two basic scenarios: the big complex system scenario and the diamond-like jewel scenario.

The big complex system scenario goes like this:

First, the right thing needs to be designed. Then its implementation needs to be designed. Finally it is implemented. Because it is the right thing, it has nearly 100% of desired functionality, and implementation simplicity was never a concern so it takes a long time to implement. It is large and complex. It requires complex tools to use properly. The last 20% takes 80% of the effort, and so the right thing takes a long time to get out, and it only runs satisfactorily on the most sophisticated hardware.

The diamond-like jewel scenario goes like this:

The right thing takes forever to design, but it is quite small at every point along the way. To implement it to run fast is either impossible or beyond the capabilities of most implementors.

The two scenarios correspond to Common Lisp and Scheme.

The first scenario is also the scenario for classic artificial intelligence software.

The right thing is frequently a monolithic piece of software, but for no reason other than that the right thing is often designed monolithically. That is, this characteristic is a happenstance.

The lesson to be learned from this is that it is often undesirable to go for the right thing first. It is better to get half of the right thing available so that it spreads like a virus. Once people are hooked on it, take the time to improve it to 90% of the right thing.

A wrong lesson is to take the parable literally and to conclude that C is the right vehicle for AI software. The 50% solution has to be basically right, and in this case it isn’t.

But, one can conclude only that the Lisp community needs to seriously rethink its position on Lisp design. I will say more about this later....

时间: 2024-12-26 23:22:49

The Rise of Worse is Better的相关文章

在一个老外微信PM的眼中,中国移动App UI那些事儿

本文编译自Dan Grover的博客,他现在是腾讯微信的产品经理.以下是他从旧金山搬到广州后的近半年时间里,在试用过微信微博等中国主流移动App后,总结出的中美App在设计理念上的差异,并对中国移动App UI的发展趋势给出了自己的看法. 今年夏天,我从旧金山搬到了广州工作,成为了微信的一名产品经理. 搬到一个陌生的国家意味着许多事情要从头学起:比如要讲外语.适应饮食习惯差异等等.然而不到几个月我就惊讶地发现,开头我特别不习惯的东西对我已是轻车熟路. 我的数字生活也经历了这样一个过程.我卸掉了所

阅读作业中软件开发书籍阅读后的一些体会

No Silver Bullet: Essence and Accidents of Software Engineering(Frederick P. Brooks, Jr.) 在这篇文章中,作者将内容分成了三大部分,第一部分介绍了软件开发中根本的——软件特性中固有的困难,而这些困难是:软件实体的复杂性.软件和其它接口的一致性.软件实体的可变性以及软甲本身的不可见性.这是这些根本的特性导致了软件开发的困难. 第二部分讲了次要的——出现在目前生产上的那些困难.作者列举了软件领域中取得的最富有成效

阅读软件开发本质和方法的收获

英语水品有限,好几篇英文文章看了也不懂,所以也没有看完,下面主要说说有中文翻译的几篇文章.又由于没有真正参与过大的软件工程,不好针对作者的观点进行评价,要读懂作者的意思就已经很困难了.<有人负责,才有质量:写给在集市中迷失的一代>作者觉得.COM时代泛滥是对IT/CS的一场灾难,他反对Raymond在其书中称颂的集市模式,同意Brooks在<设计原本>中提出的所谓质量只有在某人对它负责时才有意义的观点,并且认 为Unix大教堂就是一个很好的论据.作者的意思大概就是软件的架构应该由一

个人阅读作业Week5

阅读材料  (博客2) 软件工程的瀑布, 大泥球, 教堂,集市,和银弹 网页地址 No Silver Bullet - Essence and Accidents of Software Engineering - Brooks http://www.cs.umd.edu/class/spring2003/cmsc838p/General/NoSilverBullet.html There Is a Silver Bullet – Brad J Cox http://www.drdobbs.co

移动应用UI设计(上)

1. 复杂的中文输入 拼音模糊匹配 中文的输入法千差万别,从拼音.手写.部首到颇具怀旧风的九宫格输入等,花样百出,尽管不同年代.不同成长环境的用户会选择不同的输入法,拼音输入却还是最为常用的一种. 但在中国的网站和App上,并不需要以上任意一种的输入方式.打开任何操作系统的搜索界面,只需输入拉丁字母,就能得到海量的中文搜索结果,通过智能纠错和模糊音功能,即使有错别字也无伤大雅.一旦适应了这种模式,就会不由得感慨:为什么其他国家的App没有这么人性化呢? 中国的App甚至强大到能处理各种各样的中文

现代软件工程 第六章 练习与讨论

6.3.1  什么时候适合选择敏捷 我们看了这么多方法论之后,一些同学一定比较困惑,到底选择哪一种开发方法比较好呢? 这在实践中不是难题,有学者还列出了一些简单的问题来帮助人们做决定[i]: 表6-3 问题引出方法 问题 Yes – 偏向传统的瀑布+文档的流程 No –   偏向敏捷流程 1. 项目需要有明确的spec 么? 2. 项目没有明确的用户,也无法联系用户进行沟通 3. 软件系统是大型的么? 4. 软件系统是复杂的么?例如实时系统 5. 软件的生命周期很长么? 6. 你使用比较差的软件

阅读后感

There is a silver bullet or no silver bullet link:No Silver Bullet. There is a silver bullet Brooks在"No Silver Bullet."借用将软件开发过程中的复杂性,困难性比作传说中在月圆之夜去袭击人类"人狼",普通子弹都伤不到也打不死它,只有一种用银子作成的"银弹"才能杀死他.并得出结论: 没有任何技术或管理上的进展,能够独立地许诺十年内使生产

hdu 1004 Let the Balloon Rise

Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 80469    Accepted Submission(s): 30293 Problem Description Contest time again! How excited it is to see balloons floating aro

HDU 1004 Let the Balloon Rise【STL&lt;map&gt;】

Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 123800    Accepted Submission(s): 48826 Problem Description Contest time again! How excited it is to see balloons floating ar