The Python Paradox
August 2004 In a recent talk I said something that upset a lot of people: that you could get smarter programmers to work on a Python project than you could to work on a Java project.
2004 年 8 月 在最近的一次演讲中,我说了一些让很多人感到不安的话:与 Java 项目相比,你可以让更聪明的程序员来从事 Python 项目。
I didn't mean by this that Java programmers are dumb.
我并不是说 Java 程序员很愚蠢。
I meant that Python programmers are smart.
我的意思是 Python 程序员很聪明。
It's a lot of work to learn a new programming language.
学习一门新的编程语言需要做很多工作。
And people don't learn Python because it will get them a job; they learn it
人们学习 Python 并不是因为它能让他们找到工作;而是因为它能让他们找到工作。他们学会了
because they genuinely like to program and aren't satisfied with the languages they already know.
因为他们真正喜欢编程并且对他们已经掌握的语言不满意。
Which makes them exactly the kind of programmers companies should want to hire.
这使得他们正是公司想要雇用的程序员。
Hence what, for lack of a better name, I'll call the Python paradox: if a company chooses to write its software in a comparatively esoteric language, they'll be able to hire better programmers, because they'll attract only those
因此,由于没有更好的名字,我将称之为Python悖论:如果一家公司选择用一种相对深奥的语言编写软件,他们将能够雇用更好的程序员,因为他们只会吸引那些
who cared enough to learn it.
谁有足够的兴趣去学习它。
And for programmers the paradox is even more pronounced: the language to learn, if you want to get a good job, is a language that people don't learn merely to get a job.
对于程序员来说,这个悖论更加明显:如果你想找到一份好工作,那么要学习的语言是人们学习的语言,而不仅仅是为了找到工作。
Only a few companies have been smart enough to realize this so far.
到目前为止,只有少数公司足够聪明地认识到这一点。
But there is a kind of selection going on here too: they're exactly the companies programmers would most like to work for.
但这里也存在一种选择:它们正是程序员最喜欢工作的公司。
Google, for example.
以谷歌为例。
When they
当他们
advertise Java programming jobs, they also want Python experience.
广告 Java 编程工作,他们也想要 Python 经验。
A friend of mine who knows nearly all the widely used languages uses Python for most of his projects.
我的一个朋友几乎了解所有广泛使用的语言,他的大部分项目都使用 Python。
He says the main reason is that he likes the way source code looks.
他说主要原因是他喜欢源代码的外观。
That may seem a frivolous reason to choose one language over another.
选择一种语言而不是另一种语言的理由似乎很无聊。
But it is not so frivolous as it sounds: when you program, you spend more time reading code than writing it.
但它并不像听起来那么无聊:当你编程时,你花在阅读代码上的时间比编写代码的时间多。
You push blobs of source code around the way a sculptor does blobs of clay.
您可以像雕塑家制作粘土块一样推动源代码块。
So a language that makes source code ugly is maddening to an exacting programmer, as clay full of lumps would be to a sculptor.
因此,一种使源代码变得丑陋的语言对于一个严格的程序员来说是令人抓狂的,就像充满肿块的粘土对于雕塑家来说是令人抓狂的一样。
At the mention of ugly source code, people will of course think of Perl.
提到丑陋的源代码,人们当然会想到Perl。
But the superficial ugliness of Perl is not the sort I mean.
但 Perl 表面上的丑陋并不是我所说的那种。
Real ugliness is not harsh-looking syntax, but having to build programs out of the wrong
真正的丑陋不是看起来很严酷的语法,而是必须用错误的方式构建程序
concepts.
概念。
Perl may look like a cartoon character swearing, but there are cases where it surpasses Python conceptually.
Perl 可能看起来像一个卡通人物在说脏话,但在某些情况下它在概念上超越了 Python。
So far, anyway.
无论如何,到目前为止。
Both languages are of course moving targets.
当然,这两种语言都是移动的目标。
But they share, along with Ruby (and Icon, and Joy, and J, and Lisp, and Smalltalk) the fact that they're created by, and used by, people who really care about programming.
但它们与 Ruby(以及 Icon、Joy、J、Lisp 和 Smalltalk)一样,都拥有这样一个事实:它们是由真正关心编程的人创建和使用的。
And those tend to be the ones who do it well.
而那些往往是做得好的人。