編程面試中需要了解的5件事

This article is intended for those who are trying to start their programming career, or are preparing to interview for their dream job. As someone who’s been on both sides of the interviewing table, I understand how it feels to be the interviewee.

本文適用于那些試圖開始其編程職業或者準備為他們的理想工作進行面試的人。 作為面試雙方的人 ,我了解成為受訪者的感覺。

This non-exhaustive list of questions floated through my mind all the time.

這個無窮盡的問題清單一直浮現在我的腦海。

  • “Am I supposed to talk through my code?”

    “我應該講講我的代碼嗎?”
  • “How often should I communicate with the interviewer?”

    “我應該多久與面試官溝通一次?”
  • “Oh god, I forgot to instantiate my variable! Am I doomed?!”

    “天哪,我忘了實例化變量! 我注定要死嗎?!”
  • “What does the interviewer think of my answer?”

    “面試官對我的回答有何看法?”
  • “Is it OK if I do this?”

    “如果我這樣做可以嗎?”

… And the list goes on…

… 而這樣的例子不勝枚舉…

It is a very scary experience. It is very difficult. And it is extremely hard to operate within this vacuum when you’re being scrutinized for every single thing you say and every thing you write.

這是一個非常可怕的經歷。 這非常困難。 當您仔細檢查您所說的每句話和編寫的每件事時,要在這種真空中進行操作都非常困難。

You’re interviewing for your dream job, something you’ve dreamed of since you were 12. And it all comes down to impressing someone you’ve never met within 60 minutes.

您正在為自己夢dream以求的工作進行面試,這是您從12歲起就夢dream以求的事情,而這一切都會給您留下深刻印象,讓您在60分鐘內從未遇到過。

The struggle is real.

奮斗 是真實的。

1.永遠思考 (1. Always think ahead)

Often, you’ll hear an interviewer ask this: “OK, I think that looks good. Now, how would you improve this code?”

通常,您會聽到一個面試官問這個問題:“好的,我認為這看起來不錯。 現在,您將如何改進此代碼?”

This is a killer question. And this is because it isn’t just a filler to pass time. The interviewer is trying to assess how you think about:

這是一個致命的問題 。 這是因為它不僅僅是時間的補充。 面試官正在嘗試評估您的想法:

  • code quality

    代碼質量
  • some concerns/bottlenecks that weren’t raised in the algorithm planning session

    算法規劃會議中未提出的一些關注/瓶頸
  • how you would scale the solution at hand.

    您如何擴展手頭的解決方案。

Just because you solved the problem doesn’t mean you’ll automatically get an offer.

僅僅因為您解決了問題,并不意味著您會自動獲得要約。

For example, when you look at this piece of code below, what does it do? How would you improve it? What might cause it to break?

例如,當您查看下面的這段代碼時,它有什么作用? 您將如何改善? 是什么導致它破裂?

Let me know in the comments below. I’d love to hear your thoughts.

在下面的評論中讓我知道。 我很想聽聽您的想法。

Surprise?: Being able to come up with a working solution is the bare minimum to be considered for the position. These questions are basic competency tests. What separates the good candidates from great is the ability to think beyond what’s required.

驚喜?:能夠提出一個可行的解決方案是該職位的最低要求。 牛逼 HESE問題是基本能力測試。 優秀候選人與優秀候選人的區別在于思考能力超出了要求。

在編碼會話中這意味著什么 (What this means in a coding session)

Think about edge cases, scaling issues, problem areas. Always think one step ahead. If you’re using a recursive approach, what would happen if you have a large data set? If you’re using a hashing algorithm, how do you handle collisions? How likely is that to happen, and what’s the worst case scenario?

考慮一下極端情況,擴展問題,問題領域。 總是想向前一步。 如果您使用的是遞歸方法,那么如果您的數據集很大,會發生什么? 如果您使用的是哈希算法,那么如何處理沖突? 這發生的可能性有多大?最壞的情況是什么?

2.答案不只一個 (2. There’s more than one answer)

There is always more than one way to solve a programming interview problem. Always. There are usually multiple ways of tackling a problem, some of which might not be optimal.

解決編程面試問題總是有不止一種方法。 總是 。 通常有多種解決問題的方法,其中有些可能不是最佳方法。

One of my favorite tech Youtubers taught me that a coding interview is a mental exercise to see how a candidate thinks. From an interviewer perspective, I’m not looking to check if you know what the right answer is. Yes, it is important that you can write a working solution, but it’s not the only thing.

我最喜歡的一項技術,Youtubers告訴我,編碼面試是一種心理鍛煉,旨在了解候選人的想法。 從采訪者的角度來看,我不是要檢查您是否知道正確的答案。 是的,您可以編寫一個有效的解決方案很重要,但這不是唯一的事情。

More than that, I’m looking for how smart this person is, how the solution is derived, and what other creative solutions this person might be thinking about.

不僅如此,我還在尋找這個人有多聰明,解決方案是如何派生的,以及這個人可能在想什么其他創造性的解決方案。

A programming exercise to illustrate my point:

一個編程練習來說明我的觀點:

Merge two sorted linked lists. (It’s linked to Leetcode if you’d like to try solving). Basically you can tackle this in several ways:

合并兩個排序的鏈表 。 (如果您想嘗試解決,它鏈接到Leetcode)。 基本上,您可以通過幾種方式解決此問題:

  1. Put all the nodes into an array and then sort it. Then, create a pointer and link every element in the array together.

    將所有節點放入數組,然后對其進行排序。 然后,創建一個指針并將數組中的每個元素鏈接在一起。
  2. Merge them using pointer manipulation. Compare the two, keeping track of which is smaller, and then return the results at the end.

    使用指針操作合并它們。 比較兩個,跟蹤較小的兩個,然后最后返回結果。

What other ways can you think of?

您還能想到什么其他方式?

3. OOP還沒有死 (3. OOP is not dead)

Object-oriented programming is not dead. It’s a love-hate relationship for some people, yet it’s a valuable skill to have. This is one of the fundamental skills — a programming technique every programmer should know.

面向對象的編程還沒有結束。 對某些人來說,這是一種愛恨交加的關系,但擁有卻是一項寶貴的技能。 這是基本技能之一,這是每個程序員都應該知道的編程技術。

Many candidates jump head-first into a programming problem without putting further thought into simplifying the code. I used to be in this bunch and, admittedly, I still do it sometimes.

許多候選人沒有解決簡化代碼的問題就直接進入編程問題。 我曾經是一群人,但坦率地說,我有時還是這樣做。

However, the ability to turn complex problems into simpler, manageable chunks by object-oriented programming is a rare and treasured skill.

但是,通過面向對象的編程將復雜的問題轉換為更簡單,可管理的塊的能力是一種罕見且寶貴的技能。

Writing code for computers to understand is easy. Writing code for humans is hard.

編寫代碼讓計算機易于理解。 為人類編寫代碼很難。

4.制作簡歷 (4. Craft your résumé)

Imagine you’re heading to prom night with the person of your dreams, and you show up at their doorstep in flip flops and a sleeveless t-shirt.

想象一下,您將與自己夢person以求的人一起參加舞會之夜,并且穿著拖鞋和無袖T恤出現在他們家門口。

Your résumé is your business card. It’s the company’s first impression of you.

您的簡歷就是您的名片。 這是公司對您的第一印象。

If you’re starting out on your job search, then the very first thing you should do is prepare a great résumé. That’s the number one thing that is often overlooked by job seekers and, arguably, is the lowest hanging fruit.

如果您正在尋找工作,那么您應該做的第一件事就是準備一份不錯的簡歷 。 這求職者經常忽略第一件事,并且可以說是懸念最少的事情

I see a lot of candidates who spent weeks, if not months, preparing for coding interviews. But the time they spent on crafting their résumé pales in comparison.

我看到很多候選人花了數周甚至數月的時間準備面試。 但是相比之下,他們花在編寫簡歷上的時間卻相形見pale。

5.盡早溝通并經常溝通 (5. Communicate early and communicate often)

When I first started interviewing, I was erring on the side of over-communicating. This meant I was trying to talk through every single line of code I was writing, even if it was a simple for-loop.

當我第一次開始面試時,我有點過分交流 這意味著我試圖遍歷正在編寫的每一行代碼,即使這是一個簡單的for循環。

I’m not the type who is able to talk and think at the same time. Some people are gifted in the way that they’re able to think out loud, but I can’t.

我不是那種能夠同時講話和思考的人。 有些人有天賦的能力,他們能夠大聲思考,但我不能。

Communicate as often as you need. I tried to communicate early and often. Whenever there was an issue, I would raise it with the interviewer and let them know. It helped me determine if I was heading in the right direction, and course-correct if I was not.

根據需要進行交流 。 我試圖盡早和經常交流。 每當有問題時,我都會向面試官提出,并告知他們。 它幫助我確定我是否朝著正確的方向前進,如果我沒有朝正確的方向前進,則可以正確地進行。

A programming interview is looking for both hard and soft skills. Lacking one or the other means a definite no. For further information, I wrote a more detailed article about how improve a software engineer’s soft skills here.

編程采訪正在尋找硬技能軟技能。 缺少一個意味著另一個。 如需進一步信息,我寫了一篇關于如何提高軟件工程師的軟技能更詳細的文章在這里 。

Don’t pressure yourself into talking through every single line of code. If you’re using some esoteric features of a programming language, you can explain it once you’re done writing the whole thing.

不要強迫自己遍歷每一行代碼。 如果您正在使用某種編程語言的深奧特性,那么在編寫完全部內容之后就可以對其進行解釋。

在編碼會話中這意味著什么 (What this means in a coding session)

If you have already established some way of solving the problem, then you can just politely let the interviewer know that you’ll be diving deep into writing the code. Don’t feel that you need to explain every single line of code.

如果您已經建立了解決問題的方法,則可以禮貌地讓面試官知道您將深入研究代碼。 不必覺得您需要解釋每一行代碼。

6. [額外]使用抽象 (6. [Extra] Use abstraction)

Here’s another extra tip I picked up that helped tremendously when I was interviewing: use abstraction for complex methods.

這是我在面試時獲得的另一條非常有用的技巧: 將抽象用于復雜的方法。

Using abstraction to hide the complicated implementation details doesn’t mean that you’re shoving the dirty details under the rug. It means that you understand less is more. Remember, you are writing code for humans to understand. Showing good judgement here will definitely earn you extra brownie points with the interviewer.

使用抽象來隱藏復雜的實現細節并不意味著您將骯臟的細節推到了地毯下。 這意味著您了解的少即是多。 請記住,您正在編寫供人類理解的代碼。 在這里表現出良好的判斷力,一定會與面試官一起獲得額外的布朗尼積分。

在編碼會話中這意味著什么 (What this means in a coding session)

Let’s compare and contrast these two pieces of code:

讓我們比較和對比這兩段代碼:

In my opinion, I think the right side looks much cleaner, and much easier to understand. I can then take the time to implement getNeighbors, or isEmpty, depending on what is requested of me.

我認為,右側看起來更清潔,更容易理解。 然后,我可以花一些時間實現getNeighborsisEmpty ,具體取決于我的要求。

The important thing here is that abstraction has now helped keep my code clean, easy to read, and easy to understand. Who doesn’t like to have their cake and eat it too?

這里重要的是,現在抽象已使我的代碼保持整潔,易于閱讀和易于理解。 誰不喜歡吃蛋糕呢?

我為什么要分享我的經驗? (Why do I want to share my experience?)

I’ve somehow miraculously managed to overcome the obstacles and find my way to my dream job. This is by no means my way of bragging. It is not my intention at all.

我以某種方式奇跡般地設法克服了障礙,并找到了自己夢想的工作之路。 這絕不是我吹牛的方式。 這根本不是我的意圖。

I truly want to help others like me who are struggling to land their dream job. I’ve been through it. I understand the hardship, the sweat and tears of preparing for a programming interview. I believe that the world isn’t a zero-sum game — the more people who do better in life, the better our society becomes, and the more prosperous we’ll all be as a result of that. It’s a win-win situation.

我真的想幫助像我這樣的努力工作的其他人。 我經歷過了。 我了解準備參加編程面試的艱辛,汗水和眼淚。 我相信世界不是一場零和游戲-生活水平提高的人越多,我們的社會就會變得越好,因此,我們所有人都會越富裕。 這是雙贏的局面。

Hopefully these tips are able to help another job seeker out there! Good luck! ?

希望這些技巧能夠幫助其他求職者! 祝好運! ?

If you enjoyed this article, here are a few more recommended articles I wrote:

如果您喜歡本文,這里還有我寫的一些推薦文章:

  • How I landed offers from Microsoft, Amazon and Twitter without an Ivy-league degree

    我如何在沒有常春藤聯盟學位的情況下從Microsoft,Amazon和Twitter獲得報價

  • How to write a great resume for software engineers

    如何為軟件工程師撰寫出色的簡歷

  • How I automated my job search by building a web crawler

    我如何通過構建網絡爬蟲來自動進行求職

  • How to System Design

    如何進行系統設計

我推薦的資源和工具 (Resources and tools I recommend)

  • Elements of Programming Interviews: Great for more difficult coding problems

    編程面試的要素 :適用于更困難的編碼問題

  • Cracking The Coding Interview: Great for covering foundational CS

    破解編碼面試 :非常適合覆蓋基礎CS

  • OneNote: I use this to store all code snippets

    OneNote :我用它來存儲所有代碼片段

  • Evernote: For everything else

    印象筆記 :其他

  • CodeRunner: I love this Mac app! I used this multiple times to run ad-hoc Python scripts/functions and it just works amazingly well. ?

    CodeRunner :我喜歡這個Mac應用程序! 我多次使用它來運行特定的Python腳本/函數,并且效果非常好。 ?

  • Jobscan: A friend runs this company. I’ve heard many cool things about it, and you should try them out for their résumé screening tool.

    Jobscan :一位朋友經營這家公司。 我聽說過很多很棒的事情,您應該嘗試使用他們的簡歷篩選工具。

  • Refdash: Run by a bunch of ex-Googlers. The quality of mock interviews here is ?. The interviewers are ex-Googlers. I highly recommend trying them out.

    Refdash :由一群前Google員工經營。 這里的模擬面試質量為?。 面試官是前Google員工。 我強烈建議您嘗試一下。

  • CodePath: A non-profit org that helps people prepare for a career in tech. Nathan and Tim are great people and I have learned a lot from them. The community is very helpful and everyone is willing to give a hand.

    CodePath :一個非盈利性組織,可以幫助人們為從事技術職業做準備。 內森(Nathan)和蒂姆(Tim)都是很棒的人,我從他們身上學到了很多東西。 社區非常有幫助,每個人都愿意伸出援手。

  • Fine-point markers: Bring these to your interview. I highly recommend them!

    重點標記 :將它們帶入您的面試。 我強烈推薦他們!

Zhia Chong is a software engineer at Twitter. He works on the Ads Measurement team in Seattle, measuring ads impact and ROI for advertisers.

Zhia Chong是Twitter的軟件工程師。 他在西雅圖的廣告衡量團隊工作,為廣告客戶衡量廣告影響和投資回報率。

You can find him on Twitter and LinkedIn.

您可以在Twitter和LinkedIn上找到他。

翻譯自: https://www.freecodecamp.org/news/the-most-important-things-you-need-to-know-for-a-programming-interview-3429ac2454b/

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/394190.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/394190.shtml
英文地址,請注明出處:http://en.pswp.cn/news/394190.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

多線程的基礎知識

1、程序、進程、線程的基本概念 程序:為了完成某種任務用某一種語言編寫的一組指令的集合就叫程序。程序就是一段靜態的代碼。 進程:進程是程序的依次執行過程,或者說是正在運行的一個程序。這是一個動態的過程,有它自身的產生運行…

springboot實現單點登錄_什么是單點登錄,php是如何實現單點登錄的

文章來自:php中文網鏈接:https://www.php.cn/php-weizijiaocheng-429869.html作者:中文網商務合作:請加微信(QQ):2230304070視頻教程分享碼農網:http://www.mano100.cn/rjyfk_url-url.html ,升級終身會員即…

背景圖處理,這是個好東西記錄一下

背景圖處理 rgba (),前3個是三原色,第四個參數是透明度轉載于:https://www.cnblogs.com/ChineseLiao/p/7479207.html

python使用GUI(圖形用戶界面)

打開后: File→New File(Ctrl N) 轉載于:https://www.cnblogs.com/ly123456/p/6269859.html

Altium Designer(AD24)新工程復用設計文件圖文教程及視頻演示

🏡《專欄目錄》 目錄 1,概述2,復用方法一視頻演示2.1,創建工程2.2,復用設計文件 3,復用方法二視頻演示4,總結 歡迎點擊瀏覽更多高清視頻演示 1,概述 本文簡述使用AD軟件復用設計文件…

兩點定標法_一種兩點校正紅外熱像儀的非均勻性的模塊及方法

一種兩點校正紅外熱像儀的非均勻性的模塊及方法【技術領域】[0001] 本發明屬于紅外熱成像系統的非均勻性校正領域,特別是一種兩點校正紅外熱像 儀的非均勻性的模塊及方法。【背景技術】[0002] 在過去的幾十年中,紅外探測器件的元數不斷增加,由…

leetcode851. 喧鬧和富有(dfs)

在一組 N 個人(編號為 0, 1, 2, …, N-1)中,每個人都有不同數目的錢,以及不同程度的安靜(quietness)。 為了方便起見,我們將編號為 x 的人簡稱為 "person x "。 如果能夠肯定 perso…

如何選擇正確的容器編排以及如何進行部署

by Michael Douglass邁克爾道格拉斯(Michael Douglass) 如何選擇正確的容器編排以及如何進行部署 (How to choose the right container orchestration and how to deploy it) Running server processes inside containers is here to stay. If your environment is small with…

Oracle 學習筆記(三)

oracle 表查詢 oracle 表基本查詢 在此,基于 scott 用戶存在的 emp,dept 表演示學習。 emp 雇員表 clerk 員工 salesman 銷售 manager 經理 analyst 分析師 president 總裁 mgr 上級的編號 hiredate 入職時間 sal 工資 comm 獎金 deptno 部…

html meta標簽使用總結(轉)

之前學習前端中&#xff0c;對meta標簽的了解僅僅只是這一句。 <meta charset"UTF-8"> 但是打開任意的網站&#xff0c;其head標簽內都有一列的meta標簽。比如我博客的。 但是自己卻很不熟悉&#xff0c;于是把meta標簽加入了寒假學習計劃的最前方。 簡介 在查…

bzoj 4009 接水果 整體二分

Description 先給出一些盤子, 用路徑x-y表示, 有權值 再有Q個詢問, 表示水果, 用路徑x-y表示 如果盤子是水果的子路徑, 可以接住 對于每個水果, 輸出可以接住它的盤子的第k小權 Solution 對于x-lca-y的盤子&#xff0c;水果一定一個在x子樹&#xff0c;一個在y子樹 對于x-lca的…

離散元 python_剛開始學習離散元軟件Yade,有什么建議?

用Yade-DEM 做過博士期間的部分工作&#xff0c;也是從毫無所知到算是入門&#xff0c;分享一點我的學習過程&#xff0c;為那些剛接觸Yade的同學提供些許參考&#xff0c;希望對大家有幫助。0. Yade 簡介Yade 是一個用于離散元分析的開源平臺&#xff0c;是法國Lab 3SR-Grenob…

leetcode529. 掃雷游戲(dfs)

讓我們一起來玩掃雷游戲&#xff01; 給定一個代表游戲板的二維字符矩陣。 ‘M’ 代表一個未挖出的地雷&#xff0c;‘E’ 代表一個未挖出的空方塊&#xff0c;‘B’ 代表沒有相鄰&#xff08;上&#xff0c;下&#xff0c;左&#xff0c;右&#xff0c;和所有4個對角線&#…

redhat6 刪除mysql_Red Hat enterprise linux 6卸載默認安裝的 mysql

因為Red Hat enterprise linux 6 自帶了一個mysql&#xff0c;所以當你安裝新的mysql時&#xff0c;就會提示錯誤如&#xff1a;error&#xff1a;Failed dependencies&#xff1a;MySQL conflicts with mysql-5.1.47-4.el6.i686rmp -qa mysql 可以看到安裝的mysql于是將自帶的…

swift通知欄推送_如何使用Swift使用推送通知構建食品交付應用

swift通知欄推送by Neo Ighodaro由新Ighodaro 如何使用Swift使用推送通知構建食品交付應用 (How to build a food delivery app with push notifications using Swift) A basic understanding of Swift and Node.js is needed to follow this tutorial.要學習本教程&#xff0…

Jenkins持續集成實踐之java項目自動化部署

關于Linux安裝Jenkins可以參考我的這篇博文Ubuntu16.04環境安裝jenkins 1.安裝部署插件 進入插件管理&#xff0c;并搜索該插件Deploy to container Plugin進行安裝 &#xff0c;下載地址為&#xff1a;https://wiki.jenkins-ci.org/display/JENKINS/DeployPlugin 2.安裝完后&a…

云計算時代企業內部IT人員的新定位

本文講的是云計算時代企業內部IT人員的新定位&#xff0c;【IT168 云計算頻道】漸漸的云計算熱起來&#xff0c;但是怎么去嚴格定義云計算&#xff0c;還是沒有一個統一的說法&#xff0c;最常用的就是舉例子的方式來說什么是云計算&#xff0c;最常用來打比方的是電力&#xf…

Java 多線程 筆記 轉自http://www.cnblogs.com/lwbqqyumidi/p/3804883.html

多線程作為Java中很重要的一個知識點&#xff0c; 一.線程的生命周期及五種基本狀態 關于Java中線程的生命周期&#xff0c;首先看一下下面這張較為經典的圖&#xff1a; 上圖中基本上囊括了Java中多線程各重要知識點。掌握了上圖中的各知識點&#xff0c;Java中的多線程也就基…

leetcode207. 課程表(dfs/bfs)

你這個學期必須選修 numCourse 門課程&#xff0c;記為 0 到 numCourse-1 。 在選修某些課程之前需要一些先修課程。 例如&#xff0c;想要學習課程 0 &#xff0c;你需要先完成課程 1 &#xff0c;我們用一個匹配來表示他們&#xff1a;[0,1] 給定課程總量以及它們的先決條件…

r.java是什么_R.java文件介紹

http://blog.chinaunix.net/uid-21411227-id-4133828.html注意&#xff1a;R.java文件不能手動修改。1. HelloWorld工程中的R.java文件解析package com.android.hellworld;public final class R {public static final class attr {}public static final class drawable {public…