大学本科

Paul Graham 2005-03-01

大学本科

想要创业吗?获得Y Combinator的资助。2005年3月

(本文的部分内容始于对给我写信提问的学生的回复。)

最近我收到了几封计算机科学本科生的邮件,询问在大学应该做什么。我可能不是最好的建议来源,因为我在大学主修的是哲学。但我上了很多计算机科学的课程,以至于大多数计算机科学专业的学生都以为我是其中一员。我当然是个黑客,至少如此。

黑客技术

在大学里应该做什么才能成为一个优秀的黑客?你可以做两件主要的事情:在编程方面变得非常出色,并学习很多关于特定、酷炫问题的知识。这两件事被证明是等价的,因为每一件都会推动你去做另一件。

在编程方面变得出色的方法是(a)大量地(b)解决难题。而让你自己解决难题的方法是从事一些非常引人入胜的项目。这个项目很可能不是课堂作业。我的朋友罗伯特在本科时通过编写网络软件学到了很多。他的一个项目是将哈佛连接到阿帕网;它曾经是最初的节点之一,但到1984年连接已经断开了。这项工作不仅不是为了课堂,而且因为他把所有时间都花在上面而忽视了学业,他被学校开除了一年。最终一切都平衡了,现在他是麻省理工学院的教授。但如果你不走那个极端,你可能会更快乐;这当时给他带来了很多担忧。

在编程方面变得出色的另一种方法是找到其他擅长编程的人,学习他们的知识。程序员倾向于根据他们做的工作类型和他们使用的工具将自己分成部落,有些部落比其他部落更聪明。看看你周围,看看聪明的人似乎在做什么;通常都有原因。

你周围一些最聪明的人是教授。所以找到有趣工作的一个方法是自愿担任研究助理。教授对那些能为他们解决繁琐的系统管理类型问题的人特别感兴趣,所以这是进门的一种方式。他们害怕的是那些不可靠和为了简历而工作的人。助理往往导致工作量净增加,这太常见了。所以你必须明确你会带来净减少。

如果他们说不要,不要气馁。拒绝几乎总是比被拒绝者想象的要少个人色彩。继续下一个。(这也适用于约会。)

小心,因为虽然大多数教授都很聪明,但并不是所有人都从事有趣的工作。教授必须发表新颖的结果才能推进他们的职业生涯,但在更有趣的研究领域竞争更激烈。所以那些不那么有抱负的教授所做的是发表一系列论文,这些论文的结论之所以新颖,是因为没有其他人关心它们。你最好避免这些。

我从来没有当过研究助理,所以推荐那条路线我觉得有点不诚实。我通过写自己的东西学会了编程,特别是通过尝试逆向工程Winograd的SHRDLU。我对那个程序的痴迷就像母亲对新生婴儿一样。

无论独自工作有什么缺点,优点是这个项目完全是你自己的。你永远不必妥协或询问任何人的许可,如果你有新的想法,你可以坐下来开始实现它。

在你自己的项目中,你不必担心新颖性(像教授那样)或盈利能力(像企业那样)。唯一重要的是项目在技术上的难度,这与应用的性质没有相关性。像数据库这样的”严肃”应用在技术上往往是琐碎和枯燥的(如果你曾遭受失眠之苦,试试阅读关于数据库的技术文献),而像游戏这样的”琐碎”应用往往非常复杂。我确信有一些游戏公司正在开发的产品,其智力内容比大学计算机科学系底部十分之九的研究还要多。

如果我现在在大学,我可能会从事图形学工作:例如,一个网络游戏,或者一个3D动画工具。当我是本科生时,没有足够的周期让图形学变得有趣,但现在很难想象有什么更有趣的工作。

数学

当我在大学时,很多教授相信(或至少希望)计算机科学是数学的一个分支。这种想法在哈佛最强烈,那里直到1980年代甚至没有计算机科学专业;在此之前,人们必须主修应用数学。但在康奈尔大学也几乎一样糟糕。当我告诉可怕的康威教授我对人工智能感兴趣(那时是个热门话题)时,他告诉我应该主修数学。我仍然不确定他认为人工智能需要数学,还是他认为人工智能是无稽之谈,主修一些严谨的学科会治愈我这种愚蠢的抱负。

事实上,作为黑客,你需要的数学比大多数大学系愿意承认的要少得多。我认为你需要的除了高中数学加上计算理论的一些概念外,不需要太多。如果你想避免编写n²算法,你必须知道什么是n²算法。当然,除非你计划编写数学应用。例如,机器人技术全是数学。

虽然对于大多数类型的黑客技术,你从字面上不需要数学,在知道1001个微分公式技巧的意义上,数学本身非常值得学习。它几乎是任何类型工作的宝贵隐喻来源。出于这个原因,我希望我在大学时学了更多数学。

像许多人一样,我在童年时被数学虐待过。我学会将数学视为公式的集合,这些公式既不美丽,与我的生活也没有任何关系(尽管试图将它们翻译成”文字问题”),但必须记住以便在考试中取得好成绩。

你在大学能做的最有价值的事情之一可能是了解数学的真正含义。这可能不容易,因为许多优秀的数学家都是糟糕的老师。虽然有许多关于数学的通俗书籍,但似乎很少有好的。我能想到的最好的是W.W.索耶的。当然还有欧几里得。

一切

托马斯·赫胥黎说”尝试了解一切的一些事情和一件事的一切。“大多数大学都以这个理想为目标。

但什么是”一切”?对我来说,它意味着人们在诚实解决难题的过程中学到的一切。所有这样的工作往往是相关的,因为一个领域的想法和技术通常可以成功移植到其他领域。即使是那些看起来相当遥远的领域。例如,我写文章的方式和写软件的方式一样:我坐下来尽可能快地敲出一个蹩脚的版本1,然后花几周时间重写它。

解决难题本身并不足够。中世纪的炼金术士在解决一个难题,但他们的方法是如此虚假,以至于研究它几乎学不到什么,除了可能关于人们欺骗自己的能力。不幸的是,我在大学尝试学习的那种人工智能有同样的缺陷:一个非常困难的问题,轻率地使用完全不足的技术来解决。大胆?更接近欺诈。社会科学也相当虚假,因为它们受到知识时尚的太大影响。如果一个物理学家遇到100年前的同事,他可以教他一些新东西;如果一个心理学家遇到100年前的同事,他们只会陷入意识形态争论。是的,当然,通过上心理学课你会学到一些东西。重点是,通过上另一个系的课,你会学到更多。

在我看来,值得学习的系是数学、硬科学、工程、历史(特别是经济和社会历史,以及科学史)、建筑学和古典文学。艺术史概论课程可能是值得的。现代文学很重要,但了解它的方法就是阅读。我对音乐了解不够,无法发表意见。

你可以跳过社会科学、哲学和最近为应对政治压力而创建的各个系。这些领域当然谈论重要问题。但它们谈论问题的方式是无用的。例如,哲学谈论我们对彼此的义务等;但你可以从一位明智的祖母或E.B.怀特那里学到更多关于这方面的知识,而不是从一位学术哲学家。

我在这里是从经验出发说话。当人们嘲笑克林顿说”这取决于’是’这个词的含义是什么”时,我可能应该感到被冒犯。我在大学上了大约五门关于”是”这个词的含义的课。

找出哪些领域值得学习的另一种方法是创建辍学图表。例如,我知道许多人从数学转向计算机科学,因为他们发现数学太难了,没有人做相反的事情。人们不会无缘无故地做困难的事情;除非一个问题相应地(或至少log(n))更有回报,否则没有人会去解决更难的问题。所以可能数学比计算机科学更值得学习。通过类似的比较,你可以为大学中的所有系制作一个图表。在底部你会发现智力内容最少的科目。

如果你使用这种方法,你会得到与我刚才给出的大致相同的答案。

语言课程是一个异常。我认为它们更好地被视为课外活动,就像陶艺课程一样。当结合在讲这种语言的国家生活一段时间时,它们会更有用。我一时兴起在大一时学习了阿拉伯语。这是很多工作,唯一持久的好处是一种奇怪的能力来识别闪米特语词根,以及对人们如何识别单词的一些见解。

工作室艺术和创意写作课程是变数。通常你不会被教太多:你只是在老师模糊的监督下做(或不做)你想做的任何事情,然后坐在一起为彼此的创作提供”批评”。但写作和艺术都是人们诚实解决的非常困难的问题,所以它们值得做,特别是如果你能找到一位好老师。

工作

当然,大学生必须考虑的不仅仅是学习。还有两个实际问题需要考虑:工作和研究生院。

理论上,通识教育不应该提供职业培训。但每个人都知道这有点谎言。每所大学的黑客都学习实用技能,而且不是偶然的。

为找工作而学习的内容取决于你想要的工作类型。如果你想在大公司工作,学习如何在Windows上编写Blub程序。如果你想在一家酷的小公司或研究实验室工作,学习在Linux上使用Ruby会更好。如果你想创办自己的公司,我认为这会越来越普遍,掌握你能找到的最强大的工具,因为你将要与竞争对手比赛,他们将是你的马。

你应该在大学学习的技能和工作中使用的技能之间没有直接的相关性。在大学里你应该目标稍微高一些。

在锻炼中,足球运动员可能卧推300磅,尽管在比赛过程中他可能永远不必施加类似的力量。同样,如果你的教授试图让你学习比工作中需要的更先进的东西,可能不仅仅是因为他们是学者,脱离现实世界。他们可能在试图用你的大脑举重。

你在课堂上写的程序与你将在现实世界中写的程序在三个关键方面不同:它们很小;你可以从头开始;问题通常是人为的和预定的。在现实世界中,程序更大,往往涉及现有代码,通常需要你在解决问题之前弄清楚问题是什么。

你不必等到离开(甚至进入)大学才学习这些技能。例如,如果你想学习如何处理现有代码,你可以为开源项目做贡献。你想要为之工作的雇主会对此印象深刻,就像课堂作业的好成绩一样。

在现有的开源项目中,你在第三种技能上没有太多练习,即决定要解决什么问题。但没有什么能阻止你开始自己的新项目。好雇主会对这更印象深刻。

你应该尝试解决什么类型的问题?回答这个问题的一种方法是询问你作为用户需要什么。例如,我偶然发现了一个很好的垃圾邮件过滤算法,因为我想停止接收垃圾邮件。现在我希望我有一个邮件阅读器,能以某种方式防止我的收件箱填满。我倾向于使用我的收件箱作为待办事项列表。但这就像用螺丝刀开瓶子;人们真正想要的是一个开瓶器。

研究生院

研究生院怎么样?你应该去吗?你如何进入一所好的研究生院?

原则上,研究生院是研究的专业培训,除非你想把研究作为职业,否则你不应该去。然而,获得计算机科学博士学位的人中有一半没有进入研究界。我去研究生院不是为了成为教授。我去是因为我想学到更多。

所以如果你主要对黑客技术感兴趣并且你去研究生院,你会发现很多其他人在同样地不在他们的元素中。如果你周围有一半的人以同样的方式不在他们的元素中,你真的不在你的元素中吗?

“计算机科学”中有一个根本问题,在这种情况下就显现出来了。没有人确定”研究”应该是什么。很多研究是黑客技术,不得不被塞进学术论文的形式以产生又一个出版量。

所以问你是否会在研究生院如鱼得水有点误导性,因为很少有人真正在计算机科学中如鱼得水。整个领域在自己的皮肤中感到不舒服。所以你主要对黑客技术感兴趣这一事实不应该阻止你去研究生院。只是要警告你,你将不得不做很多你不喜欢的事情。

第一将是你的论文。几乎每个人在完成时都讨厌他们的论文。这个过程往往会产生令人不快的结果,就像用全麦面粉制作并烘烤十二小时的蛋糕。很少有论文是被愉快地阅读的,尤其是它们的作者。

但在你之前有成千上万的人忍受了写论文的痛苦。除此之外,研究生院接近天堂。许多人记得这是他们一生中最快乐的时光。几乎所有其余的人,包括我,记得如果他们不必写论文,这本来会是一段美好的时期。

研究生院的危险在于你 upfront 看不到可怕的部分。博士计划开始作为大学第2部分,有几年的课程。所以当你面对写论文的恐怖时,你已经进入几年了。如果你现在退出,你将成为研究生院辍学生,你可能不会喜欢这个想法。当罗伯特因为编写1988年的互联网蠕虫而被研究生院开除时,我非常羡慕他找到了一种没有失败耻辱的退出方式。

总体而言,研究生院可能比大多数选择更好。你会遇到很多聪明人,你忧郁的拖延至少会是一个强大的共同纽带。当然,最后你有一个博士学位。我忘记了那一点。我想那是值得的。

博士学位的最大优势(当然,除了是学术界的工会卡)可能是它给你一些基线信心。例如,我家的霍尼韦尔恒温器有着最糟糕的用户界面。我的母亲有相同的型号,勤奋地花了一天时间阅读用户手册来学习如何操作它。她认为问题出在她身上。但我可以对自己说”如果拥有计算机科学博士学位的人都无法理解这个恒温器,那它一定是设计得很糟糕。”

在这个不温不火的推荐之后,如果你仍然想去研究生院,我可以给你关于如何进入的可靠建议。我的很多朋友现在是计算机科学教授,所以我有关于招生的内幕。这与大学完全不同。在大多数大学,招生官员决定谁被录取。对于博士计划,教授决定。他们努力做好这件事,因为他们录取的人将要为他们工作。

显然,在最好的学校,只有推荐信真正重要。标准化测试毫无价值,成绩也很少价值。文章主要是通过说愚蠢的话来取消自己资格的机会。教授唯一信任的是推荐信,最好来自他们认识的人。

所以如果你想进入博士计划,关键是给教授留下印象。从我当教授的朋友那里,我知道什么给他们留下印象:不仅仅是试图给他们留下印象。他们对取得好成绩的学生或想成为他们的研究助理以便进入研究生院的学生不感兴趣。他们对取得好成绩并且想成为他们的研究助理的学生印象深刻,因为他们真正对这个话题感兴趣。

所以你在大学能做的最好的事情,无论你想进入研究生院还是只想擅长黑客技术,是找出你真正喜欢的东西。很难欺骗教授让你进入研究生院,也不可能欺骗问题让你解决它们。大学是伪装停止工作的地方。从这一点开始,除非你想去大公司工作,这就像回到高中,前进的唯一方法是通过做你喜欢的事情。

注释

[1] 似乎没有人介意,这表明阿帕网(后来成为互联网)在1984年是多么不重要。

[2] 这就是为什么当我成为雇主时,我不关心GPA。事实上,我们积极寻找从学校辍学的人。我们曾经在哈佛周围张贴海报说”你是否因为把所有时间花在某个自己的项目上而在课堂上表现不佳而被踢出学校?来为我们工作吧!“我们设法找到了一个这样的人,他是个优秀的黑客。

当哈佛将本科生开除一年时,他们必须找工作。想法是向他们展示现实世界是多么糟糕,这样他们会明白他们在大学里是多么幸运。这个计划在我们来找工作的那个家伙身上适得其反,因为他比在学校时更有趣,那年从股票期权中赚的钱比他任何教授的薪水都多。所以他没有在年底悔改地爬回来,而是又请了一年假去了欧洲。他最终大约在26岁毕业。

[3] 埃里克·雷蒙德说,对黑客来说最好的隐喻在集合论、组合学和图论中。

特雷弗·布莱克威尔提醒你要修读为数学专业学生开设的数学课程。“‘工程师的数学’课程非常糟糕。事实上,任何’为工程师的x’都很糟糕,其中x包括数学、法律、写作和视觉设计。”

[4] 其他强烈推荐的书籍:《什么是数学?》,作者库朗和罗宾斯;《几何与想象力》,作者希尔伯特和科恩-福森。对于对平面设计感兴趣的人,拜伦的欧几里得。

[5] 如果你想拥有完美的生活,应该做的事情是去研究生院,在第一年或第二年秘密写完你的论文,然后在接下来的三年里只是享受自己,一次滴出一章。这个前景会让研究生院的学生们垂涎欲滴,但我知道没有人有纪律做到这一点。

[6] 一位教授朋友说,他们每年录取的研究生中有15-20%是”长期机会”。但他的意思是那些申请在各个方面都很完美的人,只是招生委员会的任何人都不认识写推荐信的教授。

所以如果你想进入科学领域的研究生院,你需要去一所拥有真正研究教授的大学。否则,无论你多么优秀,招生委员会都会认为你是一个有风险的赌注。

这意味着一个令人惊讶但显然不可避免的后果:小型文理学院注定要灭亡。大多数聪明的高中生至少考虑进入科学领域,即使他们最终选择不进入。为什么要去一所限制他们选择的大学?

感谢特雷弗·布莱克威尔、亚历克斯·莱温、杰西卡·利文斯顿、罗伯特·莫里斯、埃里克·雷蒙德和几位匿名的计算机科学教授阅读本文的草稿,以及那些以他们的问题开始这一切的学生。

相关

本科生的更多建议 乔尔·斯波尔斯基:给计算机科学大学生的建议 埃里克·雷蒙德:如何成为黑客

Undergraduation

Want to start a startup? Get funded by Y Combinator.

March 2005

(Parts of this essay began as replies to students who wrote to me with questions.)

Recently I’ve had several emails from computer science undergrads asking what to do in college. I might not be the best source of advice, because I was a philosophy major in college. But I took so many CS classes that most CS majors thought I was one. I was certainly a hacker, at least.

Hacking

What should you do in college to become a good hacker? There are two main things you can do: become very good at programming, and learn a lot about specific, cool problems. These turn out to be equivalent, because each drives you to do the other.

The way to be good at programming is to work (a) a lot (b) on hard problems. And the way to make yourself work on hard problems is to work on some very engaging project. Odds are this project won’t be a class assignment. My friend Robert learned a lot by writing network software when he was an undergrad. One of his projects was to connect Harvard to the Arpanet; it had been one of the original nodes, but by 1984 the connection had died. Not only was this work not for a class, but because he spent all his time on it and neglected his studies, he was kicked out of school for a year. It all evened out in the end, and now he’s a professor at MIT. But you’ll probably be happier if you don’t go to that extreme; it caused him a lot of worry at the time.

Another way to be good at programming is to find other people who are good at it, and learn what they know. Programmers tend to sort themselves into tribes according to the type of work they do and the tools they use, and some tribes are smarter than others. Look around you and see what the smart people seem to be working on; there’s usually a reason.

Some of the smartest people around you are professors. So one way to find interesting work is to volunteer as a research assistant. Professors are especially interested in people who can solve tedious system-administration type problems for them, so that is a way to get a foot in the door. What they fear are flakes and resume padders. It’s all too common for an assistant to result in a net increase in work. So you have to make it clear you’ll mean a net decrease.

Don’t be put off if they say no. Rejection is almost always less personal than the rejectee imagines. Just move on to the next. (This applies to dating too.)

Beware, because although most professors are smart, not all of them work on interesting stuff. Professors have to publish novel results to advance their careers, but there is more competition in more interesting areas of research. So what less ambitious professors do is turn out a series of papers whose conclusions are novel because no one else cares about them. You’re better off avoiding these.

I never worked as a research assistant, so I feel a bit dishonest recommending that route. I learned to program by writing stuff of my own, particularly by trying to reverse-engineer Winograd’s SHRDLU. I was as obsessed with that program as a mother with a new baby.

Whatever the disadvantages of working by yourself, the advantage is that the project is all your own. You never have to compromise or ask anyone’s permission, and if you have a new idea you can just sit down and start implementing it.

In your own projects you don’t have to worry about novelty (as professors do) or profitability (as businesses do). All that matters is how hard the project is technically, and that has no correlation to the nature of the application. “Serious” applications like databases are often trivial and dull technically (if you ever suffer from insomnia, try reading the technical literature about databases) while “frivolous” applications like games are often very sophisticated. I’m sure there are game companies out there working on products with more intellectual content than the research at the bottom nine tenths of university CS departments.

If I were in college now I’d probably work on graphics: a network game, for example, or a tool for 3D animation. When I was an undergrad there weren’t enough cycles around to make graphics interesting, but it’s hard to imagine anything more fun to work on now.

Math

When I was in college, a lot of the professors believed (or at least wished) that computer science was a branch of math. This idea was strongest at Harvard, where there wasn’t even a CS major till the 1980s; till then one had to major in applied math. But it was nearly as bad at Cornell. When I told the fearsome Professor Conway that I was interested in AI (a hot topic then), he told me I should major in math. I’m still not sure whether he thought AI required math, or whether he thought AI was nonsense and that majoring in something rigorous would cure me of such stupid ambitions.

In fact, the amount of math you need as a hacker is a lot less than most university departments like to admit. I don’t think you need much more than high school math plus a few concepts from the theory of computation. (You have to know what an n^2 algorithm is if you want to avoid writing them.) Unless you’re planning to write math applications, of course. Robotics, for example, is all math.

But while you don’t literally need math for most kinds of hacking, in the sense of knowing 1001 tricks for differentiating formulas, math is very much worth studying for its own sake. It’s a valuable source of metaphors for almost any kind of work. I wish I’d studied more math in college for that reason.

Like a lot of people, I was mathematically abused as a child. I learned to think of math as a collection of formulas that were neither beautiful nor had any relation to my life (despite attempts to translate them into “word problems”), but had to be memorized in order to do well on tests.

One of the most valuable things you could do in college would be to learn what math is really about. This may not be easy, because a lot of good mathematicians are bad teachers. And while there are many popular books on math, few seem good. The best I can think of are W. W. Sawyer’s. And of course Euclid.

Everything

Thomas Huxley said “Try to learn something about everything and everything about something.” Most universities aim at this ideal.

But what’s everything? To me it means, all that people learn in the course of working honestly on hard problems. All such work tends to be related, in that ideas and techniques from one field can often be transplanted successfully to others. Even others that seem quite distant. For example, I write essays the same way I write software: I sit down and blow out a lame version 1 as fast as I can type, then spend several weeks rewriting it.

Working on hard problems is not, by itself, enough. Medieval alchemists were working on a hard problem, but their approach was so bogus that there was little to learn from studying it, except possibly about people’s ability to delude themselves. Unfortunately the sort of AI I was trying to learn in college had the same flaw: a very hard problem, blithely approached with hopelessly inadequate techniques. Bold? Closer to fraudulent. The social sciences are also fairly bogus, because they’re so much influenced by intellectual fashions. If a physicist met a colleague from 100 years ago, he could teach him some new things; if a psychologist met a colleague from 100 years ago, they’d just get into an ideological argument. Yes, of course, you’ll learn something by taking a psychology class. The point is, you’ll learn more by taking a class in another department.

The worthwhile departments, in my opinion, are math, the hard sciences, engineering, history (especially economic and social history, and the history of science), architecture, and the classics. A survey course in art history may be worthwhile. Modern literature is important, but the way to learn about it is just to read. I don’t know enough about music to say.

You can skip the social sciences, philosophy, and the various departments created recently in response to political pressures. Many of these fields talk about important problems, certainly. But the way they talk about them is useless. For example, philosophy talks, among other things, about our obligations to one another; but you can learn more about this from a wise grandmother or E. B. White than from an academic philosopher.

I speak here from experience. I should probably have been offended when people laughed at Clinton for saying “It depends on what the meaning of the word ‘is’ is.” I took about five classes in college on what the meaning of “is” is.

Another way to figure out which fields are worth studying is to create the dropout graph. For example, I know many people who switched from math to computer science because they found math too hard, and no one who did the opposite. People don’t do hard things gratuitously; no one will work on a harder problem unless it is proportionately (or at least log(n)) more rewarding. So probably math is more worth studying than computer science. By similar comparisons you can make a graph of all the departments in a university. At the bottom you’ll find the subjects with least intellectual content.

If you use this method, you’ll get roughly the same answer I just gave.

Language courses are an anomaly. I think they’re better considered as extracurricular activities, like pottery classes. They’d be far more useful when combined with some time living in a country where the language is spoken. On a whim I studied Arabic as a freshman. It was a lot of work, and the only lasting benefits were a weird ability to identify semitic roots and some insights into how people recognize words.

Studio art and creative writing courses are wildcards. Usually you don’t get taught much: you just work (or don’t work) on whatever you want, and then sit around offering “crits” of one another’s creations under the vague supervision of the teacher. But writing and art are both very hard problems that (some) people work honestly at, so they’re worth doing, especially if you can find a good teacher.

Jobs

Of course college students have to think about more than just learning. There are also two practical problems to consider: jobs, and graduate school.

In theory a liberal education is not supposed to supply job training. But everyone knows this is a bit of a fib. Hackers at every college learn practical skills, and not by accident.

What you should learn to get a job depends on the kind you want. If you want to work in a big company, learn how to hack Blub on Windows. If you want to work at a cool little company or research lab, you’ll do better to learn Ruby on Linux. And if you want to start your own company, which I think will be more and more common, master the most powerful tools you can find, because you’re going to be in a race against your competitors, and they’ll be your horse.

There is not a direct correlation between the skills you should learn in college and those you’ll use in a job. You should aim slightly high in college.

In workouts a football player may bench press 300 pounds, even though he may never have to exert anything like that much force in the course of a game. Likewise, if your professors try to make you learn stuff that’s more advanced than you’ll need in a job, it may not just be because they’re academics, detached from the real world. They may be trying to make you lift weights with your brain.

The programs you write in classes differ in three critical ways from the ones you’ll write in the real world: they’re small; you get to start from scratch; and the problem is usually artificial and predetermined. In the real world, programs are bigger, tend to involve existing code, and often require you to figure out what the problem is before you can solve it.

You don’t have to wait to leave (or even enter) college to learn these skills. If you want to learn how to deal with existing code, for example, you can contribute to open-source projects. The sort of employer you want to work for will be as impressed by that as good grades on class assignments.

In existing open-source projects you don’t get much practice at the third skill, deciding what problems to solve. But there’s nothing to stop you starting new projects of your own. And good employers will be even more impressed with that.

What sort of problem should you try to solve? One way to answer that is to ask what you need as a user. For example, I stumbled on a good algorithm for spam filtering because I wanted to stop getting spam. Now what I wish I had was a mail reader that somehow prevented my inbox from filling up. I tend to use my inbox as a todo list. But that’s like using a screwdriver to open bottles; what one really wants is a bottle opener.

Grad School

What about grad school? Should you go? And how do you get into a good one?

In principle, grad school is professional training in research, and you shouldn’t go unless you want to do research as a career. And yet half the people who get PhDs in CS don’t go into research. I didn’t go to grad school to become a professor. I went because I wanted to learn more.

So if you’re mainly interested in hacking and you go to grad school, you’ll find a lot of other people who are similarly out of their element. And if half the people around you are out of their element in the same way you are, are you really out of your element?

There’s a fundamental problem in “computer science,” and it surfaces in situations like this. No one is sure what “research” is supposed to be. A lot of research is hacking that had to be crammed into the form of an academic paper to yield one more quantum of publication.

So it’s kind of misleading to ask whether you’ll be at home in grad school, because very few people are quite at home in computer science. The whole field is uncomfortable in its own skin. So the fact that you’re mainly interested in hacking shouldn’t deter you from going to grad school. Just be warned you’ll have to do a lot of stuff you don’t like.

Number one will be your dissertation. Almost everyone hates their dissertation by the time they’re done with it. The process inherently tends to produce an unpleasant result, like a cake made out of whole wheat flour and baked for twelve hours. Few dissertations are read with pleasure, especially by their authors.

But thousands before you have suffered through writing a dissertation. And aside from that, grad school is close to paradise. Many people remember it as the happiest time of their lives. And nearly all the rest, including me, remember it as a period that would have been, if they hadn’t had to write a dissertation.

The danger with grad school is that you don’t see the scary part upfront. PhD programs start out as college part 2, with several years of classes. So by the time you face the horror of writing a dissertation, you’re already several years in. If you quit now, you’ll be a grad-school dropout, and you probably won’t like that idea. When Robert got kicked out of grad school for writing the Internet worm of 1988, I envied him enormously for finding a way out without the stigma of failure.

On the whole, grad school is probably better than most alternatives. You meet a lot of smart people, and your glum procrastination will at least be a powerful common bond. And of course you have a PhD at the end. I forgot about that. I suppose that’s worth something.

The greatest advantage of a PhD (besides being the union card of academia, of course) may be that it gives you some baseline confidence. For example, the Honeywell thermostats in my house have the most atrocious UI. My mother, who has the same model, diligently spent a day reading the user’s manual to learn how to operate hers. She assumed the problem was with her. But I can think to myself “If someone with a PhD in computer science can’t understand this thermostat, it must be badly designed.”

If you still want to go to grad school after this equivocal recommendation, I can give you solid advice about how to get in. A lot of my friends are CS professors now, so I have the inside story about admissions. It’s quite different from college. At most colleges, admissions officers decide who gets in. For PhD programs, the professors do. And they try to do it well, because the people they admit are going to be working for them.

Apparently only recommendations really matter at the best schools. Standardized tests count for nothing, and grades for little. The essay is mostly an opportunity to disqualify yourself by saying something stupid. The only thing professors trust is recommendations, preferably from people they know.

So if you want to get into a PhD program, the key is to impress your professors. And from my friends who are professors I know what impresses them: not merely trying to impress them. They’re not impressed by students who get good grades or want to be their research assistants so they can get into grad school. They’re impressed by students who get good grades and want to be their research assistants because they’re genuinely interested in the topic.

So the best thing you can do in college, whether you want to get into grad school or just be good at hacking, is figure out what you truly like. It’s hard to trick professors into letting you into grad school, and impossible to trick problems into letting you solve them. College is where faking stops working. From this point, unless you want to go work for a big company, which is like reverting to high school, the only way forward is through doing what you love.

Notes

[1] No one seems to have minded, which shows how unimportant the Arpanet (which became the Internet) was as late as 1984.

[2] This is why, when I became an employer, I didn’t care about GPAs. In fact, we actively sought out people who’d failed out of school. We once put up posters around Harvard saying “Did you just get kicked out for doing badly in your classes because you spent all your time working on some project of your own? Come work for us!” We managed to find a kid who had been, and he was a great hacker.

When Harvard kicks undergrads out for a year, they have to get jobs. The idea is to show them how awful the real world is, so they’ll understand how lucky they are to be in college. This plan backfired with the guy who came to work for us, because he had more fun than he’d had in school, and made more that year from stock options than any of his professors did in salary. So instead of crawling back repentant at the end of the year, he took another year off and went to Europe. He did eventually graduate at about 26.

[3] Eric Raymond says the best metaphors for hackers are in set theory, combinatorics, and graph theory.

Trevor Blackwell reminds you to take math classes intended for math majors. “‘Math for engineers’ classes sucked mightily. In fact any ‘x for engineers’ sucks, where x includes math, law, writing and visual design.”

[4] Other highly recommended books: What is Mathematics?, by Courant and Robbins; Geometry and the Imagination by Hilbert and Cohn-Vossen. And for those interested in graphic design, Byrne’s Euclid.

[5] If you wanted to have the perfect life, the thing to do would be to go to grad school, secretly write your dissertation in the first year or two, and then just enjoy yourself for the next three years, dribbling out a chapter at a time. This prospect will make grad students’ mouths water, but I know of no one who’s had the discipline to pull it off.

[6] One professor friend says that 15-20% of the grad students they admit each year are “long shots.” But what he means by long shots are people whose applications are perfect in every way, except that no one on the admissions committee knows the professors who wrote the recommendations.

So if you want to get into grad school in the sciences, you need to go to college somewhere with real research professors. Otherwise you’ll seem a risky bet to admissions committees, no matter how good you are.

Which implies a surprising but apparently inevitable consequence: little liberal arts colleges are doomed. Most smart high school kids at least consider going into the sciences, even if they ultimately choose not to. Why go to a college that limits their options?

Thanks to Trevor Blackwell, Alex Lewin, Jessica Livingston, Robert Morris, Eric Raymond, and several anonymous CS professors for reading drafts of this, and to the students whose questions began it.

More Advice for Undergrads Joel Spolsky: Advice for Computer Science College Students Eric Raymond: How to Become a Hacker