100 Interview Questions for Software Developers-軟件開發者面試百問

轉自:http://www.noop.nl/2009/01/100-interview-questions-for-software-developers.html

Mandrill Hiring smart software developers is not easy. If you're not careful you might end up hiring a bunch of moronic mandrills, like I did last year. And you don't want that. Trust me. Stand-up meetings are very hard to do in a tree.

The key is to ask challenging questions that enable you to distinguish the smart software developers from the moronic mandrills. And to help you with that, I decided to publish my private list of 100 interview questions for software developers.

This list covers most of the knowledge areas as defined by the Software Engineering Body of Knowledge. Of course, if you're just looking for brilliant programmers, you may want to limit the topics to Construction, Algorithms, Data Structures and Testing. And if you're looking for architects, you can just consider the questions under the headings Requirements, Functional Design and Technical Design.

But whatever you do, keep this in mind:
For most of the questions in this list there are no right and wrong answers
!

My questions are simply starting points for interesting discussions. For example: there is a question about reasons to use static methods vs. singletons. If this triggers your candidate to start a tirade againt both static methods and singletons, there's a good chance you're dealing with a smart software developer! But if the candidate can produce nothing more than a blank stare and this sound, then he might very well be a moronic mandrill. Likewise, there are many correct ways to find out whether a number is a power of 2. But if the candidate suggests using the mod operator, well... you know what I mean. (And if you don't, no problem. Fancy a banana?)

Requirements

  1. Can you name a number of non-functional (or quality) requirements?
  2. What is your advice when a customer wants high performance, high usability and high security?
  3. Can you name a number of different techniques for specifying requirements? What works best in which case?
  4. What is requirements tracing? What is backward tracing vs. forward tracing?
  5. Which tools do you like to use for keeping track of requirements?
  6. How do you treat changing requirements? Are they good or bad? Why?
  7. How do you search and find requirements? What are possible sources?
  8. How do you prioritize requirements? Do you know different techniques?
  9. Can you name the responsibilities of the user, the customer and the developer in the requirements process?
  10. What do you do with requirements that are incomplete or incomprehensible?

Functional Design

  1. What are metaphors used for in functional design? Can you name some successful examples?
  2. How can you reduce the user's perception of waiting when some functions take a lot of time?
  3. Which controls would you use when a user must select multiple items from a big list, in a minimal amount of space?
  4. Can you name different measures to guarantee correctness of data entry?
  5. Can you name different techniques for prototyping an application?
  6. Can you name examples of how an application can anticipate user behavior?
  7. Can you name different ways of designing access to a large and complex list of features?
  8. How would you design editing twenty fields for a list of 10 items? And editing 3 fields for a list of 1000 items?
  9. What is the problem of using different colors when highlighting pieces of a text?
  10. Can you name some limitations of a web environment vs. a Windows environment?

Technical Design

  1. What do low coupling and high cohesion mean? What does the principle of encapsulation mean?
  2. How do you manage conflicts in a web application when different people are editing the same data?
  3. Do you know about design patterns? Which design patterns have you used, and in what situations?
  4. Do you know what a stateless business layer is? Where do long-running transactions fit into that picture?
  5. What kinds of diagrams have you used in designing parts of an architecture, or a technical design?
  6. Can you name the different tiers and responsibilities in an N-tier architecture?
  7. Can you name different measures to guarantee correctness and robustness of data in an architecture?
  8. Can you name any differences between object-oriented design and component-based design?
  9. How would you model user authorization, user profiles and permissions in a database?
  10. How would you model the animal kingdom (with species and their behavior) as a class system?

Construction

  1. How do you make sure that your code can handle different kinds of error situations?
  2. Can you explain what Test-Driven Development is? Can you name some principles of Extreme Programming?
  3. What do you care about most when reviewing somebody else's code?
  4. When do you use an abstract class and when do you use an interface?
  5. Apart from the IDE, which other favorite tools do you use that you think are essential to you?
  6. How do you make sure that your code is both safe and fast?
  7. When do you use polymorphism and when do you use delegates?
  8. When would you use a class with static members and when would you use a Singleton class?
  9. Can you name examples of anticipating changing requirements in your code?
  10. Can you describe the process you use for writing a piece of code, from requirements to delivery?

Algorithms

  1. How do you find out if a number is a power of 2? And how do you know if it is an odd number?
  2. How do you find the middle item in a linked list?
  3. How would you change the format of all the phone numbers in 10,000 static html web pages?
  4. Can you name an example of a recursive solution that you created?
  5. Which is faster: finding an item in a hashtable or in a sorted list?
  6. What is the last thing you learned about algorithms from a book, magazine or web site?
  7. How would you write a function to reverse a string? And can you do that without a temporary string?
  8. What type of language do you prefer for writing complex algorithms?
  9. In an array with integers between 1 and 1,000,000 one value is in the array twice. How do you determine which one?
  10. Do you know about the Traveling Salesman Problem?

Data Structures

  1. How would you implement the structure of the London underground in a computer's memory?
  2. How would you store the value of a color in a database, as efficiently as possible?
  3. What is the difference between a queue and a stack?
  4. What is the difference between storing data on the heap vs. on the stack?
  5. How would you store a vector in N dimensions in a datatable?
  6. What type of language do you prefer for writing complex data structures?
  7. What is the number 21 in binary format? And in hex?
  8. What is the last thing you learned about data structures from a book, magazine or web site?
  9. How would you store the results of a soccer/football competition (with teams and scores) in an XML document?
  10. Can you name some different text file formats for storing unicode characters?

Testing

  1. Do you know what a regression test is? How do you verify that new changes have not broken existing features?
  2. How can you implement unit testing when there are dependencies between a business layer and a data layer?
  3. Which tools are essential to you for testing the quality of your code?
  4. What types of problems have you encountered most often in your products after deployment?
  5. Do you know what code coverage is? What types of code coverage are there?
  6. Do you know the difference between functional testing and exploratory testing? How would you test a web site?
  7. What is the difference between a test suite, a test case and a test plan? How would you organize testing?
  8. What kind of tests would you include for a smoke test of an ecommerce web site?
  9. What can you do reduce the chance that a customer finds things that he doesn't like during acceptance testing?
  10. Can you tell me something that you have learned about testing and quality assurance in the last year?

Maintenance

  1. What kind of tools are important to you for monitoring a product during maintenance?
  2. What is important when updating a product that is in production and is being used?
  3. How do you find an error in a large file with code that you cannot step through?
  4. How can you make sure that changes in code will not affect any other parts of the product?
  5. How do you create technical documentation for your products?
  6. What measures have you taken to make your software products more easily maintainable?
  7. How can you debug a system in a production environment, while it is being used?
  8. Do you know what load balancing is? Can you name different types of load balancing?
  9. Can you name reasons why maintenance of software is the biggest/most expensive part of an application's life cycle?
  10. What is the difference between re-engineering and reverse engineering?

Configuration Management

  1. Do you know what a baseline is in configuration management? How do you freeze an important moment in a project?
  2. Which items do you normally place under version control?
  3. How can you make sure that team members know who changed what in a software project?
  4. Do you know the differences between tags and branches? When do you use which?
  5. How would you manage changes to technical documentation, like the architecture of a product?
  6. Which tools do you need to manage the state of all digital information in a project? Which tools do you like best?
  7. How do you deal with changes that a customer wants in a released product?
  8. Are there differences in managing versions and releases?
  9. What is the difference between managing changes in text files vs. managing changes in binary files?
  10. How would you treat simultaneous development of multiple RfC's or increments and maintenance issues?

Project Management

  1. How many of the three variables scope, time and cost can be fixed by the customer?
  2. Who should make estimates for the effort of a project? Who is allowed to set the deadline?
  3. Do you prefer minimization of the number of releases or minimization of the amount of work-in-progress?
  4. Which kind of diagrams do you use to track progress in a project?
  5. What is the difference between an iteration and an increment?
  6. Can you explain the practice of risk management? How should risks be managed?
  7. Do you prefer a work breakdown structure or a rolling wave planning?
  8. What do you need to be able to determine if a project is on time and within budget?
  9. Can you name some differences between DSDM, Prince2 and Scrum?
  10. How do you agree on scope and time with the customer, when the customer wants too much?

譯文轉自:http://www.infoq.com/cn/articles/programmer-interview

想僱到搞軟件開發的聰明人可不容易。萬一一不小心,就會搞到一堆低能大狒狒。我去年就碰到這種事了。你肯定不想這樣吧。聽我的,沒錯。在樹上開站立會議門都沒有。

問點有難度的問題能幫你把聰明人跟狒狒們分開。我決定把我自己整理出來的軟件開發者面試百問發出來,希望能幫到你們的忙。

這個列表涵蓋了軟件工程知識體系中定義的大多數知識域。當然,如果你只想找出類拔萃的程序員,便只需涉及結構、算法、數據結構、測試這幾個話題。如果想僱架構師,也可以只考慮需求、功能設計、技術設計這些地方。

不過不管你怎麼做,都要牢記一點:

這裏大多數問題的答案都沒有對錯之分!

你可以把我的這些問題作爲引子,展開討論。例如下面有個問題是使用靜態方法或是單例的緣由。如果那個面試的就此展開長篇大論,那他很有可能是個聰明能幹的傢伙!如果他一臉茫然的看着你,發出這種聲音,很明顯這就是隻狒狒了。同樣,想知道一個數是不是2的乘方也有很多方法,不過要是面試的人想用mod運算符,嗯……你知道我的意思吧。(你不知道也沒關係,來根香蕉?)

需求

  1. 你能給出一些非功能性(或者質量)需求的例子麼?
  2. 如果客戶需要高性能、使用極其方便而又高度安全,你會給他什麼建議?
  3. 你能給出一些用來描述需求的不同技術麼?它們各自適用於什麼場景?
  4. 需求跟蹤是什麼意思?什麼是向前追溯,什麼是向後追溯?
  5. 你喜歡用什麼工具跟蹤需求?
  6. 你怎麼看待需求變化?它是好是壞?給出你的理由。
  7. 你怎樣研究需求,發現需求?有哪些資源可以用到?
  8. 你怎麼給需求制定優先級?有哪些技術?
  9. 在需求過程中,用戶、客戶、開發人員各自的職責是什麼?
  10. 你怎麼對待不完整或是令人費解的需求?

功能設計

  1. 在功能設計中有哪些隱喻?給出幾個成功的例子。
  2. 如果有些功能的執行時間很長,怎麼能讓用戶感覺不到太長的等待?
  3. 如果用戶必須要在一個很小的區域內,從一個常常的列表中選擇多個條目,你會用什麼控件?
  4. 有哪些方法可以保證數據項的完整?
  5. 建立系統原型有哪些技術?
  6. 應用程序怎樣建立對用戶行爲的預期?給出一些例子。
  7. 如何入手設計一組數量龐大而又複雜的特性,你能舉出一些設計思路嗎?
  8. 有一個列表,其中有10個元素,每個元素都有20個字段可以編輯,你怎樣設計這種情況?如果是1000個元素,每個元素有3個字段呢?
  9. 用不同的顏色對一段文本中的文字標記高亮,這種做法有什麼問題?
  10. Web環境和Windows環境各有些什麼限制?

技術設計

  1. 什麼是低耦合和高聚合?封裝原則又是什麼意思?
  2. 在Web應用中,你怎樣避免幾個人編輯同一段數據所造成的衝突?
  3. 你知道設計模式嗎?你用過哪些設計模式?在什麼場合下用的?
  4. 是否瞭解什麼是無狀態的業務層?長事務如何與之相適應?
  5. 在搭建一個架構,或是技術設計時,你用過幾種圖?
  6. 在N層架構中都有哪些層?它們各自的職責是什麼?
  7. 有哪些方法可以確保架構中數據的正確和健壯?
  8. 面向對象設計和麪向組件設計有哪些不同之處?
  9. 怎樣在數據庫中對用戶授權、用戶配置、權限管理這幾項功能建模?
  10. 怎樣按照等級制度給動物王國(包括各種物種和各自的行爲)建模?

程序設計

  1. 你怎樣保證你的代碼可以處理各種錯誤事件?
  2. 解釋一下什麼是測試驅動開發,舉出極限編程中的一些原則。
  3. 看別人代碼的時候,你最關心什麼地方?
  4. 什麼時候使用抽象類,什麼時候使用接口?
  5. 除了IDE以外,你還喜歡哪些必不可少的工具?
  6. 你怎麼保證代碼執行速度快,而又不出問題?
  7. 什麼時候用多態,什麼時候用委派?
  8. 什麼時候使用帶有靜態成員的類,什麼時候使用單例?
  9. 你在代碼裏面怎麼提前處理需求的變化?給一些例子。
  10. 描述一下實現一段代碼的過程,從需求到最終交付。

算法

  1. 怎樣知道一個數字是不是2的乘方?怎樣判斷一個數是不是奇數?
  2. 怎樣找出鏈表中間的元素?
  3. 怎樣改變10,000個靜態HTML頁面中所有電話號碼的格式?
  4. 舉出一個你所用過的遞歸的例子。
  5. 在散列表和排序後的列表中找一個元素,哪個查找速度最快?
  6. 不管是書、雜誌還是網絡,你從中所學到的最後一點算法知識是什麼?
  7. 怎樣把字符串反轉?你能不用臨時的字符串麼?
  8. 你願意用什麼類型的語言來編寫複雜的算法?
  9. 有一個數組,裏面是從1到1,000,000的整數,其中有一個數字出現了兩次,你怎麼找出那個重複的數字?
  10. 你知道“旅行商問題(Traveling Salesman Problem)”麼?

數據結構

  1. 怎樣在內存中實現倫敦地鐵的結構?
  2. 怎樣以最有效的方式在數據庫中存儲顏色值?
  3. 隊列和堆棧區別是什麼?
  4. 用堆或者棧存儲數據的區別是什麼?
  5. 怎樣在數據庫中存儲N維向量?
  6. 你傾向於用哪種類型的語言編寫複雜的數據結構?
  7. 21的二進制值是什麼?十六制值呢?
  8. 不管是書、雜誌還是網絡,你從中所學到的最後一點數據結構的知識是什麼?
  9. 怎樣在XML文檔中存儲足球比賽結果(包括隊伍和比分)?
  10. 有哪些文本格式可以保存Unicode字符?

測試

  1. 什麼是迴歸測試?怎樣知道新引入的變化沒有給現有的功能造成破壞?
  2. 如果業務層和數據層之間有依賴關係,你該怎麼寫單元測試?
  3. 你用哪些工具測試代碼質量?
  4. 在產品部署之後,你最常碰到的是什麼類型的問題?
  5. 什麼是代碼覆蓋率?有多少種代碼覆蓋率?
  6. 功能測試和探索性測試的區別是什麼?你怎麼對網站進行測試?
  7. 測試套件、測試用例、測試計劃,這三者之間的區別是什麼?你怎麼組織測試?
  8. 要對電子商務網站做冒煙測試,你會做哪些類型的測試?
  9. 客戶在驗收測試中會發現不滿意的東西,怎樣減少這種情況的發生?
  10. 你去年在測試和質量保證方面學到了哪些東西?

維護

  1. 你用哪些工具在維護階段對產品進行監控?
  2. 要想對一個正在產品環境中被使用的產品進行升級,該注意哪些重要事項?
  3. 如果在一個龐大的文件中有錯誤,而代碼又無法逐步跟蹤,你怎麼找出錯誤?
  4. 你怎樣保證代碼中的變化不會影響產品的其他部分?
  5. 你怎樣爲產品編寫技術文檔?
  6. 你用過哪些方式保證軟件產品容易維護?
  7. 怎樣在產品運行的環境中進行系統調試?
  8. 什麼是負載均衡?負載均衡的方式有哪些種?
  9. 爲什麼在應用程序的生命週期中,軟件維護費用所佔的份額最高?
  10. 再造工程(re-engineering)和逆向工程(reverse engineering)的區別是什麼?

配置管理

  1. 你知道配置管理中基線的含義麼?怎樣把項目中某個重要的時刻凍結?
  2. 你一般會把哪些東西納入版本控制?
  3. 怎樣可以保證團隊中每個人都知道誰改變了哪些東西?
  4. Tag和Branch的區別是什麼?在什麼情況下該使用tag,什麼時候用branch?
  5. 怎樣管理技術文檔——如產品架構文檔——的變化?
  6. 你用什麼侗劇管理項目中所有數字信息的狀態?你最喜歡哪種工具?
  7. 如果客戶想要對一款已經發布的產品做出變動,你怎麼處理?
  8. 版本管理和發佈管理有什麼差異?
  9. 對文本文件的變化和二進制文件的變化進行管理,這二者有什麼不同?
  10. 同時處理多個變更請求,或是同時進行增量開發和維護,這種事情你怎麼看待?

項目管理

  1. 範圍、時間、成本,這三項中哪些是可以由客戶控制的?
  2. 誰該對項目中所要付出的一切做出估算?誰有權設置最後期限?
  3. 減少交付的次數,或是減少每個每個交付中的工作量,你喜歡哪種做法?
  4. 你喜歡用哪種圖來跟蹤項目進度?
  5. 迭代和增量的區別在哪裏?
  6. 試着解釋一下風險管理中用到的實踐。風險該如何管理?
  7. 你喜歡任務分解還是滾動式計劃?
  8. 你需要哪些東西幫助你判斷項目是否符合時間要求,在預算範圍內運作?
  9. DSDM、Prince2、Scrum,這三者之間有哪些區別?
  10. 如果客戶想要的東西太多,你在範圍和時間上怎樣跟他達成一致呢?
發佈了808 篇原創文章 · 獲贊 1 · 訪問量 211萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章