打分吧?

c
chebyshev
楼主 (未名空间)

A.
the design of the data structures is the central decision in the creation of a program. Once the data structures are laid out, the algorithms tend to
fall into place, and the coding is comparatively easy.

B.
One aspect of this point of view is that the choice of programming language is relatively unimportant to the overall design. We will design the program in the abstract and then write it in C. Java, C++, Awk, and Perl. Comparing the implementations demonstrates how languages can help or hinder, and ways in which they are unimportant.
Program design can certainly be colored by a language but is not usually
dominated by it.

以上两段话,均出自Kernighan和Rob Pike的《the practice of programming》第61页。
google book可看到。

我不认为这二位写码成功,是因为这些他们书上的观点。
这些观点,我认为,乃是和他们的成功代码一样,起于别的同一个原因----例如说,海量的实践。
再比如,英语能力。就是说这两段话,不是别的,和代码一样,是个产品。本质上也是代码。
你不能用代码解释代码的成因。不然会有说谎者悖论什么的。

所以咱们来当老师,给他们这个作文打个分吧?
A给几分,B给几分。平均分很可能是很准的。

如果我给的话:
A=60分
B=65分

m
magliner

如果我打分, a得满分。 b不及格。
我打分原则很简单。 十秒钟看一段话,合上书, 能重复出来越多,打分越高. a得意
思很简单,数据结构比算法重要 。 魏老专利具体干什么我不知道, 大概意思是发明
了一个数据结构,他的产品可以让用户定义数据结构, 让界面搞得像天安门广场得彩
灯,想怎么转就怎么转。

b就在里面绕。 大概说是具体语言不重要, 那你说说到底什么重要啊 ? 似乎也没说
明白(反正我是没看明白,只记得作者罗列一堆语言,有的我学过,有的没学过 。)

如果是考试,b就容易得高分, 字数多,语句复杂,全是虚词,虚头八脑,老师才懒得琢磨到底什么逻辑,码这么多字不容易,多给一点吧。 a呢, 观点一点也不稀奇,我
儿子都能听明白,才写了三行都没写满,给个平均分不冤枉你吧。
g
guvest

A = 100
B = 0

【 在 magliner(magliner) 的大作中提到: 】

: 如果我打分, a得满分。 b不及格。

: 我打分原则很简单。 十秒钟看一段话,合上书, 能重复出来越多,打分越高. a得意

: 思很简单,数据结构比算法重要 。 魏老专利具体干什么我不知道, 大概意思
是发明

: 了一个数据结构,他的产品可以让用户定义数据结构, 让界面搞得像天安门广
场得彩

: 灯,想怎么转就怎么转。

: b就在里面绕。 大概说是具体语言不重要, 那你说说到底什么重要啊 ? 似乎
也没说

: 明白(反正我是没看明白,只记得作者罗列一堆语言,有的我学过,有的没学过 。)

: 如果是考试,b就容易得高分, 字数多,语句复杂,全是虚词,虚头八脑,老师才懒得

: 琢磨到底什么逻辑,码这么多字不容易,多给一点吧。 a呢, 观点一点也不稀
奇,我

: 儿子都能听明白,才写了三行都没写满,给个平均分不冤枉你吧。

m
magliner

再比如'黄台之瓜何堪以摘',这作者表达什么意思 ? 支持谁反对谁 ? 谁是黄瓜谁要摘 ? 谁说得明白 ? 但高考作文这么写就容易得高分啊,因为你用了典故,老师刚吃完饭,正犯困,前面一个'旗帜鲜明地反对....'刚给了平均分, 碰到你这么拽得, 肯定高分啊。

普通读者肯定想知道,你是啥观点, 为什么持这种观点?
m
magliner

总结的很到位。用R语言,A <-100 B="" 0="" immutable="">也许我水平不够, 没能悟到b的高深之处。
光速不可超越,f=ma, 谁谁就是上帝,牛顿爱因斯坦说话,观点也许很新颖,但得很明确,让大家知道说话者支持啥,反对啥。
【 在 guvest (我爱你老婆Anna) 的大作中提到: 】
: A = 100
: B = 0
:
: 如果我打分, a得满分。 b不及格。
:
: 我打分原则很简单。 十秒钟看一段话,合上书, 能重复出来越多,打分越高.
: a得意
:
: 思很简单,数据结构比算法重要 。 魏老专利具体干什么我不知道, 大概意思
: 是发明
:
: 了一个数据结构,他的产品可以让用户定义数据结构, 让界面搞得像天安门广
: 场得彩
:
: 灯,想怎么转就怎么转。
: ...................

g
guvest

我发的贴,就不评论了。以免引入sample bias。每人打个分。
过几年看平均分。万物皆数。

【 在 magliner(magliner) 的大作中提到: 】
<br>: 总结的很到位。用R语言,A <br>: 也许我水平不够, 没能悟到b
的高深之处。
<br>: 光速不可超越,f=ma, 谁谁就是上帝,牛顿爱因斯坦说话,观点也许很新颖,但
得很明
<br>: 确,让大家知道说话者支持啥,反对啥。
<br>: .
<br>

n
netghost

這種話一般的人,尤其是初學者,或者小白,是不會看懂的,而且很可能理解錯。

比如說這裏,很多人會認爲"One aspect of this point of view is that the choice of programming language is relatively unimportant to the overall design."意味着學不同的語言都沒差,which是常見的誤區。
【 在 chebyshev (......) 的大作中提到: 】
: A.
: the design of the data structures is the central decision in the creation of
: a program. Once the data structures are laid out, the algorithms tend to : fall into place, and the coding is comparatively easy.
: B.
: One aspect of this point of view is that the choice of programming
language
: is relatively unimportant to the overall design. We will design the
program
: in the abstract and then write it in C. Java, C++, Awk, and Perl.
Comparing
: the implementations demonstrates how languages can help or hinder, and
ways
: in which they are unimportant.
: ...................

m
magliner

作者其实就想说 overall design重要,比语言更重要。 那就应该有话好好说。
g
guvest

这二位都是享誉多年的作者.写过几本很好的书。例如c 和 unix 那两本。

One aspect of this point of view is that the choice of programming language is relatively unimportant to the overall design.

B除了講這是另一個觀點的一個方面之外,和你這句漢語似無
不同。

【 在 magliner(magliner) 的大作中提到: 】
<br>: 作者其实就想说 overall design重要,比语言更重要。 那就应该有话好好说。
<br>

g
guvest

The authors’ choice of language, is actually the natural language,
English.
All
program design in the book is conducted by using the natural language.

Thus, from my understanding, what they meant is : for designing a program, English is more important than any other single programming language since the later is
replaceable.

【 在 netghost(Up to Isomorphism) 的大作中提到: 】
<br>: 這種話一般的人,尤其是初學者,或者小白,是不會看懂的,而且很可能理解錯。
<br>: 比如說這裏,很多人會認爲"One aspect of this point of view
is that the
choice
<br>: of programming language is relatively unimportant to the
overall
design."意
<br>: 味着學不同的語言都沒差,which是常見的誤區。
<br>: of
<br>: language
<br>: program
<br>: Comparing
<br>: ways
<br>

d
dracodoc

google book preview是随机的,我看不到61页。

这两段话都是基于Brooks的话,你应该包括原文。

Show me your flowchart and conceal your tables, and I shall continue to be
mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious." -- Fred Brooks, The Mythical Man Month (1975)

另外还有这句 this point of view is oversimplifed but not misleading.没有这句,就不容易看出作者在引用this view的时候到底是赞同还是反对。

最后,他们的讨论意义不大。数据结构是重要,但大多数时候是跟随语言发展而发展的。自然语言也是一样道理。

当你只有lisp的时候你只有list,而且数据结构的性能影响了你的可用选择。当你有了高性能数组你自然尽量用数组,哪怕list更合适,因为数组性能更高,哪怕你为此需要大量手工操作去调节数组size。当你有了高性能的自动调节size的vector,你才会不再用固定size的数组。

当clojure有了高性能的immutable data structure实现,人们才能在现实问题中尽量
多用。

数据结构和其对应操作是分不开的,你设计了一个算法用了某结构,没有好的语言实现,性能上不去,算法再直接有什么用?他们的讨论,基于一个静态假设,常见数据结构各种语言都有实现,性能都差不太多,这仅限于几个简单的结构。实际上很多数据结构的细节,不同语言实现差别还是挺大的。

【 在 chebyshev (......) 的大作中提到: 】
: A.
: the design of the data structures is the central decision in the creation of
: a program. Once the data structures are laid out, the algorithms tend to : fall into place, and the coding is comparatively easy.
: B.
: One aspect of this point of view is that the choice of programming
language
: is relatively unimportant to the overall design. We will design the
program
: in the abstract and then write it in C. Java, C++, Awk, and Perl.
Comparing
: the implementations demonstrates how languages can help or hinder, and
ways
: in which they are unimportant.
: ...................

g
guvest

你给几分?我记一下。

【 在 dracodoc(david) 的大作中提到: 】

: google book preview是随机的,我看不到61页。

: 这两段话都是基于Brooks的话,你应该包括原文。

: Show me your flowchart and conceal your tables, and I shall continue
to be

: mystified. Show me your tables, and I won't usually need your
flowchart; it'

: ll be obvious." -- Fred Brooks, The Mythical Man Month (1975)

: 另外还有这句 this point of view is oversimplifed but not misleading.没有这句

: ,就不容易看出作者在引用this view的时候到底是赞同还是反对。

: 最后,他们的讨论意义不大。数据结构是重要,但大多数时候是跟随语言发展而发展的

: 。自然语言也是一样道理。

: 当你只有lisp的时候你只有list,而且数据结构的性能影响了你的可用选择。当你有了
: ...................

m
magliner

我就说嘛, dracdoc是能纵横好几种语言的高人。
我们普通人学会一种语言就累的半死,只要有口饭吃,才不会费神折腾别的语言。
d
dracodoc

A: 70, only part of story
B: 30, language doesn't matter if all implementations are similar for the
question. so the view is only relevant for even less cases.

【 在 guvest (我爱你老婆Anna) 的大作中提到: 】
: 你给几分?我记一下。
:
: google book preview是随机的,我看不到61页。
:
: 这两段话都是基于Brooks的话,你应该包括原文。
:
: Show me your flowchart and conceal your tables, and I shall continue
: to be
:
: mystified. Show me your tables, and I won't usually need your
: flowchart; it'
:
: ll be obvious." -- Fred Brooks, The Mythical Man Month (1975)
:
: 另外还有这句 this point of view is oversimplifed but not misleading.没
: 有这句
: ...................