Must-see advice for college students studying programming

Source: "Programmer"

Link: www.programmer.com.cn/1798/


Introduction: Due to Joel Spolsky's dual identity (the former dean of the computer science department at Yale University, and the CEO of today's Fog Creek Software Company), listening to his advice is a great deal for the countless computer students in Chinese colleges and universities who are troubled by employment pressure today. helpful. You will find that most of the proposals emphasize the value of "soft power".


If you like programming, then you are truly blessed. You are one of the very lucky few who can make a living doing what you love. Most people are not so lucky. The notion that you take for granted "love your job" is actually a very modern concept. The common perception is that work is such an unpleasant thing that you have to go to work to get paid. The purpose of your job is to save money to do the things you really enjoy doing, but only if you wait until you retire at 65, and there are a lot of conditions. Condition 1, you must have enough savings; Condition 2, you are not too old to walk, you still have the physical strength to do those things; Condition 3, the things you like don’t require weak knees, dim eyesight, and also You are not required to walk a mile without breathing, etc.


Where did I just say? By the way, I have a suggestion.


640?wx_fmt=gif&wxfrom=5&wx_lazy=1


Practice writing before graduation


Would the Linux operating system have been successful had it not been for the constant evangelism of Linus Torvalds? Although he is a very smart computer genius, the real reason Linux has attracted a large number of volunteers from all over the world is Linus Torvalds' expressive ability. He spread his ideas in writing via email and mailing lists, eventually getting everyone's attention.


Have you heard of "Extreme Programming" that is all the rage right now? I'm not going to talk about my views on Extreme Programming here, I'm just saying that if you've heard the term, then the reason is that its advocates are some very talented writers and speakers.


Even if we narrow it down to any one software development group, you'll find that the most powerful and influential programmers in that group are those who are articulate, whether in writing or doing Oral expression can convey ideas clearly, freely and convincingly. In addition, being tall can help increase your influence, but it's not up to you.


The difference between an ordinary programmer and a good programmer is not whether they know more or less programming languages, nor whether they prefer to use Python or Java, but whether they can communicate ideas with others. If you can persuade others, your power can be amplified. If you can write clear comments and technical specifications, other programmers can understand your code, so they can use it in their own code without having to rewrite it. If you can't do this, your code has no value to others. If you can write a clear user manual for the end user, other people can understand what your code is for, that's the only way to let others understand the value of your code. SourceForge[ ] has a lot of beautiful and useful code, but it's all buried like no one uses it, because the authors didn't write the instructions well (or didn't write it at all). Then no one knows their work, and their brilliant code dies.


If a programmer can't write in English and doesn't have good writing skills, I won't hire him. If you can write, no matter which company you work for, you will soon find that the task of writing technical documentation falls to you, which means you are already starting to amplify your influence and management is taking notice you.


Some courses in college are considered "writing intensive," which means that in order to get credit, you have to write a horrific amount of words. Be sure to take a course like this! Regardless of the subject, as long as the class requires you to write every week or even every day, take it.


You can also keep a journal or blog by yourself. The more you write, the easier it becomes to write. The easier it is to write, the more you will write. It's a virtuous circle.


Learn C language well before graduation


第二点我要讲的是C语言。请注意,我说的是C语言,而不是C++。虽然在实际使用中C语言已经越来越罕见,但是它仍然是当前程序员的共同语言。C语言让程序员互相沟通,更重要的是,它比你在大学中学到的“现代语言”(比如ML语言、Java语言、Python语言或者其它正在教授的流行垃圾语言)都更接近机器。你至少需要花一个学期来了解机器原理,否则你永远不可能在高级语言的层次写出高效的代码。你也永远无法开发编译器和操作系统,而它们恰恰属于目前程序员能够得到的最佳工作之列。别人也永远不会放心将大型项目的架构设计交给你。我不管你懂多少延续(continuation)、闭包(closure)、异常处理(exception handling),只要你不能解释为什么while (*s++ = *t++);这句代码的作用是复制字符串,或者不觉得这是世界上对你来说再自然不过的事情,那么你就是在盲目无知的情况下编程。在我看来,这就好像一个医生不懂得最基本的解剖学就在开处方,他看病的根据完全是因为那些娃娃脸的医药厂商销售代表说这种药有用。


毕业前学好微观经济学


如果你没有上过任何经济学课程,那么我首先来做一个超短的评论:经济学是这样的学科之一,刚开始学的时候轰轰烈烈,有许多有用的、言之有理的理论和可以在真实世界中得到证明的事实,等等;但是,再学下去就每况愈下,有用的东西就不多了。经济学一开始那个有用的部分正是微观经济学,它是商业领域所有重要理论的基础。跟在微观经济学后面的东西就不行了。你接下来学的是宏观经济学,如果你愿意,尽管跳过去,也不会有什么损失。宏观经济学开头的部分是利息理论,内容比方说是利率与失业之间的关系,但是怎么说呢,看上去这部分里面还没有被证实的东西多于已经被证实的东西。学完这部分,后面的内容越来越糟糕,许多经济学专业的学生实际上都变成在搞物理学,因为这样才能在华尔街上找到更好的工作。但是不管怎样,你一定要去学微观经济学,因为你必须搞懂供给和需求,你必须明白竞争优势,你必须理解什么是净现值(NPV),什么是贴现,什么是边际效用。只有这样,你才会懂得为什么生意是现在这种做法。


为什么计算机系的学生也应该学经济学?因为,从经营一家公司的角度来看,比起那些不懂的程序员,一个理解基本商业规则的程序员将会更有价值。就是这么简单。我无法告诉你有多少次我是那样地充满挫折感,因为我看到了太多的提出一些疯狂的想法的程序员,这些想法在代码上也许可行,但在资本主义世界中毫无意义。如果你懂得商业规则,你就是一个更有价值的程序员,你会因此得到回报的,但是前提是你要去学习微观经济学。


不要因为枯燥就不选修非计算机专业的课程


想提高GPA绩点的一个好方法就是多选修非计算机系的课程。请千万不要低估你的GPA的重大意义。千千万万的人事经理和招聘人员在拿到一份简历的时候,第一眼就会去看GPA,包括我也是这样。我们不会为这种做法道歉。为什么?因为GPA不反映单个的成绩,而是代表了许多个教授在一段很长的时间中,在不同的情况下,对你的表现的一个总的评估。SAT成绩难道不够吗?哈,那只不过是一场几个小时的测试罢了。GPA中包括了四年大学期间你的小论文、期中考试和课堂表现,总数有几百次之多。当然,GPA也有自己的问题,不是百分之百准确。比如,这些年来,老师对学生的打分越来越宽松,学习成绩有通货膨胀的趋势。再比如,GPA无法反映课程的难度,没人能够看出你的GPA是来自无名社区大学家政系的轻松课程还是来自加州理工学院针对研究生的量子力学课程。渐渐地,我形成了一套自己的做法,首先我会过滤掉所有来自社区大学、GPA低于2.5的简历,然后我会要求剩下的人给我寄成绩单和推荐信。我再从中发现那些成绩一贯优秀的人,而不是那些仅仅在计算机系课程中得到高分的人。


为什么我要关心某人的“欧洲历史”课程成绩呢,毕竟作为雇主我要找的应该是程序员啊?何况,历史是那么枯燥,不得高分很正常。哦,这么说来,你的意思是我应该雇用你,而不用考虑一旦工作变得枯燥你会不会努力工作?别忘了,在编程工作中也有很枯燥的东西。每一项工作都有枯燥难耐的时刻。我不想雇用那些只想干有趣事情的人。


选修有大量编程实践的课程


我依然清楚记得我发誓绝不读研究生的那一刻。那是在一门叫做“动态逻辑”的课程上,教师是活力十足的耶鲁大学教授Lenore Zuck,她是计算机系那些聪明的老师中最聪明的人之一。


如今, 由于记忆力糟糕, 我已经差不多把这门课的内容忘光了,但是不管怎么说,在这里我还是想要对付着说一下。大致上,形式逻辑的意思是说,如果条件成立,你就能证明结论也成立。比如,根据形式逻辑,已知“只要成绩好,就能被雇用”,然后假定“Johnny的成绩好”,你就可以得到一个崭新的结论“Johnny会被雇用”。这完全是经典方法。但是,一个解构主义者(deconstructionist)只需要10秒钟就能破坏形式逻辑中所有有用的东西。这样一来,留给你的只是一些趣味性,而不是实用性。


现在再来说动态逻辑。它与形式逻辑其实是一回事,但是必须再多考虑时间因素。比如,“你打开灯之后,就能看见自己的鞋子”,已知“灯以前是亮的”,那么这就意味着“你看见了自己的鞋子”。


对于像Zuck教授那样聪明的理论家,动态逻辑充满了吸引力,因为它看上去很有希望让你在形式上证明一些计算机程序的相关理论问题。这样做说不定很有用。比如,你可以用它在形式上证明,火星漫游车的闪存卡不会发生溢出(overflow)问题,不会因而整天一遍又一遍地重启,耽误了它在那颗赤红色的星球上漫游寻找火星人马文(Marvin the Martian)。


在第一堂课上,Zuck博士写满了整整两面黑板,甚至黑板旁边的墙上都写上了很多证明步骤。需要证明的问题是,有一个控制灯泡的开关,现在灯泡没有亮,这时你打开了开关,请证明灯泡将会点亮。


整个证明过程复杂得不可思议,处处都是陷阱,必须十分小心。保证这个证明不出错太困难了,还不如直接相信打开开关灯就会亮。真的,虽然证明过程写满了许多块黑板,但是还是有许多中间步骤被省略了,因为如果要从形式逻辑上完整证明所有步骤,那就琐碎得无法形容了。许多步骤是用各种经典的逻辑证明方法推导得到的,包括归纳法、反证法等,甚至有些部分还是由旁听的研究生证明的。


留给我们的课后作业是证明逆命题:如果灯原来是关着的,现在却亮了,那么请证明开关的状态一定同原来相反。


我动手开始证明,我真的去证明了。


我在图书馆里待了很长时间。


我对照着Zuck博士的原始证明想依样画葫芦。研究了几个小时之后,我在其中发现了一个错误。可能我抄写的时候抄错了,但是这使得我想通了一件事。如果花费3个小时,写满了一块又一块的黑板,每一秒钟都可能出错,最后能够证明的却只是一个很琐碎的结论,那么这种方式有多大的实用性呢?在活生生、充满趣味的现实世界中,你永远都不会有机会使用它。


但是,动态逻辑的理论家们对这一点不感兴趣。他们看上它不是因为它有用,而是因为它可以为他们带来终身教职。


我放弃了这门课,并且发誓绝不会去读计算机科学的研究生。


这个故事告诉我们,计算机科学与软件开发不是一回事。如果你真的非常幸运,你的学校可能会开设很像样的软件开发课程。但是另一种可能是,你的学校根本不教你在现实中如何编程,因为精英学校都觉得,教授工作技能最好留给职业技术学校、犯人重返社会的培训项目去做。你到处都能学怎么写代码。别忘了,我们是耶鲁大学,我们的使命是培养未来的世界领袖。你交了16万美元的学费,却在学循环语句的写法,这怎么可以?你以为这是什么地方,难道是机场沿途的酒店里临时拼凑起来不靠谱的Java语言培训班?哼哼。


麻烦在于我们没有一种真正教授软件开发的专门学校。你如果想成为一个程序员,你可能只能选择计算机科学专业。这是一个不错的专业,但是它同软件开发不是一回事。在那些400等级的课程代号中,去寻找名称中带有“Practicum”这个词的课程吧(编者注:指供人实习的课程)。不要被这个拉丁语单词吓倒,这些都是有用的课程,之所以起这种名字,只是为了让那些文绉绉、装腔作势、满嘴胡说八道的公司经理们觉得高深莫测。


别担心所有工作都被印度人抢走


我首先要说的是,如果你本身就已经在印度了,或者你就是印度人,那么你真的毫无必要去想这件事,根本不用琢磨所有的工作机会是不是都跑到了印度。那些都是非常好的工作,好好地享受吧,祝你身体健康。


但是,我不断听说计算机系的入学人数下降得很厉害,已经到了危险的程度。根据我听到的说法,其中的一个原因是“学生们不愿去学一个工作机会都流向印度的专业”。这种担心大错特错,有很多理由可以反驳。首先,根据一时性的商业潮流决定个人的职业选择,这是愚蠢的。其次,即使编程工作无一幸存地都流向了印度和中国,但是学习编程本身依然是一种第一流的素质训练,可以为各种超级有趣的工作打下基础,比如业务流程工程(business process engineering)。再次,不管是在美国还是在印度,真正优秀的程序员依然是非常非常短缺的,这一点请相信我。不错,确实有相当一批失业的IT从业者在那里鼓噪,抱怨他们长时间找不到工作,但是你知道吗?即使冒着触怒这些人的风险,我还是要说,真正优秀的程序员根本不会失业。最后,你还能找到更好的专业吗?你觉得什么专业好?主修历史学?如果那样,你毕业的时候就会发现,根本没有其他选择,只能去法学院。不过我倒是知道一件事:99%的律师都痛恨他们的工作,痛恨他们当律师的每一分钟。可是,律师每周的工作时间偏偏长达90小时。就像我前面说过的:如果你喜欢编程,那么你真是受到了上天的眷顾。你是非常幸运的少数人之一,能够以自己喜欢的事谋生。


不过说实话,我不觉得学生们真的有上面的想法。近年来,计算机系入学人数的下降只是回到了历史上的正常水平,因为前些年的互联网狂热使得入学人数出现了大泡沫,抬高了基数。由于这种泡沫,许多并不真的喜欢编程的人也来读计算机系。他们心里想的是,只要进了计算机系,将来就能找到诱人的高薪工作,就能获得24岁当上CEO、进行IPO的机会。谢天谢地,这些人现在都离计算机系远远的了。


找一份好的暑期实习工作


精明的招聘负责人都知道,喜欢编程的人高中时就将牙医的信息输入了数据库,进入大学前就去过三次电脑夏令营,为校报做过内容管理系统,有过软件公司的夏季实习经历。招聘负责人就是要在你的简历上找这些东西。


If you like programming, don't accept any job, or you will make the biggest mistake. Whether it's a summer job, a part-time job, or any other job, don't take it lightly as long as it's not related to programming. I know other 19-year-olds wanting to work in the mall and fold shirts there. But unlike them, you have acquired a very valuable skill by the age of 19. It's silly to waste time folding shirts, and by the time you graduate, your resume should be full of programming-related experience. Just let those finance grads go to rental car companies to "help people meet their rental car needs" and you'll be doing something else (except Tom Welling who plays Superman on TV).


To make your life a little easier, and to emphasize that this entire article is purely for my personal purposes, I'm going to tell you that my company - Fog Creek Software - offers summer internships in software development opportunity. We take resumes very seriously. "You're most likely to learn more about coding, software development, and business operations at Fog Creek than with internships at other companies," said Ben, one of our interns last summer. He would say it, not entirely because I sent someone to his dorm to make him say it. Our deadline for accepting applications for internships is February 1. come together.


If you follow my advice, you could still end up with a tragic end, like selling your Microsoft stock early, or turning down a job offer at Google because you want a room of your own. An independent office that closed its doors, or made other stupid decisions in life. However, these are not my fault. I told you in the beginning, don't listen to me.


This article is excerpted from "Software Thoughts" (author: Joel Spolsky, translator: Ruan Yifeng, published in December 2009)


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326262614&siteId=291194637