我的公司即将招聘。net开发人员。我们在各种。net平台上工作:ASP。NET,紧凑框架,windows窗体,Web服务。我想整理一份好问题的清单/目录,这是一种衡量应聘者是否有经验的最低标准。我的问题是:

你认为一个优秀的。net程序员应该能够回答哪些问题?

我也会把它看作是我自己的一张清单,以便看到我自己的缺陷在哪里(有很多……)

*更新:它想要明确的是,我们不仅仅测试。net知识,解决问题的能力和一般的编程技能对我们来说更重要。


当前回答

我不会问那些“从课本上知道一些东西”的问题,而是问一些修补性的问题,比如:

在普通c#中foreach循环做什么?(期望他写一个迭代器循环。) 什么是单例? 让他/她解析一个String to Datetime(期望他/她使用TryParse而不是try/catch) 实现单例模式、策略模式和命令模式 让他/她重构一段代码进行测试。期望他/她将外部服务从测试单元中抽象出来,并实现他自己的服务的Test-double(不提供mock框架)

这些都不是100%确定的,这取决于我问的人:

让他/她保护一个方法不受空输入的影响(期望他/她使用多次返回来减少嵌套) 对象初始化器如何工作(期望他/她写线程安全的赋值)

此外,我还会问他/她是如何学习他/她的东西的,他/她在读什么(什么博客,书籍)。

其他回答

还有一些:

垃圾收集的局限性是什么。

了解终结器和IDisposable。

注意线程池以及何时使用它。

如果你在做GUI应用程序——注意Windows GUI是单线程的。

使用foreach(我看到很多人使用MoveNext等)

我在Scott Hanselman的博客上找到了这些列表:

伟大的。net开发人员应该知道什么(更多。net面试问题) ASP。NET面试问题

以下是我从这些文章中归纳出来的最重要的问题。我编辑并重新编排了它们。幸运的是,对于这些问题中的大多数,在Stack Overflow上已经有了很好的答案。只要按照链接(我会尽快更新它们)。

与平台无关的。net问题

What is the difference between a thread and a process? What is the difference between an EXE and a DLL? What is strong-typing versus weak-typing? What is the difference between a.Equals(b) and a == b? What is boxing? Is string a value type or a reference type? What is the Global Assembly Cache (GAC)? What problem does it solve? What is an Interface and how is it different from a Class? What is Reflection? Conceptually, what is the difference between early-binding and late-binding? When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate? What is an Asssembly Qualified Name? Is it a filename? How is it different? How is a strongly-named assembly different from one that isn’t strongly-named? What does this do? sn -t foo.dll How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization? What is the difference between Finalize() and Dispose()? (external article) What is the difference between in-proc and out-of-proc? What technology enables out-of-proc communication in .NET? What is FullTrust? Do GAC’ed assemblies have FullTrust? What is the difference between Debug.Write and Trace.Write? When should each be used? What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not? What is the difference between: catch (Exception e) {throw e;} and catch (Exception e) {throw;} ? What is the difference between typeof(foo) and myFoo.GetType()? What is the purpose of XML Namespaces? What is the difference between an XML "Fragment" and an XML "Document"? (XML Basics) How would you validate XML using .NET?

ASP。网

What is a PostBack? What is ViewState? How is it encoded? Is it encrypted? Who uses ViewState? Why is it either useful or evil? What Session State providers are available in ASP.NET? What are the pros and cons of each? What is the OO relationship between an ASPX page and its CS/VB code behind file? How would one implement ASP.NET HTML output caching, caching outgoing versions of pages generated via all values of q= except where q=5 (as in http://localhost/page.aspx?q=5)? What are HttpHandlers? What are HttpModules? What is needed to configure a new extension for use in ASP.NET? For example, what if I wanted my system to serve ASPX files with a *.jsp extension? How do cookies work? What is an example of Cookie abuse? What kind of data is passed via HTTP Headers? How does IIS communicate at runtime with ASP.NET? Where is ASP.NET at runtime in the different versions of IIS (5 to 7)?

我认为这不应该只是问题,我认识一些人,当你面试他们的时候,他们很聪明,但一旦他们进入现实,他们就太完美主义了,我想说,他们在完成任务时很糟糕。

我曾经参加过一次面试,我喜欢第一个雇主给我一份技术问卷,让我在30分钟内填写。如果一个人成功了,他将被要求进行一个1小时的面试,包括性格判断和性格发现问题以及专业术语。

然后我被要求在6个小时内开发一个3页的web应用程序。在应用程序中施加的约束巧妙地涵盖了应用程序开发的主要方面,如小ERD,分层设计,UI一致性,控制特定问题,如在GridView中使用单选按钮,在web页面上从DB中获取和显示图像类型,算法开发,安全性,加密,哈希,数据表示和操作。

第二天,他们进行了30分钟的讨论,讨论开发的应用程序,包括性能瓶颈领域以及设计和使用算法的改进。并在特定条件下进行1小时的可选测试,以改进上一步开发的算法。

所以这需要相当多的时间,但通过这种方式,你可以确保你招聘的人至少知道那些优秀开发人员所必需的概念。

我不会问那些“从课本上知道一些东西”的问题,而是问一些修补性的问题,比如:

在普通c#中foreach循环做什么?(期望他写一个迭代器循环。) 什么是单例? 让他/她解析一个String to Datetime(期望他/她使用TryParse而不是try/catch) 实现单例模式、策略模式和命令模式 让他/她重构一段代码进行测试。期望他/她将外部服务从测试单元中抽象出来,并实现他自己的服务的Test-double(不提供mock框架)

这些都不是100%确定的,这取决于我问的人:

让他/她保护一个方法不受空输入的影响(期望他/她使用多次返回来减少嵌套) 对象初始化器如何工作(期望他/她写线程安全的赋值)

此外,我还会问他/她是如何学习他/她的东西的,他/她在读什么(什么博客,书籍)。

我想如果我在面试一个有LINQ经验的人,我可能会让他们解释一下LINQ。如果他们能解释延迟执行、流、IEnumerable/IEnumerator接口、foreach、迭代器块、表达式树(无论如何都是加分项),那么他们可能就能应付其余的问题。(不可否认,他们可能是“还行”的开发人员,还没有“得到”LINQ -我真的在想这样的情况,他们声称知道足够的LINQ,使这个问题成为一个公平的问题。)

在过去,我问过几个已经列出的问题,以及其他一些问题:

引用类型和值类型之间的区别 按引用传递vs按值传递 可替换和终结器 字符串,不可变性,字符编码 浮点 代表 泛型 可空类型