1 導(dǎo)讀 請將屏幕橫過來 感謝小兔提供的思維導(dǎo)圖 小兔,女,外企打工仔,設(shè)技愛好者 2 聽力|精讀|翻譯|詞組 Computer programming 電腦編程 英文部分選自經(jīng)濟(jì)學(xué)人Science and technology版塊 Computer programming 電腦編程 And now for something completely different 創(chuàng)新時(shí)代 Python, a simple and versatile computing language, has brought coding to a vast new audience 簡潔、用途廣泛的程序設(shè)計(jì)語言Python, 把萬千新用戶帶進(jìn)編程世界 IN DECEMBER 1989 Guido van Rossum, a Dutch computer scientist, set himself a Christmas project. Irked by shortcomings in other programming languages, he wanted to build his own. His principles were simple. First, it should be easy to read. Rather than sprawling over line-endings and being broken up by a tangle of curly braces, each chunk would be surrounded with indented white space. Second, it should let users create their own packages of special-purpose coding modules, which could then be made available to others to form the basis of new programs. Third, he wanted a “short, unique and slightly mysterious” name. He therefore called it after Monty Python, a British comedy group. The package repository became known as the Cheese Shop. 1989年12月,荷蘭計(jì)算機(jī)科學(xué)家吉多·范·羅森 (Guido van Rossum)制定了一個(gè)圣誕節(jié)計(jì)劃。由于厭倦了其他編程語言的缺陷,他想設(shè)計(jì)一套自己的編程語言。他的理念很簡單:第一,易讀。每個(gè)數(shù)據(jù)塊不再是一大串一直寫到行尾,被大括號打斷的代碼,而是被縮進(jìn)的空白符包圍;第二,用戶可以創(chuàng)建自己的專用編碼模塊包,其他人也可以在這些模塊包的基礎(chǔ)上開發(fā)新程序;第三,他想要一個(gè)“簡短,獨(dú)特,帶點(diǎn)神秘色彩”的名字。因此,他用英國喜劇團(tuán)體巨蟒劇團(tuán)(Monty Python)的名字命名該編程語言,數(shù)據(jù)包庫則取名為“奶酪店(cheese shop)”。 Nearly 30 years after his Christmas invention, Mr Van Rossum resembles a technological version of the Monty Python character who accidentally became the Messiah in the film “Life of Brian”. “I certainly didn’t set out to create a language that was intended for mass consumption,” he explains. But in the past 12 months Google users in America have searched for Python more often than for Kim Kardashian, a reality-TV star. The rate of queries has trebled since 2010, while inquiries after other programming languages have been flat or declining (see chart). Python誕生30年之后,范·羅森(Van Rossum)在技術(shù)界,就像Monty Python在電影《布萊恩的一生》(Life of brian)中扮演的角色那樣,意外地成了救世主。他解釋道,“我沒想過要?jiǎng)?chuàng)造一種用于大眾消費(fèi)的語言”。但在過去的12個(gè)月內(nèi),美國Google用戶搜索Python的頻率,比搜索真人秀明星金· 卡戴珊(Kim Kardashian)的頻率還要高。2010年以來,其查詢率增長了兩倍,而其他編程語言的查詢率則一直持平或者下降(見圖表)。 The language’s popularity has grown not merely among professional developers—nearly 40% of whom use it, with a further 25% wishing to do so, according to Stack Overflow, a programming forum—but also with ordinary folk. Codecademy, a website that has taught 45m novices how to use various languages, says that by far the biggest increase in demand is from those wishing to learn Python. It is thus bringing coding to the fingertips of those once baffled by the subject. Pythonistas, as aficionados are known, have helped by adding more than 145,000 packages to the Cheese Shop, covering everything from astronomy to game development. 編程論壇Stack Overflow的數(shù)據(jù)顯示,這一計(jì)算機(jī)語言不僅受到專業(yè)程序員的歡迎—約有40%的專業(yè)人士使用Python,另外還有25%的人表達(dá)了使用意愿—而且還有普通人使用Python。網(wǎng)站編碼學(xué)院(Codecademy)已經(jīng)教會4500萬名初學(xué)者如何使用各種程序語言,該網(wǎng)站表示,到目前為止學(xué)習(xí)Python語言的用戶需求量增長最大。因?yàn)椋琍ython讓那些對編程望而卻步的人學(xué)會了寫代碼。Python的擁躉們(Pythonistas)在奶酪店(數(shù)據(jù)包庫里)添加的數(shù)據(jù)包超過了145000個(gè),內(nèi)容涵蓋了從天文學(xué)到游戲開發(fā)的方方面面。 Mr Van Rossum, though delighted by this enthusiasm for his software, has come to find the rigours of supervising it, in his role as “benevolent dictator for life”, unbearable. He fears he has become something of an idol. “I’m uncomfortable with that fame,” he says, sounding uncannily like Brian trying to drive away the crowds of disciples. “Sometimes I feel like everything I say or do is seen as a very powerful force.” On July 12th he resigned, leaving the Pythonistas to manage themselves. 用戶的狂熱讓范·羅森感到高興,但他也發(fā)現(xiàn)自己作為“善意的獨(dú)裁者”,肩負(fù)嚴(yán)峻的監(jiān)管責(zé)任,這令他感到難以承受。他擔(dān)心自己會成為偶像人物?!懊暣笤肓钗腋杏X不自在”他說道,這聽起來就像布萊恩試圖趕走眾多門徒一樣特立獨(dú)行?!坝袝r(shí)我覺得無論我說什么,做什么都被當(dāng)做圣旨?!?月12日他辭職離開,留下Python擁躉們進(jìn)行自我管理。 Nobody expects the faddish statistician 此處翻譯不確定,歡迎大家踴躍留言 Python is not perfect. Other languages have more processing efficiency and specialised capabilities. C and C++ are “l(fā)ower-level” options which give the user more control over what is happening within a computer’s processor. Java is popular for building large, complex applications. JavaScript is the language of choice for applications accessed via a web browser. Countless others have evolved for various purposes. But Python’s killer features—simple syntax that makes its code easy to learn and share, and its huge array of third-party packages—make it a good general-purpose language. Its versatility is shown by its range of users and uses. The Central Intelligence Agency has employed it for hacking, Pixar for producing films, Google for crawling web pages and Spotify for recommending songs. Python并不完美。其他語言具有更高的處理效率和專業(yè)能力。C和C ++是“較低級別”選項(xiàng),使用戶更好地控制計(jì)算機(jī)處理器中運(yùn)行的程序。Java在構(gòu)建大型復(fù)雜應(yīng)用程序方面頗為常用。JavaScript是通過Web瀏覽器訪問應(yīng)用程序的首選語言。還有無數(shù)其他語言根據(jù)各種不同的目的發(fā)展演化。但Python的殺手級功能——語法簡單,代碼易于學(xué)習(xí)和共享,且第三方軟件包極其龐大——使其成為一種優(yōu)秀的通用語言。廣泛的用戶和用途也體現(xiàn)出該語言運(yùn)用的多樣性。中央情報(bào)局將其用于黑客攻擊,Pixar用它制作電影,谷歌用它抓取網(wǎng)頁,Spotify用它推薦歌曲。 Some of the most alluring packages that Pythonistas can find in the Cheese Shop harness artificial intelligence (AI). Users can create neural networks, which mimic the connections in a brain, to pick out patterns in large quantities of data. Mr Van Rossum says that Python has become the language of choice for AI researchers, who have produced numerous packages for it. Python擁躉們可以在奶酪店中找到一些最具誘惑力的AI包。 用戶可以創(chuàng)建神經(jīng)網(wǎng)絡(luò),模仿大腦中的連接,從而在大量數(shù)據(jù)中找出相關(guān)模式。范·羅森表示,Python已成為人工智能研究人員的首選語言,他們已經(jīng)為此制作了大量軟件包。 Not all Pythonistas are so ambitious, though. Zach Sims, Codecademy’s boss, believes many visitors to his website are attempting to acquire skills that could help them in what are conventionally seen as “non-technical” jobs. Marketers, for instance, can use the language to build statistical models that measure the effectiveness of campaigns. College lecturers can check whether they are distributing grades properly. (Even journalists on The Economist, scraping the web for data, generally use programs written in Python to do so.) 然而,不是所有的Python 擁躉們都如此雄心勃勃。編程學(xué)院網(wǎng)站的老板扎克·西姆斯(Zach Sims)認(rèn)為,該網(wǎng)站上的許多訪問者都試圖獲得一些技能從而幫助他們從事傳統(tǒng)意義上的 “非技術(shù)”性的工作。例如,營銷人員可以使用該語言,建立統(tǒng)計(jì)模型,測算營銷活動(dòng)的有效性。大學(xué)講師可以檢查自己是否給學(xué)生正確評分。(即使是“經(jīng)濟(jì)學(xué)人”的記者,通常也會使用Python編寫的程序在網(wǎng)上搜索數(shù)據(jù)。) For professions that have long relied on trawling through spreadsheets, Python is especially valuable. Citigroup, an American bank, has introduced a crash course in Python for its trainee analysts. A jobs website, eFinancialCareers, reports a near-fourfold increase in listings mentioning Python between the first quarters of 2015 and 2018. 對于長期依賴通過電子表格來查閱信息的專業(yè)人士來說,Python也是特別有價(jià)值的。美國花旗銀行已經(jīng)給實(shí)習(xí)分析師引入Python的速成課了。求職網(wǎng)站eFinancialCareers報(bào)告稱,從2015年第一季度到2018年,提及Python的公司增加了近四倍。 The thirst for these skills is not without risk. Cesar Brea, a partner at Bain & Company, a consultancy, warns that the scariest thing in his trade is “someone who has learned a tool but doesn’t know what is going on under the hood”. Without proper oversight, a novice playing with AI libraries could reach dodgy conclusions. Bernd Ziegler, a partner at Boston Consulting Group, says that his firm reserves such analysis to members of its data team. 對這些技能的渴求總與風(fēng)險(xiǎn)相伴。貝恩咨詢公司(Bain&Company)的合伙人塞薩爾·布雷亞(Cesar Brea)提醒道,他經(jīng)歷的交易中最可怕的事情是“人們學(xué)會了一種工具,卻不知道后臺到底發(fā)生了什么”。 如果沒有適當(dāng)?shù)谋O(jiān)督,那些玩AI庫的新手可能會得出危險(xiǎn)的結(jié)論。 波士頓咨詢集團(tuán)(Boston Consulting Group)的合伙人貝恩德·齊格勒 (Bernd Ziegler)表示,他的公司只會向其數(shù)據(jù)團(tuán)隊(duì)的成員保留此類分析。 Rossum’s universal robot 羅素姆萬能機(jī)器人 注釋:1921年捷克劇作家卡爾.恰佩克(KarlCapek)在名為《羅素姆萬能機(jī)器人》(Rossums Universal Robot)的戲劇作品中創(chuàng)造了“robot”(機(jī)器人)這個(gè)名詞。這個(gè)詞源于捷克語的“robota”,意思是“苦力”。在該劇的結(jié)尾,機(jī)器人接管了地球,并毀滅了它們的創(chuàng)造者。 One solution to the problem of semi-educated tinkerers is to educate them properly in the language’s arcana. Python was already the most popular introductory language at American universities in 2014, but the teaching of it is generally limited to those studying science, technology, engineering and mathematics. A more radical proposal is to catch ’em young by offering computer science to all, and in primary schools. Hadi Partovi, the boss of Code.org, a charity, notes that 40% of American schools now offer such lessons, up from 10% in 2013. Around two-thirds of 10- to 12-year-olds have an account on Code.org’s website. Perhaps unnerved by a future filled with automated jobs, 90% of American parents want their children to study computer science. 一種解決方法就是教半吊子的學(xué)習(xí)者正確理解Python語言的奧秘。2014年,Python就已經(jīng)是美國大學(xué)里最受歡迎的入門語言,但是學(xué)習(xí)者大多都局限于有著理學(xué),工學(xué),工程師和數(shù)學(xué)背景的學(xué)生。更徹底的方法則是從娃娃抓起,在所有小學(xué)里普及計(jì)算機(jī)課。慈善機(jī)構(gòu)Code.org的總裁哈迪·帕托維(Hadi Patrovi)指出,現(xiàn)在40%的美國學(xué)校都提供相關(guān)課程, 高于2013年的10%。美國約有三分之二的10到12歲的孩子有code.org的賬戶?;蛟S是擔(dān)心未來的工作都與自動(dòng)化有關(guān),90%的美國家長都想讓他們的孩子學(xué)習(xí)計(jì)算機(jī)科學(xué)。 How much longer Python’s rise will continue is anybody’s guess. There have been dominant computer languages in the past that, while not exactly “one with Nineveh and Tyre”, now skulk in the background. In the 1960s, Fortran bestrode the world. As teaching languages for neophytes, both Basic and Pascal had their moments in the sun. And Mr Partovi himself plumped for JavaScript as the language for Code.org’s core syllabus, since it remains the standard choice for animating web pages. 大家都在猜測Python還能火多久。曾經(jīng)也有一些計(jì)算機(jī)語言紅極一時(shí),現(xiàn)在雖不至于變成昨日黃花,但也已經(jīng)慢慢淡出。在20世紀(jì)60年代,F(xiàn)ortran匯編語言風(fēng)靡世界。至于新手教材語言,Basic和Pascal也都有他們?nèi)缛罩刑斓臅r(shí)候。帕托維自己仍把JavaScript選作Code.org的核心課程。因?yàn)樗允侵谱鲃?dòng)畫網(wǎng)頁們的標(biāo)桿語言。 注釋:one with Nineveh and Tyre,出自Rudyard Kiplin的詩集Recessional。原文如下:“Lo, all our pomp of yesterday Is one with Nineveh and Tyre!”大意指一切盛況都會變成過眼煙云。Nineveh、Tyre均為古城名。 No computing language can ever be truly general purpose. Specialisation will necessarily remain important. It is nevertheless true that, in that long-past Yuletide, Mr Van Rossum started something memorable. He isn’t the Messiah, but he was a very clever boy. 沒有哪種計(jì)算機(jī)語言可以真正通用于所有領(lǐng)域。專業(yè)細(xì)分依然十分重要。然而,在那個(gè)圣誕節(jié)期間,范·羅森確實(shí)著手干了件值得紀(jì)念的大事。他不是救世主,但他的確是一個(gè)非常聰明的人。 注釋:Messiah 彌賽亞,圣經(jīng)中猶太民族的拯救者??芍妇刃?、救世主。 翻譯組: Frank,男,小碩,經(jīng)濟(jì)學(xué)人愛好者 Xingyi,男,小碩,經(jīng)濟(jì)學(xué)人愛好者 Helga,女,筆譯民工,經(jīng)濟(jì)學(xué)人愛好者 Vambie,女,互聯(lián)網(wǎng)民工,經(jīng)濟(jì)學(xué)人粉絲 校核組: Li Xia, 女, HR, 經(jīng)濟(jì)學(xué)人發(fā)燒友 Yifei:女,英專碩士,專八,catti二筆 3 觀點(diǎn)|評論|思考 本次觀點(diǎn)由Joel獨(dú)家奉獻(xiàn) Joel,男,數(shù)據(jù)分析,科技類外刊愛好者 世界上主流的編程語言有很多種,我覺得Python是最人性化的,閱讀一個(gè)良好的Python程序就感覺像是在讀英語一樣。它使你能夠?qū)W⒂诮鉀Q問題而不是去搞明白語言本身。 編程語言是人類寫給編譯器看的,編譯器編譯后“傻不拉幾”的計(jì)算機(jī)才能讀懂人類要表達(dá)的意思(計(jì)算機(jī)只能讀懂0和1),在目前主流的編程語言中,Python是最接近自然語言的,省掉繁雜的標(biāo)點(diǎn)符號,簡潔明了。另外Python也是一種膠水語言,它能夠很輕松的把用其他語言制作的各種模塊(尤其是C/C++)輕松地聯(lián)結(jié)在一起,方便高效。 最后我用Python之禪的前半部分結(jié)束簡短的感想: 優(yōu)美勝于丑陋, 明了勝于晦澀。 簡潔勝于復(fù)雜, 復(fù)雜勝于凌亂。 扁平勝于嵌套, 稀疏勝于密繁。 可讀性很重要! The Zen of Python Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. 4 愿景 小組 現(xiàn)有一經(jīng)濟(jì)學(xué)人大群,如果您也有興趣,可聯(lián)系小編WeChat : foxwulihua。 |
|