欢迎访问译联翻译公司!  联系邮箱:fanyi@translian.com
当前位置:首页 > 新闻动态 > 译联动态

新闻动态 / NEWS

在线咨询 / ONLINE CHAT



广州经济翻译公司:让“算法”助你提高效率

作者: 来源: 日期:2016/8/29 8:30:39

An algorithm for getting through your to-do list

让“算法”助你提高效率

 

广州经济翻译公司:我们都有过忙乱但一事无成的日子。能从计算机原理借鉴什么解决方案?答案是我们至少可以少打断自己。

 

Can computer scientists — the people who think about the foundations of computing and programming — help us to solve human problems such as having too many things to do, and not enough time in which to do them?

计算机科学家们——那些研究计算机和编程的原理的人,能否帮助我们解决人类的问题,例如,要做的事太多,可用的时间却不够?广州经济翻译公司。

 

That’s the premise of Algorithms to Live By, a book by Brian Christian and Tom Griffiths. It’s an appealing idea to any economist. We tend to think of everyday decisions as a branch of applied mathematics, which is what computer science is.

这是布莱恩·克里斯蒂安(Brian Christian)和汤姆·格里菲斯(Tom Griffiths)合著的新书《赖以生存的算法》(Algorithms to Live By)中提出的主张。这是对任何经济学家都有吸引力的想法。我们倾向于认为日常决策是应用数学的一个分支,而计算机科学亦是如此。

 

To be clear, using computer science is not the same as using computers. Computer scientists have devoted decades to problems such as sorting information, setting priorities and networking. Many of the algorithms they have developed for computers can also work for human beings. An algorithm, after all, is not a computer program. It’s a structured procedure, a kind of recipe. (Algorithms are named after a 9th-century Persian mathematician, Al-Khwārizmī, but they predate his work by thousands of years.)

准确来说,利用计算机科学和使用计算机不是一回事。计算科学家倾注了数十年时间来解决各种问题,如整理信息、排定优先顺序和联网。他们为计算机开发的许多算法也适用于人类。毕竟,算法并非计算机程序,而是一种结构化的步骤方法,类似于“菜谱”。(“算法”一词因9世纪波斯数学家阿尔-花剌子模(Al-Khwārizmī)而得名,但在其研究工作的数千年前就已存在。)广州经济翻译公司。

 

So, what is the optimal recipe for working through the to-do list? Perhaps it is simpler than you think: do all the jobs on the list in any order, as it will take the same amount of time in the end. There is a touch of brilliance in this advice but it also seems to show that computer science will never shed light on the stress and wheel-spinning that we feel when we have too much to do.

那么,什么是完成待办事项列表的最佳配方呢?也许比你以为的更简单:以任意顺序来做列表上的事,因为最后耗费的总时长一样。这是个带有一点儿天才的建议,但似乎表明,当我们有太多事情要做而感到压力和手忙脚乱时,计算机科学永远不能给我们带来启示。

 

Or so I thought. Then I read a 1970 paper by the computer scientist Peter Denning, which describes a problem that computers can have when multitasking. Most computers do not literally multitask; instead, like humans, they switch rapidly between one thing and another. A computer will flit between updating your screen with a Pokémon, downloading more videos from the internet, and checking to see if you have clicked the keyboard or moved the mouse, among many other processes. But even a computer cannot do an unlimited number of tasks and, at a certain point, disaster can strike.

或者说我以前是这么认为的。接着我读到计算机科学家彼得·丹宁(Peter Denning)1970年发表的一篇论文,文中描述了计算机在多线程工作时可能遇到的一个问题。大多数计算机实际上无法真的多线程工作;而是像人类一样,会迅速从一件事切换到另一件事。计算机会在以下任务中快速切换:在你的屏幕上更新口袋妖怪(Pokémon)游戏、从网络下载更多视频、检查你是否敲击了键盘或挪动了鼠标,以及其它许多进程。但即使是计算机,也不能同时做无限量的工作,一旦达到某一限度,灾难就会发生。广州经济翻译公司。

 

The problem stems from the use of readily accessible “caches” to store data. To understand caches, imagine a pianist playing from two or three sheets of music in front of her. Those sheets are in the fastest cache. There are other sheets behind them, accessible in a few moments. Then there are larger but slower caches: music in the piano stool; more up in the attic, and yet more in a music shop. There is a trade-off between the volume of information and the speed with which it can be accessed.

这一问题源于使用易存取的“高速缓存”(caches)来储存数据。可以这么理解“高速缓存”:想象有一名钢琴家在演奏她面前的两页或三页乐谱。这些乐谱都是储存在最高速的缓存中。乐谱背后还有其他乐谱,一会儿就能读取。此外还有容量更大但速度更慢些的缓存:放在琴凳里的乐谱;阁楼上还有更多乐谱,再有更多是存放在音乐商店里。在信息储存量和读取速度之间存在一种取舍。

 

This set-up is no problem if the pianist only plays one complete piece at a time. But if she is asked to switch every minute or so, then some of her time will be taken retrieving a piece of music from the piano stool. If she must change every few seconds, then she will be unable to play a note; all her time will be taken switching sheet music between the stand and the piano stool.

如果钢琴家一次只演奏一首完整的乐曲,那么这样的设置是没有问题的。但是,如果要求她每隔1分钟左右换一首曲子,那么她就要花一些时间来取出琴凳里乐谱。如果她必须每隔几秒就换一首曲子,那她就没法演奏了;她所有的时间都会被用来调换谱架上和琴凳里的乐谱。广州经济翻译公司。

 

It is the same with a computer cache: there will be a hierarchy — from super-fast memory in the microprocessor itself all the way down to a hard drive (slow) and offsite back-up (very slow). To speed things up, the computer will copy the data it needs for the current task into a fast cache. If the tasks need to be switched too often, the machine will spend all its time copying data for one task into the cache, only to switch tasks, wipe the cache and fill it with something new. At the limit, nothing will ever be achieved. Denning described this regrettable state of affairs as “thrashing”.

这跟计算机的高速缓存一样:存在一个等级制度——从微处理器自身的超高速内存,向下一直到硬盘(慢速)和异地备份(非常慢)。要想提高速度,计算机必须把当前任务所需的数据复制到快速缓存。如果任务切换太频繁,机器会把所有时间用来将一个任务的数据复制到缓存,然后切换任务、清除缓存并存入新的内容。在极限状态下,什么事都完成不了。丹宁将这种令人遗憾的状态形容为“系统崩溃”(thrashing)

 

We’ve all had days filled with nothing but thrashing, constantly switching focus from one task to another but never actually doing anything. Can we borrow a solution from the computers? The most straightforward solution is to get a bigger cache; that is easier for a computer than for a human, alas.

我们都有过除了崩溃以外一事无成的日子,不断从一项任务切换到另一项,实际上却什么都做不了。我们能否从计算机借鉴解决方案?最直截了当的方法是换个更大的缓存;可惜,这对计算机来说比人类更容易。广州经济翻译公司。

 

The obvious alternative is to switch tasks less often. Computers practice “interrupt coalescing”, or lumping little tasks together. A shopping list helps prevent unnecessary return trips to the shop. You can put your bills in a pile and deal with them once a month.

显而易见的替代方法是减少任务切换。计算机采用“中断合并”(interrupt coalescing)技术,即把多个小任务合并到一起处理。一份购物清单有助于避免多次往返商店的不必要旅程。你还可以把账单放在一块儿,每月一并处理。

 

But we often find it difficult not to flit from one task to another. Computer science says there’s a reason for the pain: there is a trade-off between being swiftly responsive and marking out chunks of time to be productive. If you want to respond to your boss’s emails within five minutes, you must check email at least once every five minutes. If you want to go off-grid for a week to work on your novel, your response time must slow to a week.

但我们往往发现很难不从一个任务切换到另一个。计算机科学认为这种痛苦有一个原因:即在迅速响应和划出大块时间以提高生产率之间存在取舍。如果你想在5分钟之内回复你老板的邮件,你必须至少每5分钟查一次邮件。如果你想戒网一周来写小说,那么你的响应时间就必须放慢至一周。广州经济翻译公司。

 

Any solution should acknowledge that trade-off. Decide on an acceptable response time and interrupt yourself accordingly. If you think it’s perfectly fine to answer emails within four hours — fine by most standards — then you only need to check your email once every four hours, not once every four minutes. As Christian and Griffiths advise, decide how responsive you want to be. If you want to get things done, be no more responsive than that.

任何解决方案都应该承认这种取舍。确定一个可接受的响应时间,然后据此打断自己的工作。如果你认为在4小时之内回复邮件完全没有问题(按多数标准都没问题),那么你只需要每4个小时查一次邮件,而不是每4分钟查一次。正如克里斯蒂安和格里菲斯建议的那样,决定自己想要如何响应。如果你想好好做点事情,就别超过那个响应标准。

 

Tim Harford is the author of ‘The Undercover Economist Strikes Back’.

本文作者著有《卧底经济学家反击战》(The Undercover Economist Strikes Back)一书,他的Twitter账号是@TimHarford

 

广州经济翻译公司

本文由:译联广州翻译公司免费发布:供学习参考,禁止商用与转载。