Rushing
急匆匆
Coding is not a race, and neither is interviewing Take your time in a coding problem - don’trush! Rushing leads to mistakes, and reveals you to be careless Go slowly and methodically,testing often and thinking through the problem thoroughly You’ll finish the problem in lesstime in the end, and with fewer mistakes
写代码不是比赛,面试也一样不是。面试写代码的时候千万不要匆匆忙忙的。写的太快容易出错,错误会让面试官觉得你粗心大意。慢慢写代码,系统的测试自己写的代码,吃透问题。慢慢写最后会让你完成得更快,而错误更少。
Not Debugging
不调试
Would you ever write code and not run it or test it? I would hope not! So why do that in aninterview? When you finish writing code in an interview, “run” (or walk through) the code totest it Or, on more complicated problems, test the code while writing it
你平时写完代码就直接完事的吗?我想肯定不是吧。那面试的时候写的代码也一样对待吧。面试的时候虽然没有电脑让你“Run”,但是过一遍代码。如果代码复杂一些的话,最好能设计一两个测试用例来,边写边测。
Sloppy Coding
烂代码
Did you know that you can write bug-free code while still doing horribly on a coding question? It’s true! Duplicated code, messy data structures (i e , lack of object oriented design),etc Bad, bad, bad! When you write code, imagine you’re writing for real-world maintain-ability Break code into sub-routines, and design data structures to link appropriate data
你觉得你在解决一个难题的时候,能不能写出没有错误代码吗?肯定不行吧!重复代码,混乱的数据结构,等等不好的代码习惯。在面试的时候就假设自己真正的在开发。什么提取含函数啦,设计模式啦能用上的就别不好意思用!
Giving Up
放弃
Have you ever taken a computer adaptive test? These are tests that give you harder ques-tions the better you do Take it from me - they’re not fun Regardless of how well you’re actually doing, you suddenly find yourself stumbling through problems Yikes!
你做过这样的测试吗?测试题的难度根据你的表现一步一步提高。告诉你这样的测试没有意思的。别以为你自己平时有多厉害,你也会突然卡在一个难题上的。
Interviewing is sort of like this If you whiz through the easy problems, you’re going to getmore and harder problems Or, the questions might have just started out hard to begin with!Either way, struggling on a question does not mean that you’re doing badly So Don’t give up or get discouraged You’re doing great!
面试也是这样的。如果你秒了简单题,那么接下来迎接你的就是难题了。还有可能你上来就碰到一个巨难的问题。不管什么样情况,努力的解题并不说明你做的不好。所以千万别在做题的时候气馁和放弃。你做的很好!