未登录,请登录后再发表信息
最新评论 (0)

用数学彻底改变计算机科学的人

The Man Who Revolutionized Computer Science With Math

My name is Leslie Lamport,
我是莱斯利·兰伯特
and I am a computer scientist,
是一名计算机科学家
which is something that didn’t really exist
在我从事这一职业时
when I started being a computer scientist,
还没有“计算机科学家”这一说
and it took me a while to figure out that I was one.
经过一段时间后才意识到 自己已经成为了其中一员
My relationship with computers began as a programmer.
我与计算机的缘分起于我做程序员时
It never quite occurred to me that I was doing anything scientific
我从未想过自己会做任何科学研究
until after I had published enough papers
直到我发表了足够多的论文
that it finally occurred to me.
我才意识到这一点
My education was as a mathematician.
我接受的教育让我成为一名数学家
It was just natural for me to think about computers as a mathematician.
而作为一名数学家 我会很自然地想到计算机
When you write an algorithm,
当你演示一段算法时
you need to have a proof that it’s correct.
你需要证明它是正确的
An algorithm without a proof is a conjecture.
没有被证实的算法只是猜想
It’s not a theorem.
它并不是理论定理
And if you’re proving things well, that means mathematics.
如果你证明得好 那只是在数学方面很好
Computer scientists tend to think in terms of programming languages.
计算机科学家趋向于从编程语言的角度去思考
One of the epiphanies in my career was the realization
我职业生涯中的一个顿悟就是意识到
that I was not writing programs as a computer scientist.
作为一名计算机科学家 我不是写程序
I was designing algorithms.
而是在设计算法
I came to realize that if I’m not writing a program,
我开始意识到 如果我不是在写程序
I shouldn’t use a programming language.
就不应该使用编程语言
People confuse programming with coding.
人们总是将编程和写代码混淆
Coding is to programming what typing is to writing.
写代码之于编程就如打字之于写作
Writing is something that involves mental effort.
写作是需要耗费脑力的
You’re thinking about what you’re going to say.
你要思考表达的内容
The words have some importance, but in some sense
文字比较重要 但从某种意义来说
that even they are secondary to the ideas.
文字实际上比想法次要
In the same way, programs are built on ideas.
同样的 程序是建立在想法之上的
They have to do something.
程序需要去做一些事情
And what they’re supposed to do? I mean is like,
程序应该去做什么呢?我的意思是
what writing is supposed to convey?
写作应该传递什么呢?
If people are trying to learn programming
如果人们尝试通过学习代码
by being taught to code,
来掌握好编程
well, they’re being taught writing
那么 仅仅通过学习如何打字
by being taught how to type.
来学习写作
And that doesn’t make much sense.
是没有多大意义的
The best way I have for teaching about programming as distinct from coding
区别于编码教学 我认为编程教学最好的方式
is to think about what the program is supposed to do mathematically.
是思考程序在数学层面上应该做什么
There’s a very big practical problem with this–
其中有一个非常实际的问题——
the mathematical education in this country is pretty terrible.
数学教育在这个国家非常糟糕
Most people wind up being afraid of mathematics.
大多数人最后都对数学有惧怕感
This is even… senior programmers.
高级程序员甚至也怕数学
I’ve developed a language called TLA+
我开发了一种名为TLA+的语言
for writing down the ideas that
用于在编写任何代码之前
go into the program before you do any coding.
记录程序中的想法
It’s a pretty hard thing for engineers to get into.
而对于工程师来说 思考程序在数学上应该做什么是一件相当困难的事情
But when they do, it develops their ability to think mathematically.
但当他们这样思考时 会提升自己的数学思考能力
In 2013, Leslie Lamport won the A.M. Turning Award for his work on distributed systems,
2013年 莱斯利·兰伯特因其在分布式系统方面的努力获得了A.M.图灵奖
where multiple components on different networks coodinate
其中不同网络上的多个组件相互协调
to achieve a common objective.
以实现一个共同的目标
Lamport’s work on distributed systems forms the basis of modern computing.
兰伯特在分布式系统上的成果形成了现代计算的基础
A distributed system is one in which…
在分布式系统中
your computer can be rendered useless
你的计算机可能因你
by the failure of a computer
根本不知道存在的计算机故障
of a computer that you didn’t even know existed.
变得无用
Non-distributed computing is when different processes
非分布式计算是指不同进程
communicate by using the same memory.
使用相同内存进行通信
And distributed computing means that
分布式计算意味着
they’re communicating with one another by sending messages.
通过发信息相互交流
Now my interest in distributed systems
我对分布式系统的兴趣
came about by serendipity.
来自于偶然的一次发现
I received a preprint of a paper
我收到了来自
by Robert Thomas and Paul Johnson,
罗伯特·托马斯和保罗·约翰逊的一篇论文的预印本
who had an algorithm for implementing distributed databases.
他们有一个实现分布式数据库的算法
These are databases where
在这些数据库中
you could have multiple copies of the data
你可以把数据的多个副本
setting at different computers,
放在不同的电脑上
so that programs on each computer could have
以便每台计算机上的程序可以
rapid access to the data.
快速访问数据
But they had to be synchronized
但是他们必须同步数据
so that processes on all the computers
才能使所有计算机上的进程
got consistent views of what the data was.
看到的数据都是一致的
I happen to have become quite familiar with special relativity.
我碰巧对狭义相对论很熟悉
One of the things that special relativity teaches you is
狭义相对论告诉你的一件事是
that two different observers
两个不同的观察者
have different notions of
对“同时”的含义
what “at the same time” means.
他们对“同时”有不同的概念理解
But there’s one notion that is invariant –
但有一个概念是不变的——
there’s a certain notion of
这个特定的概念就是
one event happening before another event.
一个事件发生在另一个事件之前
And that means that…
并且那意味着
it’s possible for information to be transmitted from one event to the other,
信息很可能从一个事件流动到另一个事件
when the information cannot travel faster than the speed of light.
当信息传输速度小于光速时
I realized that… that notion of causality
我意识到因果关系的概念
was violated by the algorithm of Thomas and Johnson.
被托马斯和约翰逊的运算法则扰乱
It’s completely analogous to the relations in special relativity.
而变成完全类似于狭义相对论中的关系了
So what I did is I wrote a paper
所以我写了一篇论文
that explained this notion of causality.
解释了因果关系的概念
One could solve any distributed system problem
人们可以通过构建我所说的状态机
by building what I called a state machine.
来解决任何分布式系统问题
Think of it as an abstract computer
把它想象成一台一次只能
that has one thing at a time.
做一件事的抽象机器
Do make sure that all the computers
确保所有的计算机
in this distributed system cooperate,
能够在这个分布式系统中合作
to implement a single state machine.
从而实现单状态机
And that idea has become fundamental
这个想法已经成为人们思考
in the way people think about building distributed systems.
构建分布式系统的基本方式
I had never even thought about a distributed system
在我写论文之前从没有考虑过
before I wrote that paper.
关于分布式系统的事情
As I progressed in my career,
随着我职业生涯的发展
I came to appreciate of the idea of working in industry.
我常常思考制造业中的工作模式
That’s where most of the interesting problems that I found came from.
这就是我发现的大部分有趣问题的来源
You know from engineers, having a problem to solve.
你从工程师那里知道 有一个问题需要解决
It reminds me actually of something
实际上这让我想起
that Auguste Renoir once said
奥古斯特·雷尼奥曾说过的一句话
when someone asked him why he painted outside
当时有人询问为什么他在户外绘画
rather than in his studio.
而不是在他的工作室里
And what he said is,” if i were painting in the studio
你知道他说什么吗? “如果我在工作室里绘画
and I wanted to paint a leaf,
然后我想要画一片叶子
I would be able to, you know, think of only a half dozen or so
你知道吗 我只能想到
different kinds of leaves that I could paint.
六七种不同种类的叶子
But when I was painting outdoors,
但当我在户外绘画的时候
there were just these millions of different kinds of leaves
户外有许多不同种类的叶子
that were there that I could paint from.”
我都可以画这些叶子”
I found my research the same way,
我发现我的研究也是如此
that if I sat down, you know, and just
如果我坐下来
you know, contemplated my navel,
打量着我的肚脐
and think about problems, you know,
然后思考问题
there’s a small number of problems that I could think of.
我所能够思考的只有少量的问题
But there were just scarce of them
但是在许多行业中
sitting out in industry waiting to be to be solved.
却很少有这样的问题等待解决
My favorite of my algorithms is the bakery algorithm.
我最喜欢的算法是烘焙算法
It’s to solve the mutual exclusion problem
它用以解决互斥问题
that is keeping two processes
即防止两个进程
from using the printer at the same time.
同时使用同一台打印机
Processes choose a number, based on the numbers
进程在其他进程选择的编号的基础上
that have been chosen by other processes,
选择一个编号
and use an algorithm so that
并且使用一个算法
the lowest is allowed to use the printer.
让编号数值最小的进程使用打印机
But what is amazing about it is
但令人惊奇的是
it does not make an assumption
这没有做出一个
that almost every other algorithm makes.
几乎所有其他算法都会做出的假设
The assumption being that if say
这个假设就是
I’m changing my number from 47 to 100,
我把我的数字从47改到100
and you read that number.
然后你读取这个数字
You’ll either get 47 or 100.
要么得到47 要么得到100
But that algorithm works,
但这个算法奏效
even if instead of getting 47 or 100,
即使不是得到47或者100
you maybe got 4700,
你也许会得到4700
or maybe you got 9999 –
或者得到9999——
the algorithm still works.
这个算法仍在奏效
I didn’t intend it to, I mean, I didn’t intend that.
发生这种结果并非我本意
I just discovered that, when I wrote the proof,
我只是发现了 当我在写入证明参数时
I never needed to make the assumption.
我不需要去做这个假设
That is just so beautiful.
那是如此的奇妙
And…
而且……
you know, I’m really proud that…
你知道吗 我非常自豪 因为……
that I stumbled on it.
能做到这一点 完全是因为误打误撞
[music]
[音乐]

发表评论

译制信息
视频概述

讲述了计算科学家 Leslie Lamport 如何用数学改变计算机科学的历程

听录译者

ibs

翻译译者

BXG

审核员

审核员LG

视频来源

https://www.youtube.com/watch?v=rkZzg7Vowao

相关推荐