轻松面试找到理想员工-非官方的面试技术指南

[复制链接]
查看11 | 回复2 | 2004-5-12 07:48:00 | 显示全部楼层 |阅读模式
http://chinese.joelonsoftware.com/Articles/Interviewing.html
轻松面试找到理想员工-非官方的面试技术指南

作者: Joel Spolsky
译: Chen Bin
编辑: Rick Ju
2000年3月23日

雇佣合适的人对于Fog Creek软件公司来说是非常关键的。在我们这个领域,有三类人可以挑选。在一个极端, 是哪些混进来的, 甚至缺乏最基本的工作技巧. 只要问这类人两三个简单的问题,再读一下他们的简历,就可以轻易地剔除他们。另一个极端的类型是 才华横溢的超级明星 这些人仅仅为了好玩就用汇编语言为Palm Pilot(一种手掌电脑)写了一个Lisp(一种人工智能编程语言)编译器。在这两种极端类型中间的是一大群不能确定水平的候选者,也许他们中的某些人能干些什么?这里的关键是明白超级明星和那一大堆属于中间类型的人的区别,因为Fog Creek软件公司只雇佣超级明星。下面我要介绍一些找出超级明星的技巧。
Fog Creek公司最重要的雇佣标准是:
有头脑, 并且
完成工作
就是这些了。符合这样标准的人就是我们公司需要的员工了。 记住这条标准。 每天上床前背诵这条标准。我们公司的目标之一就是雇佣拥有这样的潜质的人,而不是雇佣懂某些技术的人。任何人所拥有的某些具体技术都会在几年内过时,所以,雇佣有能力学习新技术的人,要比雇佣那些只在这一分钟知道SQL编程是怎么回事的人对公司更划算一点。
有头脑确实是一个很难定义的品质。但是让我们看一些在面试时能提问的一些问题,通过这些提问,我们可以找出拥有这种品质的人。完成工作非常关键。看起来有头脑但是不能完成工作的人经常拥有博士学位,在大公司工作过,但是在公司中没有人听他们的建议,因为他们是完全脱离实际的。比起准时交活儿,他们宁愿对于一些学院派的东西沉思。这些人由以下特性而可以识别出来。他们总是爱指出两个根本不同的概念间的相似性。例如,他们会说“Spreadsheets是一种特殊的编程语言”,然后花一个礼拜写一篇动人的,智慧的白皮书。这篇白皮书论述了,作为一个编程语言,spreadsheet关于计算语言特性的方方面面。聪明,但是没用。
现在,我们来谈谈完成工作但是没有头脑的人。他们爱做蠢事。从来也没有考虑过将来得靠他们自己或者别的什么人来亡羊补牢。通过制造新的工作,他们成为了公司的负债而不是资产。因为他们不仅没有为公司贡献价值,还浪费了好员工的时间。这些人通常到处粘贴大堆的代码,而不愿意写子程序。他们是完成了工作,但是不是以最聪明的方式完成工作。
面试时最重要的法则是:
做决定
在面试结束时,对于被面试者,你不得不做一个直截了当的决定。这个决定只有两个结果:雇佣或者不雇佣. 回到你的电脑前,立刻用电子邮件通知招聘负责人你的决定。电子邮件的主题应该是雇佣或者不雇佣。接着你需要在正文中写两段来支持你的决定.
没有其他的答案。永远不要说,“雇佣你,但是不能在我的团队中”。这是非常粗鲁的,因为你在暗示应试者没有聪明到能有和你一起工作的资格,但是以他的头脑适合进入那些天生输家队伍。如果你发觉自己被诱惑,想说出那句“雇佣你,但是不能在我的队伍中”,那么就简单的把这句话变成“不雇佣”再说出口。这样就没事了。甚至如果某个人在特定领域很能干,但是在别的队伍中将会表现不好,也是不雇佣。事物变化的如此之快,我们需要的是在任何地方都能成功的人。如果某些情况下你发现了一个白痴专家(拥有某些特殊能力的白痴),这个专家对于SQL非常,非常,非常的精通,但是除此之外什么也学不会,不雇佣。在Fog Creek公司他们没有将来。
永远不要说,“也许,我吃不准”。如果你吃不准,意味着不雇佣。看,比你想象的容易的多。吃不准?就说不!同样,如果你不能作出决定,那意味着不雇佣。不要说,”嗯,雇佣,我想是这样的。但是关于...,我想知道 ...”。这种情况就是不雇佣。
最重要的是记住这点,放弃一个可能的好人要比招进一个坏人强(译者按:中国有位哲人说过,宁可错杀一千,不可放过一个,呵呵)。一个不合格的求职者如果进入了公司,将要消耗公司大量的金钱和精力。其他优秀员工的还要浪费时间来修复这个人的错误。如果现在你还在犹豫,不雇佣。
如果你是Fog Creek公司的面试官,当你拒绝了大量的应聘者时,不要为Fog Creek公司将因此雇不到任何人了而忧虑。这不是你的问题。这是招聘负责人的问题。这是人力资源部的问题。这是Joel(译者注: Fog Creek公司的老板,本文作者)的问题。但不是你的问题。不停地问自己,哪种情况更糟糕?一种情况是我们变成了一个庞大的,糟糕的软件公司,充斥着许多脑袋空空如可可果壳的家伙,另一种情况是我们是一个小而高品质的公司。当然,找到优秀的应聘者(并聘用他们)是很重要的。找到有头脑而且完成工作的人是公司中的每个员工的日常工作之一。但是当你作为Joel Creek公司的一员真的开始面试一个应聘者时,要装作现在正有很多优秀的人想打破头挤进Fog Creek公司。总之,无论找到一个不错的应聘者是多么的难,永远不要降低你的标准。
但是你如何作出雇佣或者不雇佣这样艰难的决定?你只要在面试过程中不停地问自己:这个人有头脑吗?这个人能完成工作吗?要作出正确的回答,在面试时你必须问对问题。
开个玩笑,下面我要问个有史以来最差的面试问题: “Oracle 8i中的数据类型varchar和varchar2有什么区别”这是一个可怕的问题。掌握这种琐碎的技术细节和Fog Creek公司想雇佣你之间没有任何联系。谁会去记这种东西?如果有在线帮助,你可以在15秒内找到答案。
实际上,还有更差的问题,等会儿我会谈到的。
现在我们要谈到有趣的部分了:面试时提哪些问题。我的面试问题清单来自于我去微软公司找第一份工作的经历。这里实际上有几百个微软面试问题。每个人都有偏爱的问题。你也可以发展一套自己的面试问题以及面试的个人风格,这样你就可以比较容易地作出雇佣/不雇佣的决定。以下是我成功使用过的一些面试技巧,
在面试前,我读一遍应试者的简历,然后在一张纸片上随便写以下我的面试计划。这个计划实际上就是我要问的问题清单。以下是一个例子(用来面试程序员的):
介绍
应试者参加过的项目
无法回答的问题
C语言函数
你满意吗?
设计问题
挑战
你还有什么问题?
在面试前,我非常,非常当心,避免自己先入为主。如果在面试前你就已经想当然地认为,一个麻省理工的博士一定是一个有头脑的人。那么在接下来的一小时的面试时间内,无论那个麻省理工的博士说什么都不能改变你的最初印象。如果在面试前你就认为这个应试者是个傻瓜,那么他面试时说什么也无济于事。面试就象一个非常精巧的天平。一小时的面试结束后就要对一个人下结论是不容易的(但是你又必须在面试结束后得出结论)。一些不起眼的细节可能会影响最后的结论。如果你在面试开始前对于应试者有了一点了解的话,就好比天平的某一端加上了重重的砝码。这样面试本身就会变得没有用处了。以前有一次在面试前,一个招聘负责人跑进我的房间说,“你肯定会爱上这个家伙的!" 对一个男孩? 天哪,这简直让我发疯。我本来应该说,“嗯,如果你这么确定我会喜欢他,为什么你不干脆雇佣他,何必让我浪费时间来面试?”但是那时我还太年轻幼稚, 所以还是面试了那个人。当这个家伙开始说一些蠢话时,我对自己说,“哇塞,这应该是个例外情况,也许是大智若愚。”我开始带着玫瑰色眼镜看他了。于是我以说“雇佣”结束了面试,虽然他是一个糟糕的面试者。接下来发生了什么事?除了我,其他的面试官都说,不要雇佣这个人。教训是,不要听别的人的话,在面试应试者前不要四处打探这个面试者的情况。最重要的是不要和别的面考官谈论应试者,除非你们都已经作出了独立的判断。这才是科学的做法。
作为面试步骤的第一步,介绍的目的是让应试者放轻松。我通常花30秒钟,讲一下我是谁,接下来面试会如何进行。我总是使得应试者确信,我们关心的是他(她)如何解决问题的,而不是他(她)的最终答案是对还是错。顺便说一下,面试时,你不要和应试者隔着一个桌子坐着,否则在你和面试者之间就有了一个障碍,并且暗示着一种比较正式严肃的气氛,这样应试者就很难放松了。更好的办法是把桌子靠墙放着,或者和应试者坐在桌子的同一边,这样有助于应试者放松。只有应试者不会因为紧张而表现失常,你才能更有效的进行面试.
第二步的内容就是问应试者最近做了些什么项目。对刚毕业的学生, 如果有论文就问问论文, 没有的话, 就问问他们做过什么很喜欢的大作业.例如,有时候我会问一下,“你最喜欢上学期哪门课程?不一定要和计算机相关的。”事实上,如果应试者回答的课程和计算机没有关系,我会比较高兴。有时候你会发现这个计算机系应届生选择了尽可能少的计算机相关课程,但是却选修了很多和音乐相关的课程。但是他(她)却说最喜欢的课程是《面向对象数据库》。哼哼,不错啊. 不过如果你直接承认你喜欢音乐胜于计算机, 而不是在这儿胡说八道的话, 我会更高兴一点。
当面试有工作经验的人时,你可以让他们谈一下前一份工作。
我问这个问题的目的是在寻找一样品质:热情。在应试者谈到他(她)最近做过的项目时,你观察到以下迹象都是不错的:
谈到他们做过的项目时变得热情洋溢;他们的语速更快,语言更生动活泼。这说明他们对某些东西有兴趣,有热情(因为现实中有许多人对所做的项目根本漠不关心呢)。即使他们激动地表达对做过的项目的负面感情,这也是一个好的信号。“我曾经为上一个老板安装Foo Bar Mark II,但他是个傻瓜!”表现出热情的人就是我们要雇佣的人。差的应试者对工作根本就不关心,所以根本不会激动。一个非常好的信号是当应试者很激动地谈论上一份工作,以至于暂时忘记了他们正在被面试。有时候应试者刚开始面试时表现的很紧张 -- 这是很正常的现象,所以我通常忽略不计。但是当他们谈到单色计算艺术(Computational Monochromatic Art)时,这个家伙变得极端兴奋, 一点都不紧张了。不错,我喜欢这样的应试者,因为他们关心他们做的事。(什么是单色计算艺术?拔掉你的电脑显示器的电源就可以看到了)
能认真地去解释事情。某些人被我拒掉的原因就是他们不会用普通人能明白的语言去解释他们做过的项目。很多工科专业的人总是以为所有人都知道Bates理论(译者注: Bates Theorem,一种经济学的理论)或者Peano公理组(译者注: Peano's Axioms,数论中的一些定理)是什么。如果应试者开始满口行话了,让他们停一停,然后你说,“能帮我个忙吗?就是为了练习一下,你能把刚才说的用我老祖母也能理解的话说一遍吗?”但即便如此, 有些人还是继续用那些术语, 而且根本没法让人明白他们在说什么。天哪!
如果这个项目是一个团队项目,看看他们是否在有承担领导责任的迹象?一个应试者可能会说:“我们用的是X方法,但是老板说应该是Y,而客户说应该是Z。”我会问,“那么你怎么做的?”一个好的回答可能是“我设法和团队中别的人开了个会,然后一起搞出个办法...”坏的回答看起来象,“嗯,我什么也不能做。这样的问题我解决不了。”记住,聪明并且能完成工作。要搞清楚某人是否能完成工作的一个办法就是看看他(她)过去是否倾向于完成任务。事实上,你可以主动要求他们给你个例子证明他们能担任领导作用,完成任务。-例如克服公司的陈规陋习。
现在我们谈谈清单上的第三款,无法回答的问题。这很有趣。这个主意的关键在于问一些不可能有答案的问题,就是想看一下应试者怎么办。“西雅图有多少眼科医生?”“华盛顿纪念碑有多重?”“洛杉机有多少加油站?”“纽约有多少钢琴调音师?”
聪明的应试者猜到你不是要测验他们的专业知识,他们会积极地给出一个估计。“嗯,洛杉机的人口是七百万;每个人平均拥有2.5辆轿车...”当然如果他们的估计完全错误了也没有关系。重要的是他们能积极地试着回答问题。他们可能会试着搞清楚每个加油站的储量。“嗯,需要四分钟给一个储油罐加满油,一个加油站有十个油泵每天运行十八个小时...”他们也可能试着从占地面积来估计。有时, 他们的想法的创造力让你吃惊. 而有时, 他们直接要一个LA的黄页去查。这都是好迹象。
不聪明的应试者则被难住了。他们目瞪口呆地望着你,好像你来自火星。你不得不提示:“嗯,如果你想建立一个象洛杉机那么大的城市,你需要建立多少个加油站?”你还可以提示他们:“加满一个储油罐要多长时间?”不过,这些榆木疙瘩脑袋还是只会坐在那里发呆,你得拖着他们往前走才行。这类人不会解决问题,我们可不要这样的人。
关于编程问题,我通常要求应试者用C语言写一些小函数。以下是我通常会出的题目:
将一个字符串逆序
将一个链表(linked list)逆序
计算一个字节(byte)里有多少bit被置1
搜索给定的字节(byte)
在一个字符串中找到可能的最长的子字符串,该字符串是由同一字符组成的
字符串转换成整数
整数转换成字符串(这个问题很不错,因为应试者要用到堆栈或者strev函数)
注意,通常你不会希望他们写的代码多于5行,因为你没有时间理解太长的代码。
现在我们来详细看一看其中几个问题: 第一个问题: 逆序一个字符串。我这辈子还没有见过那个面试者能把这题目一次做对。所有的应试者都试图动态生成缓冲区,然后将逆序的字符串输出到该缓冲区中。问题的关键在于,谁负责分配这个缓冲区?谁又负责释放那个缓冲区?通过这个问题,我发现了一个有趣的事实,就是大多数认为自己懂C的人实际上不理解指针和内存的概念。他们就是不明白。这真叫人吃惊,无法想象这种人也能做程序员。但他们真的就是!这个问题可以从多个角度判断应试者:
他们的函数运行快吗?看一下他们多少此调用了strlen函数。我曾经看到应试者写的strrev的算法竟然只有O(n^2) 的效率,而标准的算法效率应该是O(n),效率如此底下的原因是因为他们在循环中一次又一次调用strlen函数。
他们使用指针运算吗(译者按:原文为pointer arithmetic,指的是加减指针变量的值)?使用指针运算是个好现象。许多所谓的“C程序员”竟然不知道如何使用指针运算(pointer arithmetic)。当然,我在前文说过我不会因为应试者不掌握一种特定的技巧而拒绝他。但是,理解C语言中的指针不是一种技巧,而是一种与生俱来的才能。每年一所大学要招进200多个计算机系的新生,所有这些小孩子4岁就开始用BASIC语言在Atari 800s写冒险游戏了。在大学里他们还学Pascal语言,学得也很棒。直到有一天他们的教授讲了指针的概念,突然,他们开始搞不懂了。他们就是不能再理解C语言中的任何东西了。于是90%的计算机系学生转系去学政治学。为了挽回面子,他们告诉朋友,他们之所以转系是因为他们计算机系英俊貌美的异性太少。许多人注定脑子里就没有理解指针的那根弦。所以说理解指针是一种与生俱来的品质,而不是一种单纯的技巧。理解指针需要脑子转好几个弯,某些人天生不擅长转这几个弯。
第三个问题可以考考面试者对C的位运算的掌握,但这是一种技巧,不是一种品质,所以你可以帮助他们。有趣的等他们建立了一个子函数用来计算byte中为1的位的数目,然后你要求他们优化这个子函数,尽量加快这个函数的运行速度。聪明的应试者会使用查表算法(毕竟这个表只有 256个元素,用不了多少内存),整个表只需要建立一次。跟聪明的应试者讨论一下提高时间/空间效率的不同策略是十分有意思的事情. 进一步告诉他们你不想在程序启动时初始化查询表。聪明的面试者可能会建议使用缓冲机制,对于一个特定的byte,只有在第一次被查询时进行计算,然后计算结果会被放入查询表。这样以后再被查询时直接查表就行了。而特别特别聪明的面试这会尝试有没有建立查询表的捷径,如一个byte和它的置1的bit数之间有没有规律可循?
当你观察应试者写C代码时,以下一些技巧会对你有帮助:
事先向应试者说明,你完全理解,没有一个好的编辑器光在纸上写代码是困难的,所以你不在乎他们手写的代码是否看上去不整洁。你也完全明白没有好的编译器和调试器,很难第一次就写出完全没有bug的程序,所以请他们不必为此担心。
好程序员的标志:好程序员写完“{”符号后,通常立刻跟上“}”符号,然后再在当中填上代码。他们也倾向于使用命名规则,虽然这个规则可能很原始。如果一个变量用作循环语句的索引,好程序员通常使用尽可能少的字符为它命名。如果他们的循环语句的索引变量的名字是CurrentPagePositionLoopCounter,显而易见他们写代码的经验还不够多。偶尔,你会看到一个C程序员写下象if (0==strlen(x))一样的代码,常量被放在==的左边。这是非常好的现象。这说明他因为总是把=和==搞混,已经强迫自己养成这种习惯以避免犯错。
好的程序员在写代码前会订一个计划,特别是当他们的代码用到了指针时。例如,如果你要求逆序一个链表,好程序员通常会在纸的一边画上链表的草图,并表明算法中的索引指针当前移动到的位置。他们不得不这样做。正常人是不可能不借助草图就开始写一个逆序链表的程序的。差的程序员立刻开始写代码。
不可避免的,你会在他们的程序中发现bug,于是我们现在来到了第五个问题:你对代码满意吗? 你可能想问,“好吧,bug在哪里?”这是来自地狱的一针见血的问题,要回答这个问题可要大费口舌。所有的程序员都会犯错误,这不是问题。但他们必须能找到错误。对于字符串操作的函数,他们通常会忘记在输出缓冲区加上字符串结束符。所有的函数,他们都会犯off-by-one错误(译者按:指的是某个变量的最大值和最小值可能会和正常值差1)。他们会忘掉正常的C语句结尾的分号。如果输入是零长度字符串,他们的函数会运行错误。如果malloc调用失败而他们没有为此写好错误处理代码,程序会崩溃。一次就能把所有事情做对的程序员非常,非常,非常地少.不过要是真的碰上一个的话, 提问就更有意思了. 你说,"还有Bug"。他们会再仔细地检查一遍代码。这个时候, 观察一下他们内心是否开始动摇了, 只是表面上勉强坚持说代码没有问题。总之,在程序员写完代码后,问一下他们是否对代码满意是个好主意。就像Regis那样问他们!(译者按,Regis Philbin是美国ABC电视网的游戏电视节目主持人,他的口头禅是“这是你的最后的答案吗?”)
第六部分:关于设计的问题。让应试者设计某样东西。Jabe Blumenthal,Excel的原始设计者,喜欢让应试者设计房子。Jabe说,曾经有一个应试者跑到白板前,画了一个方块,这就是他的全部设计。天哪,一个方块!立刻拒绝这样的家伙。你喜欢问什么样的设计问题?
好的程序员会问更多的信息。房子为谁造的?我们公司的政策是,我们不会雇佣那些在设计前不问为谁设计的人。通常,我会很烦恼我得打断他们的设计,说“事实上,你忘记问这个房子是给谁设计的了。这个房子是给一群长颈鹿造的。”
笨笨的应试者认为设计就像画画,你想画什么就画什么。聪明的应试者明白设计的过程是一系列艰难的权衡。一个很棒的设计问题是:设计一个放在街角的垃圾箱。想一想你得做多少权衡!垃圾箱必须易于清空,但是很难被偷走;易于放进垃圾,但是碰到狂风大作,里面的垃圾不会被吹出来;垃圾箱必须坚固而便宜。在某些城市,垃圾箱必须特别设计,以防恐怖分子在里面藏一个定时炸弹。
有创造力的应试者会给出有趣而独特的设计。我最喜欢的问题之一是为盲人设计一个放调味品的架子(译者按:原文为spice rack,老外的厨房里有个专门放调味品的架子,上面放了很多小罐罐,里面装了各种各样的调料)通常许多应试者的建议是把布莱叶文(一种盲人使用的文字)刻在放调料的罐子上,这样文字会卷起来而变形。我碰到一个应试者,他的设计是把调料放在抽屉里,因为他觉得水平地感知布莱叶文比垂直地做更方便。(试试看!)这个答案这样有创意,使我震惊!我面试了有一打得程序员,从来没有人想到过类似的答案。这样有创意的答案确实跃过了普通人考虑问题的条条框框。仅仅因为这个答案太有创意了,而且应试者别的方面还过得去,我雇佣了这个应试者,他现在已经成为Excel团队中一个优秀的项目经理了(译者按,本文作者曾在微软工作过)。
总是争取一个确定的了结。这也是完成工作的特质的一部分。有时候应试者会犹犹豫豫不能作出一个决定,试图回避困难的问题,留着困难的问题不作决定就直接向下进行,这很不好。好的应试者有一种推动事情自然地前进的倾向,即使你有意把他们拖回来。如果关于某个话题的讨论开始原地打转变得没有意义了,好的应试者会说,“嗯,我们可以整天谈论这个,但是我们得做点什么。为什么我们不开始...”
于是我们来到了第七部分,挑战。这部分很好玩。在面试中留心一下, 当面试者的回答绝对的百分之百毫无争议时, 你可以说: " 嗯, 等一下等一下." 然后花上两分钟玩一下魔鬼的游戏(译者按,原文为devil's advocate,魔鬼代言人指的是违背自己的良知,为错误邪恶的观点辩护). 记住一定要在你可以肯定他正确时和他争论。
这个很有意思.软弱的应试者会屈服。那我就和他说拜拜了。
坚定的应试者会找到一个办法说服你。他们会以肯尼迪总统的口才来说服你,“也许我误会了你的意思,”他们这样开头,但是正文仍是坚定地站稳立场。这样的人我就雇佣。
不得不承认,面试双方的地位并不是平等的。有可能应试者由于害怕你的权力而不敢于你争辩。但是,好的应试者有足够的热情和勇气坚持正确的观点,他们由于热切希望说服你而会暂时忘记正在被面试。这样的人就是我们要雇佣的人。
最后,可以问一下应试者有什么想问的。一些人喜欢看看应试者这时是否会问一些聪明的问题。这是市面上流行的面试书籍的标准技巧。我个人不在乎应试者问什么,因为这时我已经做了决定。麻烦在于,应试者也许已经见了5、6个人,进行了好几轮面试,他们可能很累了,以至于不能为每轮面试都准备一个聪明而独特的问题。所以如果他们没有可问的,没关系。
我总是留下面试的最后5分钟来推销我的公司。这很重要。即使我不打算雇佣眼前这个应试者。如果你幸运的找到一个很棒的应试者,你当然愿意做任何事情说服他(她)来你的公司。即使他们不是好的应试者,你也要尽力让他们为Fog Creek公司激动,这样面试结束时他们会对Fog Creek公司留下一个很好的印象。记住,应试者并不仅仅是可能的雇员,他们也是顾客,也是我们公司的推销员。如果他们觉得我们的公司很棒,他们也许会推荐朋友来面试。
啊哈,我记得我说过我会给出一些应该避免的非常不好的反面的试题例子。
首先,避免不合法的问题。有关种族,宗教,性别,出生国,年龄,服役记录,是否老兵,性取向,生理障碍的问题都是不合法的。即使他们的简历说他们1990年在军中服役,也不要问有关问题。也许这会让他们愉快地谈论在海湾战争中的经历。但是你的问题还是不合法的。如果简历上写着他们上过Technion in Haifa, 不要问他们是否是以色列人, 即使只是为了闲谈, 因为这是违法的. 下面有一个很好的不合法的例子。点击这里有很多关于什么是违法的讨论。(但是这个网站的其余问题够愚蠢的。)
其次,不要在问题中给予应试者暗示,我们公司喜欢或者不喜欢什么样的员工。我能想到的一个例子是问应试者是否有小孩或者是否结婚了。应试者也许会想我们不喜欢有家庭拖累的员工。
最后,不要问那些脑筋急转弯的题目,例如6根火柴怎么拼出4个三角形。象这样的灵机一动的问题是不能看出应试者是否有“有头脑/完成工作”的品质。
面试与其说是科学不如说是艺术。但是只要你记住有头脑/完成工作这个原则,你就可以应对自如。有机会就问问你的同事他们喜欢的面试问题和答案。这是我们公司员工午饭时热衷的话题之一。

本文最先用英文出版,题为 The Guerrilla Guide to Interviewing
回复

使用道具 举报

千问 | 2004-5-12 07:48:00 | 显示全部楼层
http://www.joelonsoftware.com/pr ... /fog0000000073.html
The Guerrilla Guide to Interviewing
Joel Spolsky
Thursday, March 23, 2000
A part of Joel on Software, http://www.joelonsoftware.com


--------------------------------------------------------------------------------

Hiring the right people is extremely crucial to Fog Creek Software. In our field, there are three types of people. At one end of the scale, there are the unwashed masses, lacking even the most basic skills for this job. They are easy to ferret out and eliminate, often just by reviewing a resume and asking two or three quick questions. At the other extreme, are the brilliant superstars who write lisp compilers for fun, in a weekend, in Assembler for the Palm Pilot. And in the middle, you have a large number of "maybes" who seem like they might just be able to contribute something. The trick is telling the difference between the superstars and the maybes, because at Fog Creek Software we only hire the superstars. Here are some techniques for doing that.
First of all, the #1 cardinal criteria for getting hired at Fog Creek:
Smart, and
Gets Things Done.
That's it. That's all we're looking for. Memorize that. Recite it to yourself before you go to bed every night. Our goal is to hire people with aptitude, not a particular skill set. Any skill set that people can bring to the job will be technologically obsolete in a couple of years, anyway, so it's better to hire people that are going to be able to learn any new technology rather than people who happen to know SQL programming right this minute.
Smart is hard to define, but as we look at some possible interview questions we'll see how you can ferret it out. Gets Things Done is crucial. People who are Smart but don't Get Things Done often have PhDs and work in big companies where nobody listens to them because they are completely impractical. They would rather mull over something academic about a problem rather than ship on time. These kind of people can be identified because they love to point out the theoretical similarity between two widely divergent concepts. For example, they will say "Spreadsheets are really just a special case of programming language" and then go off for a week and write a thrilling, brilliant white paper about the theoretical computational linguistic attributes of a spreadsheet as a programming language. Smart, but not useful.
Now, people who Get Things Done but are not Smart will do stupid things, seemingly without thinking about them, and somebody else will have to come clean up their mess later. This makes them liabilities to the company because not only don't they contribute, but they soak up good people's time. They are the kind of people who copy big chunks of code around rather than writing a subroutine, because it gets the job done, just not in the smartest way.
The most important rule about interviewing:
Make A Decision
At the conclusion of the interview, you have to be ready to make a sharp decision about the candidate. There are only two possible outcomes to this decision: Hire or No Hire. Turn to your computer and send immediate feedback to the recruiter. The subject line should be the name of the candidate. The first line of the email should be Hire or No Hire. Then you should spend about 2 paragraphs backing up your decision.
There is no other possible answer. Never say, "Hire, but not in my group." This is rude and implies that the candidate is not smart enough to work with you, but maybe he's smart enough for those losers over in that other group. If you find yourself tempted to say "Hire, but not in my group," simply translate that mechanically to "No Hire" and you'll be OK. Even if you have a candidate that would be brilliant at doing 1 particular thing, but wouldn't be very good in another group, that's a No Hire. Things change so often and so rapidly that we need people that can succeed anywhere. If for some reason you find an idiot savant that is really, really, really good at SQL but completely incapable of ever learning any other topic, No Hire. They don't have a future at Fog Creek.
Never say "Maybe, I can't tell." If you can't tell, that means No Hire. It's really easier than you'd think. Can't tell? Just say no! Similarly, if you are on the fence, that means No Hire. Never say, "Well, Hire, I guess, but I'm a little bit concerned about..." That's a No Hire as well.
An important thing to remember about interviewing is this: it is much better to reject a good candidate than to accept a bad candidate. A bad candidate will cost a lot of money and effort and waste other people's time fixing all their bugs. If you have any doubts whatsoever, No Hire.
While you are conducting the interview, don't worry that if you reject a lot of people, Fog Creek won't be able to find anyone to hire. That's not your problem. It's the recruiter's problem, it's H.R.'s problem, it's Joel's problem, but it's not your problem. Keep asking yourself which is worse - that we grow into a big, lousy software company with lots of coconuts, or that we stay small but high quality? Of course, it's important to seek out good candidates and everybody should see it as a part of their mission to find and recruit smart people who get things done. But once you're actually interviewing someone, pretend that Fog Creek has plenty of great candidates. Never lower your standards no matter how hard it seems to find great candidates.
But how do you make this difficult decision? You just have to keep asking yourself during the interview: is this person smart? Does this person get things done? In order to be able to tell, you're going to have to ask the right questions.
Just for fun, here is the worst interview question on Earth: "What's the difference between varchar and varchar2 in Oracle 8i?" This is a terrible question. There is no possible, imaginable correlation between people that know that particular piece of useless trivia and people that Fog Creek wants to hire. Who cares what the difference is? You can find out online in about 15 seconds!
Actually, there are some even worse questions. I'll get to that later.
So now we get to the fun part: interview questions. My list of interview questions comes from my first job at Microsoft. There are actually hundreds of famous Microsoft interview questions. Everybody has a set of questions that they really like. You, too, will develop a particular set of questions and a personal interviewing style which helps you make the Hire/No Hire decision. Here are some techniques that I have used that have been successful.
Before the interview, I read over the candidates resume and jot down an interview plan on a scrap of paper. That's just a list of questions that I want to ask. Here's a typical plan for interviewing a programmer:
Introduction
Question about recent project candidate worked on
Impossible Question
C Function
Are you satisfied?
Design Question
The Challenge
Do you have any questions?
Before the interview, I am very, very careful to avoid anything that might give me some preconceived notions about the candidate. If you think that someone is smart before they even walk into the room, just because they have a Ph.D. from MIT, then nothing they can say in 1 hour is going to overcome that initial prejudice. If you think they are a bozo, nothing they can say will overcome that initial impression. An interview is like a very, very delicate scale -- it's very hard to judge someone based on a 1 hour interview and it may seem like a very close call. But if you know a little bit about the candidate beforehand, it's like a big weight on one side of the scale, and the interview is useless. Once, right before an interview, a recruiter came into my office. "You're going to love this guy," she said. BOY did this make me mad. What I should have said was, "well, if you're so sure I'm going to love him, why don't you just hire him instead of wasting my time going through this interview." But I was young and naïve, so I interviewed him. When he said not-so-smart things, I thought to myself, "gee, must be the exception that proves the rule." I looked at everything he said through rose-colored glasses. I wound up saying Hire even though he was a crappy candidate. You know what? Everybody else who interviewed him said No Hire. So: don't listen to recruiters; don't ask around about the person before you interview them; and never, ever talk to the other interviewers about the candidate until you've both made your decisions independently. It's the scientific method!
The Introduction phase of the interview is intended to put the candidate at ease. I spend about 30 seconds telling the person who I am and how the interview will work. I always reassure the candidate that we are interested in how he goes about solving problems, not the actual answer. By the way, in doing the interview, you should make sure that you are not sitting across a desk from the candidate. This creates a formal barrier which will not place the candidate at ease. It is better to move the desk against a wall, or to go around and sit on the other side of the desk with the candidate; this does help put the candidate at ease. This results in a better interview because it is less distorted by nervousness.
Part 2 is a question about some recent project that the candidate worked on. For interviewing college kids, ask them about their senior thesis, if they had one, or about a course they took that involved a long project that they really enjoyed. For example, sometimes I will ask, "what class did you take last semester that you liked the most? It doesn't have to be computer-related." Actually I am usually pretty happy if they choose a non-computer related course. Sometimes you look at their schedule, and it looks like they are taking the bare minimum number of Comp Sci courses, but every elective is something related to Music. Then they will tell you that their favorite course was Object Oriented Databases. Yeah, right. I'd be happier if they admitted that they just liked music more than computers, instead of sucking up.
When interviewing experienced candidates, you can talk about their previous job.
In this question, I'm looking for one thing: passion. When you find a project that the person worked on recently, these are all good signs:
They get very excited talking about it; they tend to talk more quickly and get animated. This shows that when they are interesting in something, they will be passionate about it. There are far too many people around that can work on something and not really care one way or the other. Even if they are passionately negative, this can be just as good a sign. "I was working on installing Foo Bar Mark II for my previous employer, but he was such a dope!" These are good candidates that we want to hire. Bad candidates just don't care and will not get enthusiastic at all during the interview. A really good sign that a candidate is passionate about something is that when they are talking about it, they will forget for a moment that they are in an interview. Sometimes a candidate comes in who is very nervous about being in an interview situation -- this is normal so I always overlook that. But then when you get them talking about Computational Monochromatic Art they will get extremely excited and lose all signs of nervousness. Good. I like passionate people who really care. (To see an example of Computational Monochromatic Art try unplugging your monitor.)
They are careful to explain things. I have rejected candidates because when they talked about their previous project, they couldn't explain it in terms that a normal person could understand. Often engineering majors will just assume that everyone knows what Bates Theorem is or what Peano's Axioms are. If they start doing this, stop them for a minute and say, "could you do me a favor, just for the sake of the exercise, could you please explain this in terms my grandmother could understand." At this point many people will still continue to use jargon and will completely fail to make themselves understood. GONG!
If the project was a team project, look for signs that they took a leadership role. A candidate might say: "we were working on X, but the boss said Y and the client said Z." I'll ask, "so what did you do?" A good answer to this might be "I got together with the other members of the team and wrote a proposal..." A bad answer might be, "Well, there was nothing I could do. It was an impossible situation." Remember, Smart and Gets Things Done. A good way to tell if somebody Gets Things Done is to see if historically they have tended to get things done in the past. In fact, you can even ask them directly to give you an example from their recent past when they took a leadership role and got something done -- overcame some institutional inertia, for example.
OK, the third thing on that list is the impossible question. This is fun. The idea is to ask a question that they have no possible way of answering, just to see how they handle it. "How many optometrists are there in Seattle?" "How many tons does the Washington Monument weigh?" "How many gas stations are in Los Angeles?" "How many piano tuners are there in New York?"
Smart candidates will realize that you are not quizzing them on their knowledge, and they will enthusiastically leap into trying to figure out some back-of-the-envelope answer. "Well, lets see, the population of LA is about 7 million; each person in LA has about 2.5 cars..." Of course it's OK if they are radically wrong. The important thing is that they leapt into the question enthusiastically. They may try to figure out the capacity of a gas station. "Gee, it takes 4 minutes to tank up, gas stations have about 10 pumps and are open about 18 hours a day..." They may try to figure it out by area. Sometimes they will surprise you with their creativity or ask for a Los Angeles yellow pages. All good signs.
Not-so-smart candidates will get flustered and upset. They will just stare at you like you landed from Mars. You have to coach them. "Well, if you were building a new city the size of Los Angeles, how many gas stations would you put in it?" You can give them little hints. "How long does it take to fill up a tank of gas?" Still, with not-smart candidates, you will have to drag them along while they sit there stupidly and wait for you to rescue them. These people are not problem solvers and we don't want them working for us.
For programming questions, I ask candidates to write a small function in C. Here are some typical problems I would ask:
Reverse a string in place
Reverse a linked list
Count all the bits that are on in a byte
Binary search
Find the longest run in a string
atoi
itoa (great, because they have to use a stack or strrev)
You don't want to give them any problems that take more than about 5 lines of code; you won't have time for that.
Let's look at a couple of these in detail. #1: reverse a string in place. Every candidate I've ever interviewed in my life has done this wrong the first time. Without exception, they try to allocate another buffer and reverse the string into that buffer. The trouble is, who allocates the buffer? Who frees the buffer? In giving this question to dozens of candidates I found out an interesting fact. Most people who think that they know C really do not understand memory or pointers. They just don't get it. It's amazing that these people are working as programmers, but they are. With this question, here are some ways to judge the candidate:
Is their function fast? Look at how many times they call strlen. I've seen O(n^2) algorithms for strrev when it should be O(n), because they are calling strlen again and again in a loop.
Do they use pointer arithmetic? This is a good sign. Many "C programmers" just don't know how to make pointer arithmetic work. Now, ordinarily, I wouldn't reject a candidate just because he lacked a particular skill. However, I've discovered that understanding pointers in C is not a skill, it's an aptitude. In Freshman year CompSci, there are always about 200 kids at the beginning of the semester, all of whom wrote complex adventure games in BASIC for their Atari 800s when they were 4 years old. They are having a good ol'; time learning Pascal in college, until one day their professor introduces pointers, and suddenly, they don't get it. They just don't understand anything any more. 90% of the class goes off and becomes PoliSci majors, then they tell their friends that there weren't enough good looking members of the appropriate sex in their CompSci classes, that's why they switched. For some reason most people seem to be born without the part of the brain that understands pointers. This is an aptitude thing, not a skill thing – it requires a complex form of doubly-indirected thinking that some people just can't do.
For #3, you can see how well they learned the bitwise operators in C.... but this is a skill, not an aptitude, so you can help them with these. The interesting thing is to watch them write a subroutine that counts all the bits in a byte, then ask them to make it much, much faster. Really smart candidates will create a lookup table (after all, it's only got 256 entries) that they only have to create once. With good candidates, you can have a really interesting conversation about the different space/speed tradeoffs. Press them further: tell them you don't want to spend any time building the lookup table during initialization. Brilliant candidates might even suggest a caching scheme where bits are counted the first time they are used, and then stored in a lookup table so they don't have to be counted if they are used again. Really, really brilliant candidates will try to devise a way to compute the table using some kind of a shortcut taking advantage of the patterns that occur.
When you watch somebody write code, here are some techniques that may be helpful:
Always reassure them that you understand that it's hard to write code without an editor, and you will forgive them if their paper gets really messy. Also you understand that it's hard to write bug-free code without a compiler, and you will take that into account.
Some signs of a good programmer: good programmers have a habit of writing their { and then skipping down to the bottom of the page and writing their }s right away, then filling in the blank later. They also tend to have some kind of a variable naming convention, primitive though it may be... Good programmers tend to use really short variable names for loop indices. If they name their loop index CurrentPagePositionLoopCounter it is sure sign that they have not written a lot of code in their life. Occasionally, you will see a C programmer write something like if (0==strlen(x)), putting the constant on the left hand side of the == . This is a really good sign. It means that they were stung once too many times by confusing = and == and have forced themselves to learn a new habit to avoid that trap.
Good programmers plan before they write code, especially when there are pointers involved. For example, if you ask them to reverse a linked list, good candidates will always make a little drawing on the side and draw all the pointers and where they go. They have to. It is humanly impossible to write code to reverse a linked list without drawing little boxes with arrows between them. Bad programmers will start writing code right away.
Inevitably, you will see a bug in their function. So we come to question 5: Are you satisfied with that code? You may want to ask, "OK, so where's the bug?" The quintessential Open Ended Question From Hell. All programmers make mistakes, there's nothing wrong with that, they just have to be able to find them. With the string functions, they'll almost always forget to null-terminate the new string. With almost any function, they are likely to have off-by-one errors. They will forget semicolons sometimes. Their function won't work correctly on 0 length strings, or it will GPF if malloc fails... Very, very rarely, you will find a candidate that doesn't have any bugs the first time. In this case, this question is even more fun. When you say, "There's a bug in that code," they will review their code carefully, and then you get to see if they can be diplomatic yet firm in asserting that the code is perfect... In general, it's always a good idea to ask the candidate if they are satisfied with their answer before moving on. Be Regis.
Part 6: the design question. Ask the candidate to design something. Jabe Blumenthal, the original designer of Excel, liked to ask candidates to design a house. According to Jabe, he's had candidates who would go up to the whiteboard and immediately draw a square. A square! These were immediate No Hires. In design questions, what are you looking for?
Good candidates will try to get more information out of you about the problem. Who is the house for? As a policy, I will not hire someone who leaps into the design without asking more about who it's for. Often I am so annoyed that I will give them a hard time by interrupting them in the middle and saying, "actually, you forgot to ask this, but this is a house for a family of 48-foot tall blind giraffes."
Not-so-smart candidates think that design is like painting: you get a blank slate, and you can do whatever you want. Smart candidates understand that design is a difficult series of trade-offs. A great design question: design a trash can for a city street corner. Think of all the trade offs! It has to be easy to empty, but impossible to steal; it has to be easy to put things into, but hard for things to fly out of on a windy day; it has to be solid, yet inexpensive; in some cities, it has to be specially designed so that terrorists can't hide a bomb in it.
Creative candidates will often surprise you with an interesting, non-obvious answer. One of my favorite questions is Design a Spice Rack for Blind People. Inevitably, candidates will put Braille somewhere on the spice bottles, and it usually winds up being on top of the lid for various reasons which you'll discover after you've asked this question 100 times. I had one candidate who decided that it would be better to put the spices in a drawer, because it is more comfortable to scan Braille with your fingertips horizontal than vertical. (Try it!) This was so creative it surprised me -- in dozens of interviews, I had never heard that answer. And it really took a major creative "leap" outside of the bounds of the problem. On the strength of that answer alone, and no negatives, I hired the candidate, who went on to be one of the best program managers on the Excel team.
Look for closure. This is part of Get Things Done. Sometimes candidates will drift back and forth, unable to make a decision, or they will try to avoid hard questions. Sometimes they will leave difficult decisions unanswered and try to move on. Not good. Good candidates have a tendency to try to naturally keep things moving forward, even when you try to hold them back. If the conversation ever starts going around in circles, and the candidate says something like "well, we can talk about this all day, but we've got to do something, so let's go with decision X" that's a really good sign.
Which brings us to #7, The Challenge. This is fun. Throughout the interview, you look for the candidate to say something that is absolutely, positively, unarguably correct. Then you say, "wait a minute, wait a minute," and spend about 2 minutes playing devil's advocate. Argue with them when you are sure they are right.
Weak candidates will give in. No Hire.
Strong candidates will find a way to persuade you. They will have a whole laundry list of Dale Carnegie techniques to win you over. "Perhaps I'm misunderstanding you," they will say. But they will stand their ground. Hire.
Admittedly, in an interview situation, you are not equal parties. Thus there is a risk that the candidate will be afraid to argue with you because you are in a position of power over him. BUT, good candidates will tend to get fairly passionate about the argument, and they may momentarily forget that they are in an interview, and they will get very involved in trying to convince you. These are the people we want to hire.
Finally, you should ask the candidate if they have any questions. Some people like to look to see if the candidate will ask intelligent questions, which is a standard technique in the interviewing books. Personally, I don't care what questions they ask; by this point I've already made my decision. The trouble is, candidates have to see about 5-6 people in one day, and it's hard for them to ask 5-6 people different, brilliant questions, so if they don't have any questions, fine.
I always, always leave about 5 minutes a the end of the interview to sell Fog Creek. This is very important even if you are not going to hire them. If you've been lucky enough to find a really good candidate, you want to do everything you can at this point to make sure that they want to come to Fog Creek. Even if they are a bad candidate, you want to get them excited about Fog Creek Software so that they go away with a positive impression of the company. Think of it this way: these people are not just potential hires; they are also customers. They are also salesmen for our recruiting effort: if they think that Fog Creek is a great place to work, they will encourage their friends to apply.
Ah, I just remembered that I promised to give you some more examples of really bad questions to avoid.
First of all, avoid the illegal questions. Anything related to race, religion, gender, national origin, age, military service eligibility, veteran status, sexual orientation, or physical handicap is just illegal. If their resume says they were in the Army in 1990, don't ask them, even to make pleasant conversation, if they were in the Gulf war. It's against the law. If their resume says that they attended the Technion in Haifa, don't ask them, even conversationally, if they are Israeli. It's against the law. There's a pretty good discussion of what's illegal here. (But the rest of the interview questions at that site are pretty stupid).
Next, avoid any questions which might make it seem like we care about, or are discriminating based on, things which we don't actually care about or discriminate based on. The best example of this I can think of is asking someone if they have kids or if they are married. This might give the false impression that we think that people with kids aren't going to devote enough time to their work or that they are going to run off and take maternity leave.
Finally, avoid brain teaser questions like the one where you have to arrange 6 equal length matches to make exactly 4 identical perfect triangles. If it's an "aha!" question, you don't get any information about "smart/get things done" by figuring out if they happen to make the mental leap or not.
Interviewing is more of an art than a science, but if you remember the Smart/Gets Thing Done principle you will be in good shape. When you get a chance, ask some of your co-workers what their favorite questions are and what kinds of answers they look for. In the Building 16 cafeteria in Redmond this is a perennial favorite topic of lunchtime conversation.


The contents of these pages represent the opinions of one person.
All contents Copyright © 1999-2004 by Joel Spolsky. All Rights Reserved.
回复

使用道具 举报

千问 | 2004-5-12 07:48:00 | 显示全部楼层
http://www.job-interview.net/Guide/SPstep4.htm
Interview Success PlanSM
Step 4: Inappropriate Questions
State and Federal laws govern the interview process and inappropriate questions. These policies are usually available from the personnel or human resources department.Interviews should be based on "job-related" criteria and questions based on those criteria.If you've been asked an illegal question, talk to the personnel or human resources department or the Equal Employment Opportunity Commission.
Here are examples of inappropriate topics and questions:
Topic:Example
Age:What’s your age?
Age discrimination information from the Equal Employment Opportunity Commission - http://www.eeoc.gov/facts/age.html
Childcare:Do you have after school care?
Conditions of work:Does your family approve of your travel?
Criminal Record: When was the last time you were arrested?
Ethnic origin of last name:Is your last name Japanese?
Gender:Are you female?
Language:Do you speak English at home?
Marital Status:Are you divorced?
Name/Title:Is that Ms. or Mrs.?
National origin:Are you Chinese or Japanese?
National origin discrimination information from the Equal Employment Opportunity Commission - http://www.eeoc.gov/facts/fs-nator.html
Race:What race are you?
Racial discrimination information from the Equal Employment Opportunity Commission - http://www.eeoc.gov/facts/fs-race.html
Relatives:Is your husband employed?
Religion: Are you Catholic?
Religious discrimination information from the Equal Employment Opportunity Commission - http://www.eeoc.gov/facts/fs-relig.html
Residence:How can you handle the long commute?
Sexual preference:Are you gay?
Step 5
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行