博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
中学编程_您可以从30岁的第一次编程采访中学到什么
阅读量:2519 次
发布时间:2019-05-11

本文共 13960 字,大约阅读时间需要 46 分钟。

中学编程

by Sean Choi

通过蔡恩

您可以从30岁的第一次编程采访中学到什么 (What you can learn from a 30-year-old’s first coding interview)

从美国海军资深厨师转变为程序员 (Going from a U.S. Navy veteran chef to a programmer)

I have previously written about . In that article, I shared some of the teaching methodologies that I found to be effective for engaging teenagers in learning to program.

我以前曾写过有关 。 在那篇文章中,我分享了一些我发现可以有效地吸引青少年学习编程的教学方法。

In this article, I want to take a different approach and share a completely different personal experience in prepping a 30-year-old U.S. Navy veteran chef for his first coding interview.

在本文中,我想采用一种不同的方法,并分享完全不同的个人经历,以准备一名30岁的美国海军老将厨师进行首次编码采访。

Unlike the case of teaching a group of teenagers, the focus for teaching a grown-up is no longer being interactive or being fun. Rather, many grown-ups are goal-driven and they work hard when they really want to achieve something.

与教青少年组的情况不同,教成年人的重点不再是互动或有趣。 相反,许多成年人是目标驱动的,他们在真正想要取得成就时会努力工作。

For the case of this veteran chef, the main motivation was to transition from being in a culinary arts career to a computer programming career.

对于这位资深厨师而言,其主要动机是从从事烹饪艺术职业过渡到计算机编程职业。

However, I realized that a clear goal and motivation is not enough to easily learn programming and succeed in programming interviews. So, I wanted to share my experience with the problems I saw and some of my own solutions to those problems.

但是,我意识到,明确的目标和动机不足以轻松学习编程并成功编程面试。 因此,我想与我分享我所遇到的问题的经验以及针对这些问题的一些自己的解决方案。

In addition, I hope this article engages other grown-ups to recourse the approaches that they have taken when first learning how to program.

另外,我希望本文能吸引其他成年人学习他们最初学习编程的方法。

为什么职业突然转变? (Why the Sudden Career Shift?)

Just as provocative as the title sounds, my family members were all shocked when my younger brother, a 30-year-old U.S. Navy veteran chef, broke out the news a year ago that he would be going back to college to major in computer science.

正如标题听起来那样具有挑战性,当我的弟弟,一位30岁的美国海军资深厨师,一年前爆料他将重返大学攻读计算机科学专业时,我的家人都为之震惊。 。

It is not that my brother had a failed career as a chef. In fact, he graduated from the Culinary Institute of America, which is one of the most prestigious culinary art schools in the United States and managed to land a pretty well paying job as a culinary manager at a Silicon Valley tech company.

我的兄弟并不是厨师失败。 实际上,他毕业于美国烹饪学院,该学院是美国最负盛名的烹饪艺术学校之一,并且在硅谷一家科技公司担任烹饪经理,获得了一份相当丰厚的薪水。

However, a career in culinary arts is very physically demanding and accompanied by long working hours, which is spent mostly standing up. My brother is a disabled veteran with multiple metal rods in his ankle, so the physical demand was getting harder and harder for him to endure.

但是,烹饪艺术的职业对身体的要求很高,并且需要很长的工作时间,大部分时间都是站起来。 我的兄弟是一位残疾老兵,脚踝上有多个金属棒,因此身体的承受力越来越难以忍受。

He knew that he wouldn’t be able to continue on for long and he needed a career that was less demanding physically. He was tech savvy ever since he was young, and figured that it would be a good idea for him to go back to school to learn programming. So, he joined a 2 year program at Oregon State University to get a bachelors degree in computer science.

他知道自己将无法长期继续下去,并且他需要的职业对身体的要求不高。 他从小就精通技术,他认为回到学校学习编程对他来说是个好主意。 因此,他加入了俄勒冈州立大学的2年制课程,获得了计算机科学学士学位。

准备第一次编码面试 (Prepping for the First Coding Interview)

He finished a year of college-level computer science education, consisting of basic object oriented programming, systems programming, web programming, and finished quite well with a high GPA.

他完成了一年的大学计算机科学教育,包括基础的面向对象程序设计,系统编程,Web编程,并且以很高的GPA取得了不错的成绩。

Since the first summer break was approaching, my brother started looking for a software engineering internship position. Knowing that most software engineer interviews had an interactive coding session, my brother searched for books and materials that promised success in these interviews. He rushed to buy a that promised its readers that they would crack coding interviews.

由于第一个暑假临近,我的兄弟开始寻找软件工程实习职位。 我的兄弟知道大多数软件工程师的面试都是互动式编码,因此他搜索了有望在这些面试中取得成功的书籍和材料。 他急于购买一 ,向其读者承诺将破解编码采访。

After browsing through the book for a couple of days, this is the first conversation we had.

在浏览了两天之后,这是我们的第一次对话。

Brother: “How can I memorize the solutions to all 189 programming questions?”

兄弟: “我该如何记住所有189个编程问题的解决方案?”

Me: “You don’t and you shouldn’t. You need to learn the algorithms and data structures behind each question.”

我: “您不应该,也不应该。 您需要学习每个问题背后的算法和数据结构。”

Brother: “But there are sooooo many algorithms and data structures to learn and I don’t have enough time. Let me first try to memorize these problems.”

兄弟: “但是有太多的算法和数据结构需要学习,我没有足够的时间。 让我首先尝试记住这些问题。”

Me: “I can assure you that there there are more problems than algorithms…”

:“我可以向您保证,存在的问题比算法还多……”

Skeptical of his decisions, I left him to explore the consequences of his choice that he made as a grown up.

我对他的决定持怀疑态度,我离开他去探索他成年后做出的选择的后果。

After diving into memorizing each question in the book and in various websites, such as and , he grew very confident that he was good at this interactive programming thing that he has never done before, and he started applying and received interview requests from big name companies like Facebook and Google.

在在书中以及在各种网站(例如和记住每个问题 ,他变得非常有信心,他擅长此互动编程,这是他之前从未做过的事情,因此他开始申请并收到了来自大型公司的面试要求。诸如Facebook和Google之类的公司。

第一次编码面试… (The First Coding Interview…)

I think I have given enough spoilers on how this went. For his Google interview, he received a problem that he had never seen before and he was unable to solve it. For the Facebook interview, he felt really confident that he passed, because he got a problem he had seen.

我想我已经对如何进行了足够的破坏。 在接受Google采访时,他遇到了一个以前从未见过的问题,无法解决。 在接受Facebook采访时,他感到自己真的很自信,因为他遇到了自己遇到的问题。

However, he didn’t make it and he came back asking me for help. We started by backtracking what he had done wrong in the prior interviews and also to get a better understanding of how he performs in an interview setting.

但是,他没有成功,他回来向我寻求帮助。 我们首先回溯了他在以前的采访中做错了什么,也让人们对他在采访中的表现有更好的了解。

I asked him if he wants to do a mock interview both with and without a problem he knew. He agreed and after a couple of interviews, I found a few issues that I wanted to share for the benefit of all.

我问他是否想和他知道的问题进行一次模拟采访。 他同意了,经过几次采访,我发现了一些我想分享给所有人的问题。

面对一个看不见的问题 (Facing an Unseen Problem)

This is a pretty obvious issue. Although my brother studied hundreds of questions, he’d memorized the solutions to each of them without understanding the algorithms and data structures behind them. Once a given question would deviate from the list of problems that he had seen, he stuttered and started thinking about how to solve it.

这是一个非常明显的问题。 尽管我的兄弟研究了数百个问题,但他在不了解其背后的算法和数据结构的情况下,记住了每个问题的解决方案。 一旦给定的问题偏离了他所看到的问题列表,他结结巴巴,开始思考如何解决它。

Sometimes, he was able to apply similar knowledge, but he had trouble identifying the category of algorithms to use for unseen problems most of the time. If he had a high-level knowledge of the set of widely used algorithms for coding interviews, all he needed to do was find ways to apply them.

有时,他能够运用类似的知识,但是他在大多数时候都无法确定用于未见问题的算法类别。 如果他对一组广泛使用的采访编码算法有较高的了解,那么他要做的就是找到应用这些方法的方法。

The solution I proposed to this problem was to focus on the algorithm, not the solution. In fact, when you approach a problem, make sure to note which algorithm you think you need to use and then verify if the solution actually uses that algorithm.

我针对此问题提出的解决方案是专注于算法,而不是解决方案。 实际上,当您解决问题时,请确保记下您认为需要使用的算法,然后验证解决方案是否确实使用了该算法。

过度偏爱另一种语言 (Excessively Favoring a Language over Another)

When you first learn programming, most people start by learning a language and the details of the language constructs, such as loops and conditionals, rather than the important concepts of programming.

当您第一次学习编程时,大多数人都从学习一种语言和语言构造的细节(例如循环和条件)开始,而不是学习编程的重要概念。

I understand that the reason for this is because learners want to get right down to doing some programming. However, such a practice has dire consequences, which makes you become narrow-sighted to a single language as a beginning programmer.

我知道这样做的原因是因为学习者想开始做一些编程。 但是,这样的做法会带来可怕的后果,这使您作为入门的程序员对单一语言的视野狭窄。

Hence, once an interviewer asks a candidate to implement some library functions that already exist in your favorite language, the candidate often times completely blanks out, mainly because they always took the library functions for granted.

因此,一旦面试官要求候选人实施您喜欢的语言中已经存在的某些库功能,则该候选人通常有时会完全空白,这主要是因为他们始终认为库功能是理所当然的。

This happened to my brother as well. He was most familiar with C++ and JavaScript and when I asked him to implement a simple library function, such as a power function, he blanked out and couldn’t think about anything more than a naïve implementation.

这也发生在我哥哥身上。 他最熟悉C ++和JavaScript,当我要求他实现一个简单的库函数(例如幂函数)时,他无所事事,除了天真的实现,他什么也没想到。

Also, for string related problems, he focused on using existing methods like substring, which is best to avoid when first learning the essence of the problem.

此外,对于与字符串相关的问题,他着重于使用现有方法(例如substring ,最好是在初次学习问题的本质时避免使用。

The interviewer can be nice and let you use library functions, but you cannot always expect such generosity. So, the solution I proposed for this type of problem is to focus on the programming concepts, rather than the language constructs.

面试官可以很友好,可以让您使用库函数,但您不能总是期望如此慷慨。 因此,我针对此类问题提出的解决方案是着重于编程概念,而不是语言构造

In fact, when I first learned programming at Caltech, my entry-level computer science instructors tried hard not to teach the details of a language. They only gave some information on the bare minimum of the language the students needed for the class and allowed the students to use only the minimal features that were discussed for the programming assignments.

实际上,当我第一次在加州理工学院学习编程时,我的入门级计算机科学讲师竭力不讲授语言的细节。 他们只给出了学生上课所需语言的最低限度的一些信息,并允许学生仅使用针对编程作业所讨论的最低限度的功能。

Such a practice allowed students to easily switch programming languages at a later time based on which language was more appropriate for the use case. Additionally, it allowed them to think outside the box when they had to face a problem.

这样的做法允许学生稍后根据哪种语言更适合用例轻松地切换编程语言。 此外,它使他们在不得不面对问题时可以跳出框框思考。

讲得太少 (Speaking Too Little)

There is a saying that goes “Speak less, do more”. However, this is not the advice a prospective candidate should follow when doing programming interviews.

俗话说“少说话,多做”。 但是这不是潜在候选人在进行编程面试时应遵循的建议。

When I gave a problem to my brother, he started writing stuff without talking about the code he was going to write. When I asked what he was thinking about, the words that came out were jumbled and hard for me to follow.

当我给我的兄弟一个问题时,他开始写东西而没有谈论他要编写的代码。 当我问他在想什么时,出来的话很混乱,我很难听。

As an interviewer that has interviewed multiple candidates over the years, I always want to hear how candidates think out loud and how they approach a solution.

作为多年来采访过多个候选人的面试官,我一直想听听候选人如何大声思考以及他们如何解决问题。

Many think that this wastes precious time. However, going too deep into an incorrect solution without discussing it with the interviewer could result in more time getting wasted. Most of the time, interviewers look for a solution that they are thinking about. So, talking to the interviewer would put both of you on the same page.

许多人认为这浪费了宝贵的时间。 但是,如果深入不正确的解决方案而不与面试官讨论,可能会浪费更多时间。 大多数时候,面试官会寻找他们正在考虑的解决方案。 因此,与面试官交谈会把你们两个放在同一页上。

Of course, it is bad to propose an incorrect approach. So always think before proposing something. Therefore, a suggestion I proposed is to think out loud, but be clear and structured in what you are saying.

当然,提出错误的方法是不好的。 因此,在提出建议之前,请务必三思。 因此,我提出的建议是大声思考,但要清晰,条理清晰

过度自信 (Overconfidence)

On one occasion, my brother had to solve a problem and had seen the solution online earlier. He was very confident and thought he nailed the interview.

有一次,我的兄弟不得不解决一个问题,并且较早就在网上看到了解决方案。 他非常有信心,并以为自己钉了面试。

I asked him the details of the question, and he said he coded exactly what the solution he memorized said. However, he had a hard time describing the details of the algorithm, such as time complexity, and also had a hard time writing test code. That’s when I knew that he did not do well on the interview.

我问他问题的细节,他说他准确地写下了他记住的答案。 但是,他很难描述算法的细节(例如时间复杂度),也很难编写测试代码。 那是我知道他在面试中表现不佳的时候。

Most of the time when people see a problem that they know, they blaze through the code without thinking. And most of the time, this happens for easy questions.

在大多数情况下,当人们看到自己所知道的问题时,便会不加思索地浏览代码。 在大多数情况下,这种情况发生在一些简单的问题上。

However, when an interviewer gives an easy question, the main purpose is to dig really really deep down on the nitty gritty details of the problem. So, knowing just the solution does not cut it.

但是,当面试官提出一个简单的问题时,其主要目的是真正深入地探究问题的实质。 因此,仅知道解决方案并不能解决问题。

You must be prepared to know the details of how the algorithm functions, including time complexity and space complexity, and how your solution can fail in various cases.

您必须准备好了解算法如何运行的细节,包括时间复杂度和空间复杂度,以及解决方案在各种情况下如何失败。

Also, going back to what I mentioned earlier, don’t just write the solution without talking about it. The interviewer will definitely know that you have seen this problem before. Thus, the solution that I propose for this problem is don’t be overconfident and be mindful of the details.

同样,回到我前面提到的内容,不要只是在不谈论它的情况下编写解决方案。 面试官肯定会知道您之前已经看到过此问题。 因此,我为这个问题提出的解决方案不要过于自信,也不要忘记细节

最后的想法 (Final Thoughts)

Doing a career shift as an adult is hard. Most adults find it difficult to change practices and habits compared to when they were younger. Thus, when they get accustomed to some habits, such as using one language or not thinking out loud, it is very very hard to change.

成年后很难转行。 与成年人相比,大多数成年人发现很难改变其习惯和习惯。 因此,当他们习惯了一些习惯,例如使用一种语言或不大声思考时,很难改变。

Similarly, it will take more and more practice and time for my brother to change the habits that he has acquired, but I am sure that he will succeed in time. In fact, having the courage to change a career with a family to support shows that he has the willingness to change and adopt to new environments. He now has promising prospects as a software engineer and I am very happy for him.

同样,改变我哥哥已经养成的习惯将需要越来越多的练习和时间,但我相信他会及时取得成功。 实际上,他有勇气在家人的支持下改变职业,这表明他有改变并适应新环境的意愿。 他现在有软件工程师的前途,我对此感到非常高兴。

Thank you for reading my article and please feel free to share your experiences too! I am sure they would be very very motivating to all!
感谢您阅读我的文章,也请随时分享您的经验! 我相信他们会非常激励所有人!

翻译自:

中学编程

转载地址:http://tbewd.baihongyu.com/

你可能感兴趣的文章
BZOJ 4443: 小凸玩矩阵【二分图】
查看>>
苹果 OS X制作u盘启动盘
查看>>
Jquery便利对象
查看>>
MVC: Connection String
查看>>
idea常用设置汇总
查看>>
Node.SelectNodes
查看>>
Lambda表达式语法进一步巩固
查看>>
Vue基础安装(精华)
查看>>
Git 提交修改内容和查看被修改的内容
查看>>
PAT - 1008. 数组元素循环右移问题 (20)
查看>>
请求出现 Nginx 413 Request Entity Too Large错误的解决方法
查看>>
配置php_memcache访问网站的步骤
查看>>
hibernate的id生成策略
查看>>
树莓派3B+学习笔记:5、安装vim
查看>>
[Spfa][bfs] Jzoj P5781 秘密通道
查看>>
企业帐号进行IPA的打包、分发、下载安装的详细流程(转载)
查看>>
《项目架构那点儿事》——快速构建Junit用例
查看>>
{"errmsg":"invalid weapp pagepath hint: [IunP8a07243949]","errcode":40165}微信的坑
查看>>
DB2V9.5数据库使用pdf
查看>>
Java Bigdecimal使用
查看>>