星期一, 二月 17, 2014

什么是P问题、NP问题和NPC问题

http://www.matrix67.com/blog/archives/105
    这或许是众多OIer最大的误区之一。
    你会经常看到网上出现“这怎么做,这不是NP问题吗”、“这个只有搜了,这已经被证明是NP问题了”之类的话。你要知道,大多数人此时所说的NP问题其实都是指的NPC问题。他们没有搞清楚NP问题和NPC问题的概念。NP问题并不是那种“只有搜才行”的问题,NPC问题才是。好,行了,基本上这个误解已经被澄清了。下面的内容都是在讲什么是P问题,什么是NP问题,什么是NPC问题,你如果不是很感兴趣就可以不看了。接下来你可以看到,把NP问题当成是 NPC问题是一个多大的错误。

    还是先用几句话简单说明一下时间复杂度。时间复杂度并不是表示一个程序解决问题需要花多少时间,而是当问题规模扩大后,程序需要的时间长度增长得有多快。也就是说,对于高速处理数据的计算机来说,处理某一个特定数据的效率不能衡量一个程序的好坏,而应该看当这个数据的规模变大到数百倍后,程序运行时间是否还是一样,或者也跟着慢了数百倍,或者变慢了数万倍。不管数据有多大,程序处理花的时间始终是那么多的,我们就说这个程序很好,具有O(1)的时间复杂度,也称常数级复杂度;数据规模变得有多大,花的时间也跟着变得有多长,这个程序的时间复杂度就是O(n),比如找n个数中的最大值;而像冒泡排序、插入排序等,数据扩大2倍,时间变慢4倍的,属于O(n^2)的复杂度。还有一些穷举类的算法,所需时间长度成几何阶数上涨,这就是O(a^n)的指数级复杂度,甚至O(n!)的阶乘级复杂度。不会存在O(2*n^2)的复杂度,因为前面的那个“2”是系数,根本不会影响到整个程序的时间增长。同样地,O (n^3+n^2)的复杂度也就是O(n^3)的复杂度。因此,我们会说,一个O(0.01*n^3)的程序的效率比O(100*n^2)的效率低,尽管在n很小的时候,前者优于后者,但后者时间随数据规模增长得慢,最终O(n^3)的复杂度将远远超过O(n^2)。我们也说,O(n^100)的复杂度小于O(1.01^n)的复杂度。
    容易看出,前面的几类复杂度被分为两种级别,其中后者的复杂度无论如何都远远大于前者:一种是O(1),O(log(n)),O(n^a)等,我们把它叫做多项式级的复杂度,因为它的规模n出现在底数的位置;另一种是O(a^n)和O(n!)型复杂度,它是非多项式级的,其复杂度计算机往往不能承受。当我们在解决一个问题时,我们选择的算法通常都需要是多项式级的复杂度,非多项式级的复杂度需要的时间太多,往往会超时,除非是数据规模非常小。

    自然地,人们会想到一个问题:会不会所有的问题都可以找到复杂度为多项式级的算法呢?很遗憾,答案是否定的。有些问题甚至根本不可能找到一个正确的算法来,这称之为“不可解问题”(Undecidable Decision Problem)。The Halting Problem就是一个著名的不可解问题,在我的Blog上有过专门的介绍和证明。再比如,输出从1到n这n个数的全排列。不管你用什么方法,你的复杂度都是阶乘级,因为你总得用阶乘级的时间打印出结果来。有人说,这样的“问题”不是一个“正规”的问题,正规的问题是让程序解决一个问题,输出一个“YES”或“NO”(这被称为判定性问题),或者一个什么什么的最优值(这被称为最优化问题)。那么,根据这个定义,我也能举出一个不大可能会有多项式级算法的问题来:Hamilton回路。问题是这样的:给你一个图,问你能否找到一条经过每个顶点一次且恰好一次(不遗漏也不重复)最后又走回来的路(满足这个条件的路径叫做Hamilton回路)。这个问题现在还没有找到多项式级的算法。事实上,这个问题就是我们后面要说的NPC问题。

    下面引入P类问题的概念:如果一个问题可以找到一个能在多项式的时间里解决它的算法,那么这个问题就属于P问题。P是英文单词多项式的第一个字母。哪些问题是P类问题呢?通常NOI和NOIP不会出不属于P类问题的题目。我们常见到的一些信息奥赛的题目都是P问题。道理很简单,一个用穷举换来的非多项式级时间的超时程序不会涵盖任何有价值的算法。
    接下来引入NP问题的概念。这个就有点难理解了,或者说容易理解错误。在这里强调(回到我竭力想澄清的误区上),NP问题不是非P类问题。NP问题是指可以在多项式的时间里验证一个解的问题。NP问题的另一个定义是,可以在多项式的时间里猜出一个解的问题。比方说,我RP很好,在程序中需要枚举时,我可以一猜一个准。现在某人拿到了一个求最短路径的问题,问从起点到终点是否有一条小于100个单位长度的路线。它根据数据画好了图,但怎么也算不出来,于是来问我:你看怎么选条路走得最少?我说,我RP很好,肯定能随便给你指条很短的路出来。然后我就胡乱画了几条线,说就这条吧。那人按我指的这条把权值加起来一看,嘿,神了,路径长度98,比100小。于是答案出来了,存在比100小的路径。别人会问他这题怎么做出来的,他就可以说,因为我找到了一个比100 小的解。在这个题中,找一个解很困难,但验证一个解很容易。验证一个解只需要O(n)的时间复杂度,也就是说我可以花O(n)的时间把我猜的路径的长度加出来。那么,只要我RP好,猜得准,我一定能在多项式的时间里解决这个问题。我猜到的方案总是最优的,不满足题意的方案也不会来骗我去选它。这就是NP问题。当然有不是NP问题的问题,即你猜到了解但是没用,因为你不能在多项式的时间里去验证它。下面我要举的例子是一个经典的例子,它指出了一个目前还没有办法在多项式的时间里验证一个解的问题。很显然,前面所说的Hamilton回路是NP问题,因为验证一条路是否恰好经过了每一个顶点非常容易。但我要把问题换成这样:试问一个图中是否不存在Hamilton回路。这样问题就没法在多项式的时间里进行验证了,因为除非你试过所有的路,否则你不敢断定它“没有Hamilton回路”。
    之所以要定义NP问题,是因为通常只有NP问题才可能找到多项式的算法。我们不会指望一个连多项式地验证一个解都不行的问题存在一个解决它的多项式级的算法。相信读者很快明白,信息学中的号称最困难的问题——“NP问题”,实际上是在探讨NP问题与P类问题的关系。

    很显然,所有的P类问题都是NP问题。也就是说,能多项式地解决一个问题,必然能多项式地验证一个问题的解——既然正解都出来了,验证任意给定的解也只需要比较一下就可以了。关键是,人们想知道,是否所有的NP问题都是P类问题。我们可以再用集合的观点来说明。如果把所有P类问题归为一个集合P中,把所有 NP问题划进另一个集合NP中,那么,显然有P属于NP。现在,所有对NP问题的研究都集中在一个问题上,即究竟是否有P=NP?通常所谓的“NP问题”,其实就一句话:证明或推翻P=NP。
    NP问题一直都是信息学的巅峰。巅峰,意即很引人注目但难以解决。在信息学研究中,这是一个耗费了很多时间和精力也没有解决的终极问题,好比物理学中的大统一和数学中的歌德巴赫猜想等。
    目前为止这个问题还“啃不动”。但是,一个总的趋势、一个大方向是有的。人们普遍认为,P=NP不成立,也就是说,多数人相信,存在至少一个不可能有多项式级复杂度的算法的NP问题。人们如此坚信P≠NP是有原因的,就是在研究NP问题的过程中找出了一类非常特殊的NP问题叫做NP-完全问题,也即所谓的 NPC问题。C是英文单词“完全”的第一个字母。正是NPC问题的存在,使人们相信P≠NP。下文将花大量篇幅介绍NPC问题,你从中可以体会到NPC问题使P=NP变得多么不可思议。


    为了说明NPC问题,我们先引入一个概念——约化(Reducibility,有的资料上叫“归约”)。
    简单地说,一个问题A可以约化为问题B的含义即是,可以用问题B的解法解决问题A,或者说,问题A可以“变成”问题B。《算法导论》上举了这么一个例子。比如说,现在有两个问题:求解一个一元一次方程和求解一个一元二次方程。那么我们说,前者可以约化为后者,意即知道如何解一个一元二次方程那么一定能解出一元一次方程。我们可以写出两个程序分别对应两个问题,那么我们能找到一个“规则”,按照这个规则把解一元一次方程程序的输入数据变一下,用在解一元二次方程的程序上,两个程序总能得到一样的结果。这个规则即是:两个方程的对应项系数不变,一元二次方程的二次项系数为0。按照这个规则把前一个问题转换成后一个问题,两个问题就等价了。同样地,我们可以说,Hamilton回路可以约化为TSP问题(Travelling Salesman Problem,旅行商问题):在Hamilton回路问题中,两点相连即这两点距离为0,两点不直接相连则令其距离为1,于是问题转化为在TSP问题中,是否存在一条长为0的路径。Hamilton回路存在当且仅当TSP问题中存在长为0的回路。
    “问题A可约化为问题B”有一个重要的直观意义:B的时间复杂度高于或者等于A的时间复杂度。也就是说,问题A不比问题B难。这很容易理解。既然问题A能用问题B来解决,倘若B的时间复杂度比A的时间复杂度还低了,那A的算法就可以改进为B的算法,两者的时间复杂度还是相同。正如解一元二次方程比解一元一次方程难,因为解决前者的方法可以用来解决后者。
    很显然,约化具有一项重要的性质:约化具有传递性。如果问题A可约化为问题B,问题B可约化为问题C,则问题A一定可约化为问题C。这个道理非常简单,就不必阐述了。
    现在再来说一下约化的标准概念就不难理解了:如果能找到这样一个变化法则,对任意一个程序A的输入,都能按这个法则变换成程序B的输入,使两程序的输出相同,那么我们说,问题A可约化为问题B。
    当然,我们所说的“可约化”是指的可“多项式地”约化(Polynomial-time Reducible),即变换输入的方法是能在多项式的时间里完成的。约化的过程只有用多项式的时间完成才有意义。

    好了,从约化的定义中我们看到,一个问题约化为另一个问题,时间复杂度增加了,问题的应用范围也增大了。通过对某些问题的不断约化,我们能够不断寻找复杂度更高,但应用范围更广的算法来代替复杂度虽然低,但只能用于很小的一类问题的算法。再回想前面讲的P和NP问题,联想起约化的传递性,自然地,我们会想问,如果不断地约化上去,不断找到能“通吃”若干小NP问题的一个稍复杂的大NP问题,那么最后是否有可能找到一个时间复杂度最高,并且能“通吃”所有的 NP问题的这样一个超级NP问题?答案居然是肯定的。也就是说,存在这样一个NP问题,所有的NP问题都可以约化成它。换句话说,只要解决了这个问题,那么所有的NP问题都解决了。这种问题的存在难以置信,并且更加不可思议的是,这种问题不只一个,它有很多个,它是一类问题。这一类问题就是传说中的NPC 问题,也就是NP-完全问题。NPC问题的出现使整个NP问题的研究得到了飞跃式的发展。我们有理由相信,NPC问题是最复杂的问题。再次回到全文开头,我们可以看到,人们想表达一个问题不存在多项式的高效算法时应该说它“属于NPC问题”。此时,我的目的终于达到了,我已经把NP问题和NPC问题区别开了。到此为止,本文已经写了近5000字了,我佩服你还能看到这里来,同时也佩服一下自己能写到这里来。

    NPC问题的定义非常简单。同时满足下面两个条件的问题就是NPC问题。首先,它得是一个NP问题;然后,所有的NP问题都可以约化到它。证明一个问题是 NPC问题也很简单。先证明它至少是一个NP问题,再证明其中一个已知的NPC问题能约化到它(由约化的传递性,则NPC问题定义的第二条也得以满足;至于第一个NPC问题是怎么来的,下文将介绍),这样就可以说它是NPC问题了。
    既然所有的NP问题都能约化成NPC问题,那么只要任意一个NPC问题找到了一个多项式的算法,那么所有的NP问题都能用这个算法解决了,NP也就等于P 了。因此,给NPC找一个多项式算法太不可思议了。因此,前文才说,“正是NPC问题的存在,使人们相信P≠NP”。我们可以就此直观地理解,NPC问题目前没有多项式的有效算法,只能用指数级甚至阶乘级复杂度的搜索。

    顺便讲一下NP-Hard问题。NP-Hard问题是这样一种问题,它满足NPC问题定义的第二条但不一定要满足第一条(就是说,NP-Hard问题要比 NPC问题的范围广)。NP-Hard问题同样难以找到多项式的算法,但它不列入我们的研究范围,因为它不一定是NP问题。即使NPC问题发现了多项式级的算法,NP-Hard问题有可能仍然无法得到多项式级的算法。事实上,由于NP-Hard放宽了限定条件,它将有可能比所有的NPC问题的时间复杂度更高从而更难以解决。

    不要以为NPC问题是一纸空谈。NPC问题是存在的。确实有这么一个非常具体的问题属于NPC问题。下文即将介绍它。
    下文即将介绍逻辑电路问题。这是第一个NPC问题。其它的NPC问题都是由这个问题约化而来的。因此,逻辑电路问题是NPC类问题的“鼻祖”。
    逻辑电路问题是指的这样一个问题:给定一个逻辑电路,问是否存在一种输入使输出为True。
    什么叫做逻辑电路呢?一个逻辑电路由若干个输入,一个输出,若干“逻辑门”和密密麻麻的线组成。看下面一例,不需要解释你马上就明白了。
  ┌───┐
  │ 输入1├─→┐    ┌──┐
  └───┘    └─→┤    │
                      │ or ├→─┐
  ┌───┐    ┌─→┤    │    │    ┌──┐
  │ 输入2├─→┤    └──┘    └─→┤    │
  └───┘    │                ┌─→┤AND ├──→输出
                └────────┘┌→┤    │
  ┌───┐    ┌──┐            │  └──┘
  │ 输入3├─→┤ NOT├─→────┘
  └───┘    └──┘

    这是个较简单的逻辑电路,当输入1、输入2、输入3分别为True、True、False或False、True、False时,输出为True。
    有输出无论如何都不可能为True的逻辑电路吗?有。下面就是一个简单的例子。
  ┌───┐
  │输入1 ├→─┐    ┌──┐
  └───┘    └─→┤    │
                      │AND ├─→┐
                ┌─→┤    │    │
                │    └──┘    │  ┌──┐
                │                └→┤    │
  ┌───┐    │                    │AND ├─→输出
  │输入2 ├→─┤  ┌──┐      ┌→┤    │
  └───┘    └→┤NOT ├→──┘  └──┘
                    └──┘

    上面这个逻辑电路中,无论输入是什么,输出都是False。我们就说,这个逻辑电路不存在使输出为True的一组输入。
    回到上文,给定一个逻辑电路,问是否存在一种输入使输出为True,这即逻辑电路问题。
    逻辑电路问题属于NPC问题。这是有严格证明的。它显然属于NP问题,并且可以直接证明所有的NP问题都可以约化到它(不要以为NP问题有无穷多个将给证明造成不可逾越的困难)。证明过程相当复杂,其大概意思是说任意一个NP问题的输入和输出都可以转换成逻辑电路的输入和输出(想想计算机内部也不过是一些 0和1的运算),因此对于一个NP问题来说,问题转化为了求出满足结果为True的一个输入(即一个可行解)。

    有了第一个NPC问题后,一大堆NPC问题就出现了,因为再证明一个新的NPC问题只需要将一个已知的NPC问题约化到它就行了。后来,Hamilton 回路成了NPC问题,TSP问题也成了NPC问题。现在被证明是NPC问题的有很多,任何一个找到了多项式算法的话所有的NP问题都可以完美解决了。因此说,正是因为NPC问题的存在,P=NP变得难以置信。P=NP问题还有许多有趣的东西,有待大家自己进一步的挖掘。攀登这个信息学的巅峰是我们这一代的终极目标。现在我们需要做的,至少是不要把概念弄混淆了。

星期四, 十一月 07, 2013

How do I download or save a YouTube video to my computer?

Question

How do I download or save a YouTube video to my computer?

Answer

YouTube has been designed to only allow users to watch and view videos on their website. Many users want to save their favorite videos to their computer so they can watch them without being connected to the Internet or so they can watch them on other devices. Below are the steps required for downloading and watching YouTube videos on your computer for free.
Note: these steps are for saving a YouTube video and not saving only the audio of a YouTube video to an MP3 file.
Saving YouTube video as a video file on your computer
Today, there are several online websites that allow you to enter the URL of the video you wish to save to your computer, and get a link to download the file. Below is the simple three step process that will link you to a page that
1. Go to the YouTube video page and copy the URLof the video you wish to save. For example, below is a URL to a video on YouTube, the whole address would be copied.
http://www.youtube.com/watch?v=R3ymHMgFAps
2. Once this address has been copied, paste that URL into the below URL text field and click the Download Video button.
3. If done properly, a new window will open with available video formats that can be saved. For most users we suggest the MP4 format, other formats may include FLV, 3GP, and WebM.
Other YouTube download sites
In addition to using the above box to convert your videos there are also many other websites and services that will allow you to download YouTube videos. Below are just a few of our favorites.
Caution: These services can be used to save any flash videos online and can be used to save adult related videos, which unfortunately means when viewing these pages you may be subjected to adult related content.
Watching a FLV video on your computer
Once the .flv file has been downloaded to your computer, you'll need a player that supports .flv files. Below are a few suggestions.
VLC media player
http://www.videolan.org/
Windows Media Player
Microsoft Windows users also have the ability of playing FLV files in Windows Media player with the right codec. Downloading and installing theCCCP codec will install this codec, as well as many other codecs you'll likely need in the future.
Converting the YouTube video to a different movie format
There are dozens of different software programs and online services available that will allow you to convert FLV files into another format. Below is a short listing of some of the free services and products we recommend.
Media Convert - An excellent online service that can convert FLV files into dozens of other formats.
http://www.media-convert.com/
Vixy - Another great online service that allows you to download and save YouTube video files to another format.
http://vixy.net/

Additional information

  • See the YouTube definition for further information and related links.

星期二, 九月 03, 2013

Managing Your Advisor

 Author:  

With the new academic term almost upon us, several of my students started to put together a list of practical advice for incoming students—including various niceties such as how to gain access to the lab, how to get accounts, how to submit reimbursements, and so forth.  I wanted to contribute to the list of advice, and I figured I could offer some value by giving advice to new students about how to gain traction on their research as quickly as possible.  This post is the first in a series of a few posts on that topic; in this post, I will cover the topic of managing your advisor.
The notion of an advisor is an interesting concept for many new Ph.D. students.  Incoming graduate students typically have one of two backgrounds: some come straight from undergraduate studies (and, hence, may have never had a manager or a boss overseeing their career); others have spent some time in the workforce and have decided to return to the university and begin a career in research (and, hence, have some notion of what it is like to have a manager).  An advisor-student relationship is unique, though, and will be a new experience for both types of incoming students.  The relationship is similar to a manager relationship, but has several differentiating features.  First, your advisor is often a collaborator on equal footing.  Although an incoming Ph.D. student is not (yet) a peer of his or her advisor, the goal is that by the end of the Ph.D. process, the student and advisor will be peers.  In this sense, the Ph.D. is a true apprenticeship.  My students don’t work for me; they work with me.  Second, your advisor is not a manager in the strict sense, but is literally an advisor: You are in control of shaping your own graduate career, from what you choose to work on to who you work with.  Your advisor should be a catalyst and facilitator for your success and should not be treating you as an employee or “hired labor”.  Although some research contracts have deliverables, you should be suspicious of any advisor who wants to constantly hold you to tight deliverables, as it will constrain your autonomy and creativity; that type of advisor will ultimately be more like a manager, and you can find plenty of managers in industry who will pay you a much higher salary.  If you find that your advisor is bossing you around or restricting your autonomy or creativity, change advisors as soon as possible.
In any advisor or managerial context, it is important to recognize the importance of “managing up”.  While there may be strategic reasons to do this in any context, the most important reason to learn how to manage your advisor is to make the most of your graduate career.  Many things compete for your advisor’s attention—papers, grants, proposals, teaching, committees, other students, outside opportunities, etc.  At the same time, everyone’s Ph.D. experience is unique, and it is incumbent on you to work with your advisor to help you define your own trajectory and also to create a working relationship that works for both of you.
In my seven years as an advisor, I have learned a few things about my working style.  Here is some of the advice I have offered my students about how to manage me.  Many of these tips may be useful in general for other Ph.D. students who want to help build a better relationship with their advisor and help get the most out of their graduate careers:
  • Ask your advisor for what you need.  Want to attend a conference, get an introduction to a senior colleague in the field, buy a book or other equipment, find an internship, get a travel grant, or something else?  Be proactive.  The answer will be “yes” more often than you think .
  • Scheduling meetings. I have a Google calendar that I share with all of my students.  If a meeting or event is not on my calendar, the student should assume that the meeting is not happening, even if the meeting has been discussed (and agreed on!) in the hallway.  There is no way to keep track of hallway discussions for scheduling and they are quickly forgotten.  Though it’s not strictly necessary, I advise my students to consider sending a reminder/minutes/confirmation before the meeting; this relates to the point below on making meetings count.  Scheduling meetings sometimes can generate an explosion of email—this is a recipe for disaster and ensuring that you never get to meet your advisor (see below on email); if scheduling is proceeding slowly, limit the email thread to 1-2 emails before suggesting a meeting invitation by Google calendar.  If all else fails, send a meeting invitation during an open slot; in the worst case, your advisor will react by moving it to a time that works (it is on the calendar and thus can no longer be deferred indefinitely).
  • Try to meet your advisor once a week, even if you think you have nothing to talk about.  Make an effort to schedule a meeting once a week, even if the meeting is short; in my experience, I have found that sometimes even a ten-minute meeting with a student can make a huge difference for working around a mental block or changing an approach to a problem.  Do not assume that a meeting cannot happen simply because your advisor is not in town.  Short meetings by Google hangout are often very handy.  In fact, throughout the summer of 2013, I was rarely at Georgia Tech; many of my students actually found it easier to meet me when I was traveling because I wasn’t being constantly bombarded by things related to the daily drumbeat at the university (e.g.,committee meetings, interruptions from admins, teaching, etc.).  Consider having a meeting even if you think there’s nothing to report.  You may find you are stuck in a rathole, and you may not even realize it.  You should be particularly worried if you have spent 2-3 weeks “debugging” or on some “implementation” without getting any feedback.  Chances are, you are ratholing on something that probably isn’t getting you any closer to a publication.  Seek help immediately!
  • Attend every single group meeting.  Do not miss group meetings.  These are one of the most important structural elements of your graduate career that actually relates to your research.  Group meetings are important for several reasons: (1) You learn about what others in the group are doing, which may be a useful resource (or, you may find out you can be a resource to someone else).  This all helps with collaborating across the group. (2) You find out what your advisor has been up to and why he or she has not been replying to your emails immediately. (3) You can quickly identify if you need to have a longer meeting with your advisor, with other students in the group, etc.  This can be a huge timesaver.  (4) Group meetings mark the passage of time.  It is useful to hold yourself accountable and make sure that weeks and months don’t slip away without progress.  I have group meetings with my students three times a week; initially, I thought that this might be excessive, but it turns out to work pretty well.  Three short group meetings can often be a lot better than one extended group meeting.  I will expand on this more in a later post.
  • If you need more of your advisor’s time, ask for it.  Students are often confused or concerned that an advisor spends more time with some students than with others and may even (wrongly) think that the advisor is either less excited about a particular project or (worse) doesn’t like some students as much as others.  (I remember comparing notes with my fellow Ph.D. students in grad school about how much time our advisor was spending with each of us.)  Yet, it is important to remember that good advisors don’t play favorites.  The time that an advisor spends with a student (or on a project) is typically determined by the advisor’s perception of how much time is needed; the required time can vary dramatically according to both the stage of the project and the stage of the student’s development.  Students who are early in their careers typically need (and should be asking for) a lot of guidance and “closed loop” feedback.  Students who are close to graduating also tend to need more attention of a different sort—help with building their professional network, seeking out job prospects, practicing job talks, and generally landing on their feet.  Similarly, nascent research projects or projects with substantial coordination components (e.g., large systems-building efforts) often need a lot of advisor attention, since they have lots of moving parts and can involve coordination between multiple sub-projects and students. Do not be overly concerned about strict time accounting.  If you feel you need more time, simply ask for it—or, better yet, just try to take more time (walk into your advisor’s office, approach him or her on IM, send regular email updates…whatever it takes).  Advisors tend to spend more time with students who demand more of their time.
  • Keep your emails short and to the point.  Here is a simple rule of thumb: If the email is longer than one paragraph, it probably won’t get read right away, particularly if there is no summary at the beginning of it.  It almost certainly won’t get an immediate response.  Additionally, consider whether email is the fastest way to resolve something, or whether it’s quicker to have a 5-10 minute meeting, hangout, IM chat, phone call, or whatever.  Use the right communication mode for the job.
  • Do not assume that if your email doesn’t get a reply, it hasn’t been read.  I read everything in my inbox, almost always on the same day that it arrives.  Unfortunately, I also receive 300-500 emails per day in my inbox (not mailing lists), many of which are actionable.  Suppose that half of those emails required action, and that each one required one minute to process and respond to—that’s already six or seven hours a day just to process email.  That is insane and can kill anyone’s productivity.  I am convinced that it is possible for a professor to do nothing else in life except reply to email.  To control this insanity, I often process emails “in batch mode”—leaving email to (mostly) pile up for a few days and then responding to a bunch at once.  I tell my students that if they do not receive a reply right away, “retransmission” after a few days is fine. I do not consider this to be rude, nagging, or pestering behavior; most likely I have simply just forgotten (I have found that it’s surprisingly difficult to even keep a to do list for all of these things that students ask professors to do, as doing so becomes a monster mega-task in and of itself).  Before sending a retransmission (or initial email), however, consider whether you have chosen the best medium for your message. Sometimes an in-person meeting or IM follow up to a an email will get the response you want/need.
  • Make the meetings count.  Many meetings are wasted by not asking yourself simple “does this make sense?” questions before presenting a plot/result.  I ask my students to read Jon Bentley’s “Programming Pearls”, particularly the chapter on back of the envelope calculations.  Also, I advise my students to read Vern Paxson’s “Strategies for Sound Internet Measurement”. Your advisor has almost certainly seen a ton of plots/experiments/data and is pretty good at quickly determining whether a graph that you spent two days producing makes any sense at all.  You can have a more productive meeting if you do some simple debugging of plots before hand.  On this note, bringing specific, concrete things that your advisor can react to is helpful.  “I ran some experiments and things seem to look OK.” is a report I have heard many times from students.  Such a report is utterly useless.  Even if it were true (often things may not be OK), it is impossible to give feedback on or brainstorm based on vague statements.  You are likely to get a “sounds good!” in response, which is equally useless for you.  Bring something concrete to discuss.  You can present anything: A performance number, a paragraph of writing, a plot, … something to react to and figure out next steps.  Even a plot that appears buggy or inexplicable is sometimes a good topic for a meeting, too, presuming you’ve recognized the discrepancies and can’t figure out the problem.  Sometimes what appears to be a bug might in fact be an interesting artifact, or even the spark for a new paper or discovery.
  • Take notes and organize them. The students who make the best use of meetings tend to have: (1) an agenda beforehand; (2) minutes afterwards; (3) something focused and concrete to discuss/think about/talk about; (4) a consolidated place to keep minutes.  Your advisor can read these minutes to prepare for the upcoming meeting, think about problems offline, review/think about the problem outside of meetings, and guide progress.  Sometimes your advisor may take notes, sometimes not.  Don’t count on it.  Even if your advisor is taking notes, your notes will complement and fill in gaps.  Different people remember different things.  Taking notes is also an important opportunity to practice writing—and students need to practice writing at every opportunity (more on that in a later post).
  • Do not wait until the last minute to write your paper.  Most graduate students are working on one or at most two papers or projects at any given time.  It can thus be easy to overlook the fact  that your advisor is involved in many more things (albeit at a higher level) and, from a purely practical standpoint, might be submitting two or three papers to the same conference deadline. Thus, waiting until the last minute to write a paper draft (or complete a project) is an invitation for scattered, distracted, and superficial feedback (and severely diminished chances of a strong paper submission).   Can you write a good paper or think clearly while doing four things at once?  If not, consider your poor advisor, whose aging brain is no longer as agile as yours.  Write early, write often.  Writing is not a task that happens after the research is done; rather, it is part of the research and thinking process, not something that is done when the research is done.  Writing is part of the research.  I ask my students to have a complete paper draft at least one week before the deadline.  Nobody ever follows this advice, and I think that we can recognize that it is idealistic.  I’ve periodically threatened to ban paper submissions if there is no draft a week before; I don’t have the will to do that, although I know at least one of my collaborators who enforces this rule.  Still, the point remains: early attention == focused attention == good attention.
  • Do not ask for a recommendation letter with less than one week’s notice.  A letter takes at least an hour to write—longer if there is no earlier draft from another instance.  Short notice makes for letters that will probably not be as strong as they could be, because a good letter takes time to polish.  Consider writing the first draft yourself, or at least putting some points into bullet form or providing an up-to-date CV, for quick reference.  All of this stuff makes the letter stronger and easier to write.
This list is mostly based on tips and tricks that I have found work for me.  I refined this list of advice after a discussion with Professor Jennifer Rexford, who is also full of useful advice.  Jen’s advice for new graduate students is particularly useful; I am in strong agreement with her thoughts on the benefits of regularly coming to the lab and integrating with a research group.  I’m interested to hear what other tips and tricks people have for managing their advisor(s), or thoughts from other faculty members about tips they find that work well.  In the coming weeks and months, I will follow up with specific posts on advice for writing, preparing talks, and managing time.

Why Get a Ph.D.?

 Author:  

Someone once told me that he got his Ph.D. so that his job would never involve having to wear a suit or being at work by 9 a.m.  The statement is interesting for a couple of reasons.  On the one hand, the statement captures the career autonomy that having a Ph.D. can afford.  On the other, in my experience, the statement appears to be false.  Since finishing my Ph.D., I have sometimes needed to arrive at work well before 9 a.m., and below is a photo of me in a suit as proof that I didn’t manage to avoid that fate, either (in fairness, I don’t have to wear a suit very often, but the need sometimes arises).
What is a Ph.D.?
As new students arrive on campus this week, it’s a good time to discuss the nature of the journey that many Ph.D. students are about to begin.  It is not really possible to describe exactly what the Ph.D. experience will be like, since every Ph.D. program is different and, more importantly, everyone’s Ph.D. experience is quite personal.  Nevertheless, I wanted to write a little bit about what the Ph.D. is, some good reasons to get a Ph.D., and some good reasons not to get a Ph.D.
  • A degree signifying expertise (and experience). The Ph.D. acts as a signal to others that you have been through the particular process of writing a dissertation.  The process of creating knowledge and codifying it so that others can learn from your discoveries is something that every Ph.D. graduate goes through.  It signifies that you have acquired a particular skill set, hopefully involving the ability to identify important problems that are worth solving, a particular set problem solving skills, creativity, and the ability to clearly communicate your ideas.  It signifies that you have been through a unique process of creating new knowledge (see below).  If you wonder why certain employers favor Ph.D. graduates even when the job description does not involve research, this is one particular reason why.
  • An opportunity for a certain lifestyle. When I was a graduate student, I always thought that I had the best job in the world (the pay notwithstanding).  Perhaps being a postdoc is the best job in the world, because it has all of the perks of being a Ph.D. student, with considerably better pay.  As a graduate student (or postdoc), you have a unique opportunity to work on whatever problems you find interesting.  And, unlike your advisor, you can work on only one or two things at once and dive deep into those problems, hopefully unearthing new discoveries.  The autonomy that a life in research brings and the ability to work at the limits of your own creativity and ambition are rare privileges that many people do not enjoy in life.  Throughout life, you will meet many people who are unhappy in their jobs.  I can honestly say that I have never dreaded a day of work, and even though professors work very hard, you will be hard-pressed to find a professor who does not like his or her job.  I’m not sure I’ve met one.  I believe the reason for this is that we have jobs that never get boring, and if we are bored, we really have only ourselves to blame, since we can work on whatever we choose.  Being a professor carries certain perks over being a postdoc (e.g., more cachet, more autonomy, more pay), but it also brings with it more responsibility, more committees, and more work that can distract from research.  Despite the fact that professors often have three or more jobs (e.g., teaching, research, committees, and other service work), we are generally a very happy bunch.
  • A process.  As I mentioned above, the Ph.D. is a process of creating knowledge.  For the first time in your life, you have a chance to work on a problem that nobody has ever worked on before.  The answers are certainly not in a textbook, and the problem itself may not even be written down anywhere.  You are working at the frontier of human knowledge and understanding and trying to bump that frontier just a little bit further out.  The process of creating knowledge can be lonely and frightening, but many people (myself included) find it very exciting.  When you embark on a new project, you often have no idea what you will find, or whether what you are doing will even work.  The only thing you can be reasonably sure of is that you will learn something.  If that sounds exciting to you, you will probably enjoy the Ph.D.  If working outside the lines without someone telling you what to do and without a clear path to a known end goal makes you uncomfortable, you may find that the Ph.D. is not for you.
What can you do with a Ph.D.?
Academia. Although many people might assume that the main career path after gaining a Ph.D. is to become a professor, the truth of the matter is that most Ph.D. graduates do not become professors.  Yet, having a Ph.D. opens a wealth of opportunities.  Having been through the process I described above gives you an important set of skills that not many other people have acquired through such a long process.  Thus, a tenure-track faculty position is really only one possibility for post-graduate employment.  Many other employers are looking for the skill set that a Ph.D. graduate has acquired.  As a Ph.D. graduate, you have the unique opportunity to become research faculty, or faculty at a teaching university or college.  In fact, the main reason I decided to get my Ph.D. was because I deeply admired my undergraduate university professors and I wanted to emulate them—I thought I would like teaching, and I wanted to teach at the university level.  As I went down the path of getting my Ph.D., I discovered that I loved research as much, if not more, than teaching.  (In fact, I believe that research and teaching are extremely closely related to one another.  More on that in a later post.)
Industrial research labs. In addition to ensconcing yourself in the ivory tower, you can get a job at an industrial research lab (e.g., Microsoft Research).  A job at an industrial research lab often affords much of the autonomy of being a researcher in academia, although there are a few important differences.  One of the main differences is that you are not teaching courses on a regular basis.  Some consider this to be a bonus, as teaching is a significant time commitment; some believe that it disrupts their ability to do research.  On the other hand, I love teaching and I believe that the process of teaching (transferring knowledge) has an important feedback loop with research (creating knowledge), and I think I would really miss teaching if I were in a research lab.  Another important difference is that you are mainly working with your peers (other Ph.D. graduates, often within your own discipline), as opposed to working with a group of apprentices (i.e., your own students) and peers from other areas of computer science and even other disciplines.  Finally, another difference is that you typically do not have to apply for funding when you are working in an industrial research lab.  Many people do not like writing proposals and consider this a bonus.  I personally like writing proposals and consider it part of the research process—writing a proposal is the “planning” stage of research, where you outline a multi-year story and try to convince others that what you want to work on is a frontier of knowledge worth pursuing.  I view proposal writing as a useful tool to make sure that I’m not gaining tunnel vision and merely working “paper to paper”.  Others may find this process burdensome and find a job in an industrial lab more appealing.  Still, it is worth remembering that autonomy does not come for free: someone is paying for it.  If you are not writing the proposals to bring in the funding to determine what you are working on, someone else is bringing in that funding and ultimately may have some sway over what you can work on.  Many times, I have seen industrial research labs having to align their research projects with business units; sometimes the research labs are ultimately swallowed by the business units entirely (or worse, eliminated).  This is less of a danger at well-established research labs, but it can happen even there.
Government research labs. In addition to research jobs, another track you can pursue is a job at national government labs, which are like industrial research labs in some sense but receive their funding from the government, rather than the private sector.  Sometimes, government research work ends up being classified and difficult to publish, but sometimes it is not.  And, many people can find it exciting to work on classified projects.  I wouldn’t know much about this, as I don’t have a security clearance, although we have collaborated on one classified project before (which was an interesting process, since we were contributing to a classified project without being privy to the classified information).
A company of your own. In addition, you can start a company. Google began from Stanford’s Digital Library research project, for example.  Of course, Sergey Brin and Larry Page never finished their Ph.D.  You may find that this path turns out to be right for you.  Sometimes people say that you should work on your second-best idea for your Ph.D. and save the best one for your startup.  I think you should always be working on your best idea, for better ones are probably yet to come.  Needless to say, many startup ideas have come out of the Ph.D. process, and many of the skills acquired during the Ph.D. (creativity, working with uncertainty, communicating ideas, etc.) do transfer well to entrepreneurship.
What a Ph.D. is Not
A chance to take more classes. Some people enter the Ph.D. program as a chance to take more classes.  I have heard of cases of students getting bachelor’s degrees in other areas while completing their Ph.D. in computer science.  This is ridiculous; it is not what you come for, and if your advisor finds out you are doing this, he or she will likely not be pleased.  If you want to take more classes and get another degree, you should just go do that.  The research will be a distraction from your main goal.  I tend to encourage my students to complete their coursework as quickly as possible so that they can focus on research.
A “meanwhile” activity. If you enter a Ph.D. program simply because you do not like the “real world” or the thought of having a “real job”, or because you liked school but can’t figure out what you’d like to do with your life, you will almost certainly strongly dislike your Ph.D. experience, and you will probably not succeed.  A Ph.D. is not well defined.  There are no assignments and checklists.  There is no “homework” in the traditional sense.  Although you have an advisor whose job it is to guide you along your path, the path you take in your Ph.D. is ultimately deeply personal, and it is driven by your passions and interests (or lack thereof).  If you do not have a strong passion or the initiative to carry through your Ph.D. to completion, you will find the process to be very painful.  Your success (or failure) ultimately rests on your shoulders.
It is worth mentioning that obtaining the Ph.D. presents a serious financial opportunity cost.  For five (or more) years, you will be making about 20% of what your peers are making in industry out of college.  Furthermore, you will miss out of five years of raises and promotions on top of that higher salary that you could have been already making.  Ultimately, fifteen or twenty years later, you might close this gap, when you become a tenured professor and consulting and startup opportunities present themselves in abundance (should you decide that you want to spend your time on that).  Until then, unless you happen to be one of the fortunate few whose Ph.D. leads to the next breakthrough startup, you should plan on being financially set back from your friends and acquaintances who are in industry.  That is not to say that you will experience those setbacks, but if your goal is to become wealthy quickly, a Ph.D. is probably not the right career path for you.
A Personal Choice
Obtaining a Ph.D. is a deeply personal experience.  Your advisor will make sure that you are making progress (if he or she is doing the job well), but ultimately it is up to you to shape your experience.  To do well in the Ph.D. program, you need the passion for creating new knowledge and the tenacity to push your visions through to conclusions when the going gets tough.  Many people love the Ph.D. process.  For me, it was one of the best experiences in my life, and it has certainly shaped everything I’ve done going forward.  I would recommend it to anyone who shares many of the same attributes and goals that I have.  But, it’s also important to realize that the Ph.D. is not for everyone.  It might even take you some time and experience going through the process to realize that the Ph.D. is not for you; that is also perfectly alright.  There is absolutely no stigma in avoiding further sunk costs; at any time, you should be setting yourself on a path that gives you the best opportunities for success and happiness.  I hope these thoughts have helped you determine whether the Ph.D. is that path for you, but ultimately, it is difficult to know for sure until you have been through (or at least tried) the process yourself.

Time Management Tactics for Academics

Author: 

A distinguishing feature of a research career—particularly in academia—is the unstructured nature of the job.  Graduate students, research scientists, professors, and postdocs are generally masters of their own time.  Although this autonomy can be liberating, it can also result in tremendous inefficiency if one does not develop effective time-management tactics.  There are countless books on time management, and it is impossible to provide a comprehensive compendium of time-management tactics in a single post.  Hence, what I aim to do in this post is identify specific time management tactics that may be useful for academics (or anyone who works in an unstructured environment).  The tactics I have compiled below are the result of much reading on this topic over many years, as well as empirically determining what works for me.  Some of these tips are adapted from other readings, but most are simply tactics I’ve devised that seem to work well for me and I think might be useful for other academics and people in jobs where time is unstructured (and potentially unbounded).
Perhaps the most important characteristic of time that underscores the need for effective time management is that time is an asset that you are always spending, and it can never be replenished or replaced.  You have plenty of other assets: possessions, money, and so forth, but other assets can be replaced and replenished.  It is possible to save money or reduce spending; unfortunately, we have not yet figured out how to stop time, so we are always spending it,regardless of whether we want to or not.  It is always possible to make more money or acquire more possessions—but time that is spent can never be regained.   Thus, given that you are always spending time, the best you can hope to do is to always be making the best use of your time.  A question to repeatedly ask yourself is: “Is this the best use of my time right now?” By continually asking yourself this question, you can often correct course and spend your time in the best possible way.

Strategy: Make a plan and prioritize

The cliched metaphor that “time is money” turns out to be extremely useful for thinking about time management.  In planning how we spend our time, we can draw an analogy to financial goals.  In the same way that you might have a financial goal that requires financial strategic action (e.g., buying a house requires a savings plan), you might have a personal or career goal that requires strategic planning (e.g., obtaining a faculty job requires achieving various subgoals, each of which require a particular investment of time).  You may have multiple goals: in the same way that you may want to save enough money to buy a house and go on vacation, you might also want to have enough time to write the conference paper and spend time with your family.  Achieving (and balancing) these goals requires careful, meticulous prioritization and planning.  Given a plan, it is much easier to budget time and make strategic decisions.  Continuing the financial analogy: without a budget, it can be difficult to know whether you can afford the expensive dinner and a weekend away, but a budget makes these questions easy to answer.  Similarly, without a time budget, it may be difficult to determine whether accepting an invitation to review a paper is the best use of your time (and whether you have the time to do it in the first place).  With a plan in place, these decisions become much easier.
Priorities are an important part of any time management plan.  Decide what’s important in your life.  What will be your top priorities?  Some academics may make regular publication in the top conference the utmost priority.  Others may place higher emphasis on technology transfer and entrepreneurship.  Still others may place more value on teaching.  Likewise, you may have career goals, such as landing a faculty position, or attaining a coveted fellowship.  What is important to you?  How important is it to you?  Make some decisions and use those priorities to help you formulate a time plan.  Although priorities naturally will differ from person to person, I might suggest one thing: Personal health, well-being, family, and friends should come above all other goals.  Without these things in life, you will not be successful, nor will you be able to enjoy your successes.  There’s no point to becoming wildly successful if your health deteriorates and you become unhappy or ineffective mid-career.  Likewise, your family and friends count on you for support, and you will need their support when the going gets tough, as well.  Without this support network, you will never be successful.  Thus, above all else, take care of yourself and make personal interrupts a top priority.  With that said, I’ll offer some tactics that I’ve found to be really effective for implementing my time management plans.

Tactics: Apply the “Five Bs”

Having a plan in place is helpful, but you also need tactics to help you execute your plan.  This is where I find that there are certain time-management tactics that are particularly helpful in the academic environment.  I call my tactics the “five Bs”: bits, budgets, buffers, bounds, and barriers.  
Bits.  Time is fluid and continuous and should be treated as such.  Unfortunately, most of us have a tendency to schedule tasks into fixed, discrete time blocks that are generally too rigid and too large.  For example, a common practice might be to schedule a meeting, lunch, or some other activity for an hour.  Most of these activities don’t take an hour, so time is wasted “ramping up” and “winding down”, since activities tend to fill the time allotted for them, regardless of how much time they actually require.  If something happens to end early or take less time,  we end up wasting the extra allotted time.  For example, if a meeting ends “early”, we might use the extra found time to get a coffee, browse Slashdot, or otherwise spend time in a way that is not the best use of our time (thus violating the main criteria).   To solve this problem, I recommend viewing time as a much more fluid resource, or at least one that can be spent in smaller bits.
  • Maintain a list of tasks that can be accomplished in short time “bits”. Most tasks do not take an hour, and often significant progress can be made in a very small amount of time.  When you find that you have a bit of time (e.g., ten minutes), use the time to knock something off your list.  Note that bit tasks need not be insignificant: You can take a larger task and divide it into bits.  For example, instead of having a task on your to-do list such as “write the conference paper” or even “write the introduction to the conference paper”, you might have a task like “write a paragraph for the introduction of the conference paper”.  These bit tasks are less daunting (thus, easier to get started on), and you can do them in the little bits of found time throughout the day.  You will be surprised how many “time bits” you have during the day and how much you can accomplish by breaking tasks into these bits.
  • Before taking a break, use a time bit to start a new task.  One of the most difficult aspects of getting things done is getting started.  I find it can be incredibly difficult to get back “into the zone” after taking a break, or when shifting from one task to another.  Therefore, I try not to align my tasks on discrete boundaries like hours.  Rather, I use my time bits to start a new significant task.  Consider the following: You have ten minutes before your next meeting.  You could take a break, talk to your colleague, get a coffee, etc.—or you could use the ten minutes to get started on your next task.  If you have a smaller task on your “time bits list” that involves getting started on a bigger task (e.g., writing the first paragraph of the paper intro), then you can use the time to get started on a task, which is often the hardest part.  When you come back later (e.g., at the top of the hour, after your meeting ends), you’re already started!  I find that using time bits to make a concrete (however small) start on a larger task almost eliminates the cost of context switching later.
Budgets.  Spend your time well.  This does not mean that you have to work nonstop (see below on “barriers”, for example).  What it does mean is that you should be purposeful in how you are spending your time.  Your purpose may be to make progress on a conference paper, a piece of code, or some other task; or, your purpose might actually be leisure or relaxation.  The point isn’t to work yourself into the ground, but rather to always have a purpose with how you are spending your time.  With this in mind, I apply two specific tactics:
  • Have a purpose.  Always have a goal, and spend your time with that goal in mind.  You need long-term goals and short-term goals.  For example, a long-term goal might be to finish a conference paper, achieve a promotion, or train for a marathon.  A short-term goal (e.g., for an afternoon) might be to finish an assignment, piece of code, or section of a paper; or, it might be to drop work entirely and recharge.  Have a goal and be purposeful about how you spend time in pursuit of that goal.
  • When it comes to meetings, demand an agenda. This tactic is almost the same as having a purpose, but it is particularly useful for graduate students and faculty members.  I now refuse to attend meetings for which there is no set agenda in advance.  An agenda gives clarity of purpose to a meeting, and it is also a plan for how the time will be spent.  It makes the need for the meeting clear, it allows for immediate and efficient use of meeting time, and—most importantly—it makes it clear when the meeting is over.  Once the agenda is complete, the meeting is over.  If it takes an hour, that’s fine.  If it takes ten minutes, that’s also fine.  Without an agenda, a meeting can drag on to fill the time allotted; this steals time away from your opportunity to accomplish tasks with time bits.  Use agendas to make efficient use of meeting time.
Buffers.  It can be tempting to pack meetings back-to-back, one after another on hourly boundaries.  This is, in my opinion, an awful way to schedule time.  Instead, I try to use time buffers to make better use of my time:
  • Create time buffers in between scheduled activities.  I recommend scheduling a 50% time buffer for any activity.  If you think a meeting will take 20 minutes, schedule 30.  If you think an activity will require 60 minutes, schedule 90.  This rule applies to pretty much everything: meetings, dentist appointments, dinner engagements, etc.  We can sometimes have a tendency to pack engagements tightly, but this often results in stress, lateness, and frantic thought and action.  There may be some apprehension about scheduling time buffers: one might think, for example, that if a 90-minute slot is scheduled for a meeting that only goes 60 minutes, then the extra time is “wasted”.  To the contrary!  Applying the time bits strategy above can make these extra found times in the time buffers incredibly useful for accomplishing important tasks.
  • Show up early.  If you have time buffers in between activities, you can actually be early to your next activity, rather than frantically running from one thing to the next.  This ensures that you are composed and focused for your next activity, rather than frazzled and behind.  Showing up early also need not involve “wasting” time if you have useful items on your time bits list that accomplish if you happen to be five or ten minutes early.
From a personal perspective, having a time buffer is also a good idea: it can take a bit of time to “change modes” at the end of the work day (or work week); your family will appreciate it much more if you buffer some time to change modes.
Bounds.  Creating time bounds is perhaps one of the most important time management tasks that an academic can learn.  The academic lifestyle can go unbounded.  It is always possible to write another paper, perfect the lecture notes further, write another proposal, and so forth.  The sky is the limit, and the sky is boundless.  It can be tempting to continue to say yes, to keep working after diminishing returns have set in, and so forth.  It is critical to set bounds.  Here are some tactics that I use for setting bounds:
  • Do not let the perfect be the enemy of the timely.  I encounter this problem regularly and I am guilty of violating this principle myself.  An example where this creeps up in academic life is paper reviewing.  It’s possible to write ultra-thorough, thoughtful reviews and spend hours fine-tuning and perfecting your feedback.  But, at some point you hit diminishing returns.  And, if you don’t manage your time wisely, you will be late with your reviews and annoy the people who are counting on you.  I have been guilty of this myself.  Try to keep in mind that sometimes it’s more important to be timely than it is to be perfect.  Plus, being perfect is not attainable, but being timely is.
  • Use a deadline as a bound for declaring victory; create a deadline if one doesn’t exist. Sometimes deadlines are explicit (e.g., review deadlines, paper deadlines).  If you are working on a task that does not have a bound (e.g., a journal paper), make one.  Declare a date or time by which you will be done and stick to it.  This will ensure that you do not over-optimize.  There is a definitely 80-20 phenomenon in research.  Setting deadlines will help you ensure that you are not stuck in the realm of diminishing returns.  Set deadlines and bounds on the lengths of meetings, how much time you will spend on an email thread, etc.  Do not be afraid to declare victory once the time is up.
  • Beware of time thieves, particularly those that masquerade as “productive activities”. Many interrupt-driven activities steal our time in fits and spurts.  Email is perhaps the most notorious of these thieves.  Of course, sometimes an email thread is useful: correspondence with a colleague can result in refinement of an idea, clarity of thought, and so forth.   But, this is the exception.  Most of the time, replying to email is a Sisyphean task that simply generates more email.  By the end of the day, we’ve done nothing but reply to email, sometimes to limited effect. Be particularly wary of email threads without a clear purpose, and look out for email threads that will resolve themselves without your involvement.  I make it a point to identify whether an email mightresolve itself.  If there’s even a small chance the issue will resolve itself, I will wait to reply.   (We’ve all seen this phenomenon: Someone sends you a frantic email about some issue that has to be solved now, only to send you an email 30 minutes later letting you know that it was all a mistake or that they’ve figured out the problem themselves.  I clear these threads from my deck with one stroke of the delete key!)  I also try to identify whether email is the most efficient mode for resolving the problem.  Just because someone contacts you by email does not mean you have to reply, and just because someone contacts you by email does not mean you need to reply by email.  For example, sometimes a phone call, IM, or in-person chat is faster and more effective.  Also, I recommend only replying to email at certain times (e.g., morning, lunchtime, and end-of-day).   You might think that people “expect you to reply right away”.  Don’t worry—when you stop replying immediately, people stop expecting an immediate reply.  If something is truly urgent (i.e., can’t wait a couple of hours), people will find another way to contact you.  Most things are not that urgent anyway and can wait a few hours for a reply.
  • Be purposeful about online (and other passive) “leisure” activities.  Sure, we all like to browse the web from time to time.  But, even for these types of “leisure”, it helps to be purposeful.  Leisurely is not the same as aimless.  Social media sites like Facebook are particularly amenable to aimless time-wasting.  Track your time on these sites using tools like StayFocusd, TimeStats, and so forth.   Upon more careful accounting, you might end up finding that the cost of the time wasted far outstrips any “benefit” that these sites might provide.  If there are sites where you find yourself spending lots of aimless time, consider blocking them or canceling your account entirely.   Similarly, be wary of other passive leisure activities such as watching television.  This is not to say that you should never watch television, although that might be a safe bet; rather, have a purpose (watch a particular show, sporting event, etc.).  Shut the television off when you’ve achieved your goal (by the way, even “vegging out” might be a reasonable short-term goal, but you should still be purposeful about how long you want to do that for!).
Barriers.  Establish times for specific activities, and be ruthless about enforcing the barriers between those activities.
  • Unless there is an emergency, ruthlessly protect your scheduled time.  Students or colleagues will sometimes ask me if I “have a minute”.  The first thing to recognize is that nothing ever takes a minute.  Even if something actually only takes a minute (which it almost never does), it creates a context switch and interrupt that can disrupt your flow and actually cost you 10-15 minutes (an entire time bit, during which you could have knocked off a task).  I used to think that saying “no” was rude; however, it is a perfectly reasonable answer.  On the contrary, if you let someone encroach on a planned meeting or activity, it is unfair to whatever or whomever you had previously scheduled for that time block.  Do not let people encroach on activities that you’ve planned unless there is a real emergency.
  • Ruthlessly protect your personal time.  This is effectively the same rule as above, but re-stated and re-emphasized for your personal time.  During non-work time, devote your complete attention and energy to not doing work. I make it a point to avoid looking at my phone when I am spending time with my family.  Nothing ruins a family picnic in the park and raises one’s blood pressure like an email from your colleague on a Saturday afternoon telling you that the introduction you wrote for the paper is “all wrong” and, by the way, your text has been chucked out and can we meet “ASAP” to discuss it.  Do yourself a favor and compartmentalize.  Not much needs to happen on a Saturday, in particular, and if you don’t get back to your colleague, department chair or whomever before Saturday night or Sunday or even Monday morning (presuming there’s no immediate deadline, of course), life will go on just fine.  On the contrary, you can’t have the family picnic on Sunday night or Monday morning.
  • Ruthlessly protect your personal space.  I now establish spaces in the house for working, and spaces where work is off limits.  This also helps me establish time barriers.  I make it a point to leave electronics out of the bedroom, for example, to reduce the temptation to “work” (i.e., which is never real work anyhow but rather checking email…see above) when the purposeful use of my time should be getting rest or sleep.  Creating these physical barriers helps ensure that there are barriers to protect your personal time, as well.  Another place I enforce barriers on personal space is when I go running: I go for long runs as part of marathon training (sometimes for hours at a time) with absolutely no electronics.  Nobody can bother me for a work-related request during these times.  I am simply not reachable; that time is mine.  The personal space I have created helps me enforce the barrier on my use of that time.
  • Learn how to say “no”.  I admit, this is incredibly hard for me.  It’s also incredibly hard for many assistant professors or junior faculty seeking promotion.  With muddy bars like “tenure”, it can be incredibly difficult to determine how much one needs to do to clear the bar, and what tasks are enriching versus superfluous.  Additionally, overachievers may tend to have difficulty saying “no” and quickly find themselves overcommitting.   Overcommitment is a potential catastrophe, because no matter how well you manage your time, there will be no way to fit all of the tasks into a fixed number of hours (using the financial metaphor, you may reach a point of bankruptcy if you over-spend).  I am not quite sure of the best way to learn how to say no, but I am currently trying two different strategies.  The first (which I’ve been using for awhile) is to find several colleagues whom I trust and ask them if it’s OK to say no to something.  Getting multiple opinions is useful here—certain people may have biases or ulterior motives, even the people you trust.  Calibrated, trusted opinions from senior colleagues and mentors are invaluable.  The second approach I have started to use is an accountability and reward system for saying “no”.  Every week, I catalog the opportunities that I have declined.  I make sure that this list has several items every week.  If I’m not saying “no” enough, I re-evaluate.  For the ambitious overachiever, I find that this tactic is useful—actively documenting activities to decline can become a game or a challenge.  How long is your list?
As I mentioned, there are countless books on time management and in some ways, this post represents “yet another list”.  However, I find that many of the tactics above are specifically useful for academics or those who work in environments where time is unstructured and working hours can potentially go unbounded.  Many of these techniques have worked well for me, and they’ve taken me years to learn and refine.  Hopefully some of the tactics in this point will save you some time in the future!