每个优秀的.NET开发人员都应该回答的问题吗? [英] Questions every good .NET developer should be able to answer?

查看:64
本文介绍了每个优秀的.NET开发人员都应该回答的问题吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的公司即将聘请 .NET开发人员。我们在各种.NET平台上工作:ASP.NET,Compact Framework,Windowsforms,Web Services。我想汇编一个好的问题清单/目录,这是一种最低标准,以查看申请人是否有经验。因此,我的问题是:

My company is about to hire .NET developers. We work on a variety of .NET platforms: ASP.NET, Compact Framework, Windowsforms, Web Services. I'd like to compile a list/catalog of good questions, a kind of minimum standard to see if the applicants are experienced. So, my question is:

您认为什么问题,一个好的 .NET程序员应该能够回答

我也将其视为自己的清单,以便查看自己的不足之处(em许多...)。

I'd also see it as a checklist for myself, in order to see where my own deficits are (there are many...).

*更新:它想表明我们不仅在测试.NET知识,而且解决问题的能力和一般的编程技能对于我们。

*UPDATE: It want to make clear that we're not testing only for .NET knowledge, and that problem solving capabilities and general programming skills are even more important to us.

推荐答案

基本问题包括:

  • Whats the difference between an abstract class and interface? When would you want to use them?
  • What's the difference between a left join and an inner join?
  • What's the difference between viewstate and sessionstate?
  • What's the difference between overriding and overloading a method? Explain how both are done.
  • What's the difference between protected and internal? What about "protected internal"?
  • How do short-circuited operators work?
  • Explain what the StringBuilder class is and why you'd want to use it?
  • What's the difference between a static method and a non-static method?
  • What does the "volatile" keyword in C# mean?
  • Explain what happens when you pass a "ref" or "out" parameter into a method. What's the difference between those two keywords?
  • What's a weakreference? When would you want to use one?
  • What's the difference between a DataTable and a DataReader?
  • What's the difference between a value-type and a reference type?
  • What does the "readonly" keyword in C# mean?

我认为通常可以帮助您的申请人完成一个简单的编码练习,例如:

I think it usually helps to ask your applicants to complete a simple coding exercise such as:


  • 编写您自己的链接列表类而不使用内置的类。

  • 编写您自己的哈希表类,而无需使用内置类。

  • 编写一个表示二叉树的类。写一个遍历树的所有节点的方法。

  • 编写一个无需使用内置方法就可以对数组执行二进制搜索的方法。

  • 为博客绘制数据库架构。每个用户只有一个博客,每个博客都有很多类别,每个类别都有很多帖子,每个帖子可以属于多个类别。请您的申请人编写查询以提取特定信息。

  • Write your own linked list class without using the built-in classes.
  • Write your own hashtable class without using the built-in classes.
  • Write a class that represents a binary tree. Write a method that traverses all nodes of the tree.
  • Write a method to perform a binary search on an array without using built-in methods.
  • Draw a database schema for a blog. Each user only has one blog, each blog has many categories, each category has many posts, and each post can belong to more than one category. Ask your applicant to write queries to pull specific information out.

接下来,查找特定的技术知识:

Next, look for specific technical know-how:


  • (事件处理程序)使用自定义事件处理程序创建一个类,并创建另一个与该自定义事件处理程序挂钩的类。

  • (XML)加载XML文档并选择具有属性x,y和z的所有节点。

  • (函数式编程)创建一个接受另一个函数作为参数的函数。 Map或Fold函数对此非常有用。

  • (反射)编写一个确定类是否具有特定属性的函数。

  • (正则表达式)编写一个正则表达式,以从HTML块中删除所有标签。

  • (Event handlers) Create a class with a custom event handler, create another class which hooks onto the custom event handler.
  • (XML) Load an XML document and select all of the nodes with properties x, y, and z.
  • (Functional programming) Create a function that accepts another function as a parameter. A Map or Fold function works really good for this.
  • (Reflection) Write a function which determines if a class has a particular attribute.
  • (Regex) Write a regular expression which removes all tags from a block of HTML.

对于熟练的C#,这些都不是特别困难的问题程序员来回答,他们应该使您对申请人的特殊优势有所了解。您可能还需要处理一些使用特定设计模式的问题/代码示例。

None of these are particularly difficult questions for a proficient C# programmer to answer, and they should give you a good idea of your applicants particular strengths. You may also want to work in a few questions/code sample that make use of specific design patterns.

似乎很多人不理解为什么我会问这些类型的问题。让我谈谈一些人的评论(我不是直接引用,而是改写):

Seems that a lot of people don't understand why I'd ask these types of questions. Let me touch on a few peoples comments (I'm not quoting directly, but paraphrasing instead):

问:什么时候最后一次有人使用挥发物或弱引用?

Q: When was the last time anyone used volatiles or weak references?

A:当我进行技术面试时,我看起来查看一个人是否理解.NET的高级低级功能。易失性和弱引用是.NET提供的两个低级功能-即使在实践中不经常使用这些功能,对这些问题的答案也非常揭示:

A: When I give technical interviews, I look to see whether a person understands the high-level and low-level features of .NET. Volatiles and weak references are two low-level features provided by .NET -- even if these features aren't used often in practice, answers to these questions are extremely revealing:


  • 对volatile的深入了解表明,一个人了解编译器优化如何更改代码的正确性,线程如何保持共享状态的本地副本(在任何给定时间可能不同步)以及

  • A good understanding of volatiles demonstrates that a person understands how compiler optimizations change the correctness of code, how threads keep local copies of shared state which may be out of sync at any given time, and is minimally aware of some of the complexities of multithreaded code.

对弱引用的良好理解表明,一个人知道垃圾回收器的内在细节,并且对垃圾回收器的内在细节一无所知。它如何决定何时释放内存。当然,您可以问候选人垃圾收集器是如何工作的,但是询问弱引用会得到更好,更周到的答复。

A good understanding of weak references demonstrates that a person knows about the intimate details of the garbage collector and how it decides when to free memory. Sure, you could ask candidates "how does a garbage collector work", but asking about weak references gets a much better, more thoughtful reply.

.NET是一种相当抽象的语言,但是明星开发人员几乎总是对CLR和.NET运行时的底层细节有深刻的了解。

.NET is a fairly abstract language, but star developers almost always have a deep understanding of the CLR and the low-level details of .NET's runtime.

问:为什么有人需要实现自己的哈希表或链接列表?

Q: Why would anyone need to implement their own hashtable or linked list?

A:我并不是在暗示Dictionary类的劣等或人们应该使用自己的哈希表。这是一个基本问题,它测试一个人是否对数据结构具有最小的理解。这就是这些问题所测试的:最低限度的理解。

A: I'm not implying that the Dictionary class is inferior or that people should roll their own hashtable. This is a basic question which tests whether a person has a minimal understanding of datastructures. Thats what these questions test for: bare minimum understanding.

您在数据结构101的第一天就了解了这些哈希表和链接列表。哈希表或从头开始的链表,那么他们在技术知识上就有很大的差距。

You learn about these hashtables and linked lists on the first day of Data Structures 101. If someone can't write a hashtable or a linked list from scratch, then they have a huge gap in their technical knowledge.

问:为什么这些问题如此偏重?

Q: Why are these questions so crud-oriented?

A:因为该主题的标题是每个优秀的.NET开发人员都应该知道的问题。每个.NET开发人员的职业生涯都是开始编写粗糙的应用程序,而人们谋生的所有应用程序开发中有90%与业务线应用程序有关。

A: Because the title of this thread is "questions every good .NET developer should know". Every .NET developer begins their career writing crud apps, and 90% of all application development people do for a living is concerned with line-of-business applications.

在大多数情况下,测试人员对业务线应用程序的知识的问题是适当的,除非您正在寻找非常特定领域的开发人员,例如编译器开发,游戏引擎开发,定理证明,图像处理等。

I think questions testing a persons knowledge of line-of-business apps are appropriate in most cases, unless you're looking for developers in very specific niches, such as compiler development, game-engine development, theorem-proving, image processing, etc.

这篇关于每个优秀的.NET开发人员都应该回答的问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆