计算机科学正在消亡吗?
Now that Apple is making a profit, pundits need something else as the target of predictions of impending doom. Some seem to have fastened onto computer science, prompting David Chisnall to wonder if the subject really is dying.
既然苹果正在盈利,专家们需要一个即将发生厄运的对象作为预测目标。有人似乎盯上了计算机科学,正是这激发David Chisnall怀疑这个学科是否真的正在走向消亡。
In the late 1990s, during the first dotcom bubble, there was a perception that a computer science degree was a quick way of making money. The dotcom boom had venture capitalists throwing money at the craziest schemes, just because they happened to involve the Internet. While not entirely grounded in fact, this trend led to a perception that anyone walking out of a university with a computer science degree would immediately find his pockets full of venture capital funding.
在20世纪90年代末,第一次商业网站泡沫期间,有这样一种观念,计算机科学学位是一种快速赚钱的方式。商业网站的繁荣使风险投资者将资本投到最为疯狂的方案中。他们这样做只是因为他们恰巧卷入互联网。这种趋势虽然并非全部基于某种事实,却导致人们认为,任何一个从大学走出的拥有计算机科学学位的人都会立即获得大量的风险投资资金。
Then came the inevitable crash, and suddenly there were a lot more IT professionals than IT jobs. Many of these people were the ones that just got into the industry to make a quick buck, but quite a few were competent people now unemployed. This situation didn’t do much for the perception of computer science as an attractive degree scheme.
随之而来的是不可避免的冲击,和突如其来的IT行业从业者过剩。进入这个行业的大多数人只是为了快速的获取钱财而没有真正的才能所以他们失业了,但只有很少的一部分人是有才能的人失业。但这种形势并没有对把计算机科学作为一个具有吸引力的学位方案的观念产生太大影响。
Since the end of the first dotcom bubble, we’ve seen a gradual decline in the number of people applying to earn computer science degrees. In the UK, many departments were able to prop up the decline in local applicants by attracting more overseas students, particularly from Southeast Asia, by dint of being considerably cheaper than American universities for those students wishing to study abroad. This only slowed the drop, however, and some people are starting to ask whether computer science is dying.
自从第一次商业网站泡沫结束后,我们发现申请计算机科学学位的人员数量在逐渐下降。在英国,很多部门会支持降低当地申请者数量,吸引更多的海外学员,尤其来自东南亚的学生,而且给予他们这些渴望在海外学习的学生比他们在美国学习更多的优惠。这仅仅缓和了下滑。然而,有人开始问计算机科学是否正在走向消亡。
Computer Science and Telescopes
计算机科学和望远镜
Part of the problem is a lack of understanding of exactly what computer science is. Even undergraduates accepted into computer science courses generally have only the broadest idea of what the subject entails. It’s hardly surprising, then, that people would wonder if the discipline is dying.
问题部分来自于人们对计算机科学确切是什么缺乏认识。甚至计算机科学专业的本科生通常也只是从最广义上了解该学科。所以,人们怀疑这个学科是否正在消亡,并不奇怪。
Even among those in computing-related fields, there’s a general feeling that computer science is basically a vocational course, teaching programming. In January 2007, the British Computer Society (BCS) published an article by Neil McBride of De Montfort University, entitled "The Death of Computing." Although the content was of a lower quality than the average Slashdot troll post (which at least tries to pretend that it’s raising a valid point) and convinced me that I didn’t want to be a member of the BCS, it was nevertheless circulated quite widely. This article contained choice lines such as the following: "What has changed is the need to know low-level programming or any programming at all. Who needs C when there’s Ruby on Rails?"
甚至计算相关领域的人们普遍认为,计算机科学基本上就是讲授编程的职业课程。2007年1月,De Montfort大学Neil McBride在英国计算机社会上发表了一篇题为“计算的死亡”文章。尽管文章内容相当低质量,和使我确信我不愿成为英国计算机社会的一员,但是这篇文章仍然获得广泛传播。文章包含例如这样的选项:“改变了的是对于理解低级编程或是任何编程的需求。当Ruby语言在Rails上使用时,谁还会需要C语言呢?”
Who needs C? Well, at least those people who want to understand something of what’s going on when the Ruby on Rails program runs. An assembly language or two would do equally well. The point of an academic degree, as opposed to a vocational qualification, is to teach understanding, rather than skills—a point sadly lost on Dr. McBride when he penned his article.
谁需要C语言?当然,至少是那些企图理解当Ruby在Rail程序中运行时发生了什么事情的人需要C语言。一种汇编语言还是两种其实都一样。一个学术学位,不同于一种职业资格,关键在于让人理解而不是技术——不幸的是Dr.McBride在写这篇文章的时候没有注意到这一点。
In attempting to describe computer science, Edsger Dijkstra claimed, "Computer science is no more about computers than astronomy is about telescopes." I like this quote, but it’s often taken in the wrong way by people who haven’t met many astronomers. When I was younger, I was quite interested in astronomy, and spent a fair bit of time hanging around observatories and reading about the science (as well as looking through telescopes). During this period, I learned a lot more about optics than I ever did in physics courses at school. I never built my own telescope, but a lot of real astronomers did, and many of the earliest members of the profession made considerable contributions to our understanding of optics.
在试图描述计算机科学时,Edsger Dijkstra认为,“计算机科学就是关于计算机,就像天文学就是关于望远镜一样。”我喜欢这样的引用,但是它常会被那些不是很了解天文学的人错误引用。在我小的时候,我对天文学相当感兴趣,并且花费了大量的时间徘徊于天文台和阅读关于这门科学(也通过望远镜观察)。在那期间,我学到了比在物理课上学到的更多的光学知识。尽管我从未造出一个我自己的望远镜,但是很多真正的天文学家却做到了,同时很多这个专业的成员为我们理解光学作出了重要的贡献。
There’s a difference between a telescope builder and an astronomer, of course. A telescope builder is likely to know more about the construction of telescopes and less about the motion of stellar bodies. But both will have a solid understanding of what happens to light as it travels through the lenses and bounces off the mirrors. Without this understanding, astronomy is very difficult.
当然,望远镜的制造者和天文学家是有所不同的。一个望远镜的制造者可能会知道更多关于望远镜结构的东西,但很少会关注恒星体的运动。但是两者都需要真正理解光线在透过镜头和从镜子里反射时发生了什么。没有理解这些,天文学是相当困难的。
The same principle holds true for computer science. A computer scientist may not fabricate her own ICs, and may not write her own compiler and operating system. In the modern age, these things are generally too complicated for a single person to do to a standard where the result can compete with off-the-shelf components. But the computer scientist definitely will understand what’s happening in the compiler, operating system, and CPU when a program is compiled and run.
这样的道理同样适用于计算机科学。一个计算机科学家可能不会编制他自己的集成电路,也可能不会写自己的编译器和操作系统。在现代,这些东西对于个人来说通常是太复杂而且不可能完成一个可与现有产品竞争的标准。但是计算机科学家明确知道,当一个程序在编译和运行时,在编译器、操作系统、CPU中发生着什么。
A telescope is an important tool to an astronomer, and a computer is an important tool for a computer scientist—but each is merely a tool, not the focus of study. For an astronomer, celestial bodies are studied using a telescope. For a computer scientist, algorithms are studied using a computer.
望远镜对于天文学家来说是一个重要的工具,同样计算机对于计算机科学家来说是一个重要工具——但是它仅仅只是一个工具,并不是研究的重点。天文学家用望远镜研究天上的星体;计算机科学家研究算法来使用计算机。
Software and hardware are often regarded as being very separate concepts. This is a convenient distinction, but it’s not based on any form of reality. The first computers had no software per se, and needed to be rewired to run different programs. Modern hardware often ships with firmware—software that’s closely tied to the hardware to perform special-purpose functions on general-purpose silicon. Whether a task is handled in hardware or software is of little importance from a scientific perspective. (From an engineering perspective, there are tradeoffs among cost, maintenance, and speed.) Either way, the combination of hardware and software is a concrete instantiation of an algorithm, allowing it to be studied.
软件和硬件通常被认为是相互分离的概念。这是一个方便的区分,但是并不是一直是事实。第一台计算机自身并没有软件,和需要重新换线以运行不同的程序。现代硬件经常集成固件——软件可以与硬件紧密结合在通用目的的硅片中以完成专门目的的功能。从科学的视角来看,一个任务是通过硬件还是软件完成都是不重要的。(在工程学看来,这是成本、维护和速度的交换。)无论如何,硬件与软件的结合是一种算法的实例,应当让它得到研究。
As with other subjects, there are a lot of specializations within computer science. I tend to view the subject as the intersection between three fields:
正如和其他的学科一样,计算机科学中涉及多个学科领域。我倾向于将这个学科视为三个学科领域的交集。
Mathematics
数学
Engineering
工程学
Psychology
心理学
At the very mathematical end are computer scientists who study algorithms without the aid of a computer, purely in the abstract. Closer to engineering are those who build large hardware and software systems. In between are the people who use formal verification tools to construct these systems.
研究没有计算机辅助、纯抽象算法的计算机科学家正处于数学的边缘。建立大型硬件和软件系统的计算机科学家更接近于工程学。那些使用常规验证工具建立这些系统的人们处于这两者之间。
A computer isn’t much use without a human instructing it, and this is where the psychology is important. Computers need to interact with humans a lot, and neither group is really suited to the task. The reason that computers have found such widespread use is that they perform well in areas where humans perform poorly (and vice versa). Trying to find a mechanism for describing something that is understandable by both humans and computers is the role of the "human/computer interaction" (HCI) subdiscipline within computer science. This is generally close to psychology.
没有人的指令,电脑基本上没用,所以这正是心理学在计算机科学中重要的原因。电脑需要和人之间进行很多交互,没有任何群体是真正适应这样的任务的。计算机如此广泛应用的原因是计算机在人类不能适应的地方表现出更多的优势。试图找到一种让人和机器都能理解的描述机制是计算机科学的子学科“人/计算机交互”(HCI)的使命。因此,这一学科一般被认为接近心理学。
HCI isn’t the only part of computer science related to psychology. As far back as 1950, Alan Turing proposed the Turing Test as a method of determining whether an entity should be treated as intelligent.
人机交互并不是计算机科学中唯一与心理学相关的领域。回到1950年,阿兰 图灵推荐将图灵测试作为一种判定实体是否是智能的实体的方法。
It’s understandable that people who aren’t directly exposed to computer science would miss the breadth of the discipline, associating it with something more familiar. One solution proposed for this lack of vision is that of renaming the subject to "informatics." In principle, this is a good idea, but the drawback is that it’s very difficult to describe someone as an "informatician" with a straight face.
我们完全可以理解,那些没有直接学习计算机科学的人搞不清这个学科的范围,错误的将它归结于其它更为熟悉的学科。因此,有人推荐将这一学科改名为“信息科学”。从原则来讲,这是一个好办法,但是缺点在于很难以一种直观的方式将某人描述为一个信息专家。
Computer Scientists Can’t Program!
计算机科学家不能编程!
Talking to people in the industry, I’m frequently told that computer scientists can’t program. Part of the problem is people hiring computer scientists and thinking that they’ve just done a three- or four-year programming course. (Another part is students applying to study computer science with the same idea.)
在和业内人士聊天的时候,我通常被告知计算机科学家不会编程。这个问题部分源自那些雇佣计算机科学家的人,他们认为计算机科学家仅仅是做了3至4年编程工作的人。(另外一部分源自带有同样观念的申请学习计算机科学的学生。)
Some computer scientists, and even professors, really can’t program. Professors have PhD students to handle programming for them, but recent graduates can’t make that claim. Programming falls close to the engineering part of computer science, and people who have been through a degree that focuses more on the mathematics or psychology aspects of the subject are likely to be fairly weak in engineering.
一些计算机科学家,甚至教授,确实不会编程。教授们让博士生们为他们解决编程问题,但是现在毕业生们并不那么认为。编程更接近于计算机科学的工程学部分,那些通过更关注于数学或心理学方面的计算机学科学位的学生当然可能在工程学方面处于劣势。
A lot of dissatisfaction with computer science comes from the misplaced expectation that a computer science graduate will be a good programmer. Such a graduate should have been exposed to at least half a dozen languages, but won’t necessarily have done anything particularly complicated with those languages. She almost certainly won’t have any kind of deep understanding of the standard library available for a given platform. This kind of comprehension comes only with experience. She may have picked it up from other jobs or open source work, but not from her degree.
很多的对于计算机科学的不满来自错误的期望,即认为一个计算机科学毕业生就是一个好的程序员。其实,这个专业的毕业生应当在学校至少要学习六种以上的语言,但是她不必做任何事情尤其综合这些语言。她当然几乎不会深入了解一个给予的平台上可获得的标准库,而要全面的理解这些需要经验。这些经验她可能从其他工作中或开源工作中学会,但是绝不是从她的学位课程中。
Computer science and software engineering are very different disciplines, and a lot of people seem to confuse the two. Software engineering teaches the process of developing software, in terms of both tools and processes. A computer science course briefly touches on these topics, in the same way that a materials physicist may learn something of mechanical engineering. This doesn’t make a computer scientist a software engineer, any more than it makes a physicist the best candidate for building a bridge.
计算机科学和软件工程是截然不同的课程,但很多人将两者混淆看待。就工具和流程来讲,软件工程教授的是开发软件的过程。计算机科学课程只是简单的涉及了这些问题,就像材料物理学家可能了解机械工程一样。当然,这并不能使计算机科学家成为一个软件工程师,它至多使物理学家成为建桥的最佳的候选人。
What Is It Good For?
它有什么好处呢?
If they can’t program, what’s the point of having computer scientists? For an academic subject to justify its existence, it must impart some useful understanding to its students. Computer science is first and foremost a branch of applied mathematics, so a computer scientist should be expected to understand the principles of mathematical reasoning. But there are two areas that separate computer science from much of mathematics:
如果他们不能编程,那么拥有一个计算机科学家的目的又是什么呢?要想证明一个学术科目的存在,它必须让学习者对它有实用的理解。计算机科学首先是应用数学的一个分支,因此计算机科学家需要理解数据推理的原理。但有两个方面又让计算机科学和数学有所不同:
Focus on efficiency.At the theoretical end, this focus manifests itself in complexity theory, which groups algorithms according to their time and space requirements for execution. Closer to engineering, this becomes a focus on minimizing the number of instructions issued on a real architecture, or eliminating other bottlenecks. Most of computer science is somewhere in the middle, and involves finding an efficient (if not optimal) solution to a problem with real requirements. Much of this principle is equally applicable outside of computing; for example, in optimizing a business workflow.
关注效率。除理论之外,这种专注表现在本身复杂性的理论,它根据它们运行的时间和空间需求来组织算法。当接近于工程学时,这变成了最小化运行在现实架构上的指令数量,或者减少别的瓶颈。很多的计算机科学是一种折中的选择,和包含找到一种解决现实需求的有效(不是最理想的)方法。当然,这些原理也适用于计算之外。例如,工作流的优化。
Focus on thinking simultaneously at different levels of abstraction.Closer to the applied end of computer science, algorithms are expected to run on real systems. The instructions that will be executed when the program runs, the high-level algorithms used to create these instructions, and the interface with which the program interacts with the user are all important, and a computer scientist learns to keep all of these issues in mind at once.
同时,专注于不同层次的抽象概念。算法接近于计算机科学的应用的边缘,人们期望它运行在真实的系统。在程序运行时执行的指令,用于创建这些指令的高级算法,和用于与用户交互的接口都是很重要的。一位计算机科学家需要将这些在思考问题时一次一并考虑。
Computers are part of everyday life for a lot of people. Even discounting desktop computers, most people interact with a large number of computing devices every day. This trend has lead to a more algorithmic view being taken of a lot of processes, and computer science is essential in building these devices.
对于大多数人来说,计算机已经成为我们日常生活中的一部分。甚至打折终端机,很多人每天都与大量的计算机设备交互。这种趋势使处理多线程的算法更有前景,然而计算机科学却是创立这一切的核心。1
The decline in computer science applicants is likely to continue for a while. Computer science is no longer a buzzword-compliant "get rich quick" subject, and people (outside the BCS) are starting to realize that it’s not a vocational software development degree course. This realization is likely to be good for the subject in the long run, because it will remove many of the students who never should have chosen that field in the first place. Physics has also seen a decline in applicants in recent years, and no one is claiming that it’s dying and needs to cater more to teaching people to be second-rate engineers, rather than first-rate scientists.
在一个时期内,计算机科学的申请者数量可能还会降低。也许计算机科学不再是与“快速富裕”相关的热词,但人们(英国计算机社会之外)正开始认识到,计算机科学不是职位软件开发学位课程。从长远来看,这种认识有利于这一科目发展,因为这可以第一时间排除那些不需要选择这一学科的学生。近年来,物理学的申请者也在降低,但没有人声称物理学正在消亡和需要更多的迎合现实需要,让人们成为二流的工程师,而不是成为一流的科学家。