编程招聘测试 - 测试开发人员在 C#/ASP.NET 中的知识
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1102592/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Programming hire test - Test a developers knowledge in C# / ASP.NET
提问by
We're hiring a .NET developer soon, and I was assigned to create a test, which would take aprox: 1h to solve. A test which would test the programmers knowledge in (mainly) C# and ASP.NET.
我们很快将招聘一名 .NET 开发人员,我被指派创建一个测试,该测试大约需要 1 小时才能解决。该测试将测试程序员在(主要)C# 和 ASP.NET 方面的知识。
This is what i've come up with so far:
这是我到目前为止想出的:
- Use project #1 to read data(HTML) from the specified URL and output all links(anchors) containing anchor name “xxxxxxxxx”. You are free to use 3rd party libraries. My main thought here was to test how the developer would go about solving the problem. For example:
- Create a regex which would parse all the data needed.
- Create a DOM-tree and use XPATH to find all anchor nodes.
- Iterate the whole string and perform manual string compares.
- Create a new solution where you demonstrate the usage of .NET masterpages.
- Connect the solution to the ******** database. And output all customers from the “********_customers” table.
- Create a new button which refreshes all users using AJAX.
Pretty basic stuff. Though, I also added the one below. Mainly to test the developers OO knowledge. Do you think this is too "overkill", or what kind of test would you suggest? If you were to hire a ASP.NET developer, what would your main focus be? ADO.NET? IO? string handling?
- Create an interface/abstract class implementation demonstrating the functionallity of either the Factory, Factory Method, Command or Decorator pattern. You wont need to implement any functionallity, just use comments in your abstract class.
- 使用项目#1 从指定的 URL 读取数据(HTML)并输出包含锚名称“xxxxxxxxx”的所有链接(锚)。您可以自由使用 3rd 方库。我在这里的主要想法是测试开发人员将如何解决问题。例如:
- 创建一个正则表达式来解析所有需要的数据。
- 创建一个 DOM 树并使用 XPATH 查找所有锚节点。
- 迭代整个字符串并执行手动字符串比较。
- 创建一个新的解决方案,您可以在其中演示 .NET 母版页的用法。
- 将解决方案连接到 ******** 数据库。并输出“********_customers”表中的所有客户。
- 创建一个使用 AJAX 刷新所有用户的新按钮。
很基本的东西。不过,我还添加了下面的一个。主要是测试开发者的OO知识。您是否认为这太“矫枉过正”,或者您会建议进行什么样的测试?如果您要聘请 ASP.NET 开发人员,您的主要关注点是什么?ADO.NET?IO?字符串处理?
- 创建一个接口/抽象类实现来演示工厂、工厂方法、命令或装饰器模式的功能。您不需要实现任何功能,只需在抽象类中使用注释即可。
Thanks in advance!
提前致谢!
回答by Shimmy Weitzhandler
The first test you suggested should take 10min-40min for a basic dev - I would use a web-crawler I have in my library that converts HTML to XML then easily use Linq to XML.
您建议的第一个测试应该需要 10 分钟到 40 分钟进行基本开发 - 我将使用我的库中的网络爬虫将 HTML 转换为 XML,然后轻松使用 Linq 到 XML。
I would test for lambda expressions, performance patterns maintain files, or writing an object to several files dynamically.
我会测试 lambda 表达式、性能模式维护文件或将对象动态写入多个文件。
Maybe you would like to test unmanged code, pointers etc.
也许你想测试无人管理的代码、指针等。
I donno, im just writing-jabbering while things are comin up to my mind, i wrote things that was hard for me to implement.
我不,我只是在写东西的时候胡言乱语,我写的东西对我来说很难实现。
回答by emvy
You should check GeekInterview -- a good source for interview questionsThere are hundreds of questions.
你应该查看 GeekInterview——一个很好的面试问题来源有数百个问题。
回答by Brock Woolf
I would have thought that it would be better to simply create a test that would make it easy for you to put developers into different 'skill buckets'.
我原以为最好是简单地创建一个测试,让您可以轻松地将开发人员放入不同的“技能桶”中。
Why not have three or four sections or features that the developer must 'layer' features on top one another to show their programming and design skills.
为什么没有三四个部分或功能,开发人员必须将这些功能“分层”在彼此之上,以展示他们的编程和设计技能。
- Part 1: Implement x easy difficulty features.
- Part 2: Implement x medium difficulty features.
- Part 3: Implement x difficult features.
- Part 4: Implement x very difficult features.
- 第 1 部分:实现 x 简单难度功能。
- 第 2 部分:实现 x 中等难度功能。
- 第 3 部分:实现 x 困难的功能。
- 第 4 部分:实现 x 非常困难的功能。
And give the developer 1 hour to write the application. Make it realistic that they can implement the features in the given time frame.
并给开发人员 1 小时的时间来编写应用程序。使他们可以在给定的时间范围内实现这些功能变得现实。
As Joel and Jeff say on the Stackoverflow podcast, there is a direct correlation between developer skill and speed.
正如 Joel 和 Jeff 在 Stackoverflow 播客中所说,开发人员的技能和速度之间存在直接关联。
Think about the way exams are structured? We can all get 100% of the questions correct in any exam we sit if we had infinite time, but in 1 hour?
想想考试的组织方式?如果我们有无限的时间,我们可以在我们参加的任何考试中 100% 正确答对问题,但在 1 小时内?
This way, If a developer takes your test and only implements features up to Section 2 in the time period, then you should have a safe indication that they are not suitable for the job. Section 3 features all done then they are good enough and section 4 complete would indicate that they are very experienced and a slight cut above the rest.
这样,如果开发人员接受了您的测试并且仅在该时间段内实现了第 2 部分的功能,那么您应该有一个安全的迹象表明它们不适合该工作。第 3 节的功能都完成了,那么它们就足够好了,第 4 节完成将表明它们非常有经验,并且比其他部分略有减少。
However I would also look at the overall polish that the developer has given to the code. If they implemented all features up to section 4, but poorly, then they are also not going to be someone you want. IF a developer only did up to section 3 but implemented everything very elegantly, then I would want to hire them.
但是,我还会查看开发人员对代码的整体润色。如果他们实现了第 4 节之前的所有功能,但效果不佳,那么他们也不会成为您想要的人。如果开发人员只完成了第 3 部分,但非常优雅地实现了所有内容,那么我会想雇用他们。
I also think that 1 hour is perhaps a little too long. I would aim for 10-40 minutes obviously you may need to cut out section 4 that I proposed.
我也认为 1 小时可能有点太长了。我的目标是 10-40 分钟,显然你可能需要删掉我提议的第 4 部分。
回答by Simon P Stevens
In the past we have used problems from Google code jam. the problems in the early rounds are easier and they get gradually harder. They are kind of algorithmic in nature, you can solve them in whatever language you like. As they get harder there is often an obvious 'brute force' kind of answer that won't work because of the size of the data. So you have to think of something more optimal.
过去我们使用过来自Google code jam 的问题。前几轮的问题更容易,然后逐渐变得更难。它们本质上是一种算法,你可以用任何你喜欢的语言来解决它们。随着它们变得越来越难,通常会出现明显的“蛮力”类答案,但由于数据的大小,该答案将不起作用。因此,您必须考虑更优化的方法。
回答by Marcin
The task you gave is essentially a day or two worth of coding if you want to have reasonably readable code. Within an hour I guess I would do it, but you'd have to read code that has cryptically named methods, unreadable regexes, weird callbacks, no error handling and overall is pretty darn ugly. Looking at it you would not hire me.
如果您想获得合理可读的代码,您提供的任务基本上是一两天的编码。我想我会在一小时内完成,但是您必须阅读具有神秘命名方法、不可读的正则表达式、奇怪的回调、没有错误处理的代码,而且总体而言非常丑陋。看着它,你不会雇用我。
Before you give your question to candidates, first make sure that your peers/programmers can do it first. And that you can code it in less than 60 minutes in a way that would satisfy you.
在向候选人提出问题之前,首先要确保您的同行/程序员可以先做。并且您可以在不到 60 分钟的时间内以一种令您满意的方式对其进行编码。
That said, I do not know if test is the best choice for hiring anyone. A few interviewing bloggers wrote about their experience coming from conducting tons of interviews:
也就是说,我不知道测试是否是雇用任何人的最佳选择。一些采访博客写了他们从进行大量采访中获得的经验:
- Guerilla Guide to Interviewingby Joel Spolksy
- Truth about interviewing, Get that job at Google(and many others) by Steve Yegge
I totally agree with them. Having conducted about a gazillion of interviews myself, I find that asking basic technology related questions is not nearly as good as asking to implement a bit of recursion or pointers (if someone claims to know C/C++).
我完全同意他们的看法。我自己进行了无数次面试后,我发现询问与基本技术相关的问题远不如要求实现一些递归或指针(如果有人声称了解 C/C++)。
By hiring someone who understands recursion/algorithms you get a smart guy who can learn new technology. When you hire someone who knows how to connect to a database, who knows how to connect to a database but not necessarily qualified to do much more than that.
通过聘请了解递归/算法的人,你会得到一个可以学习新技术的聪明人。当您雇用知道如何连接到数据库的人时,他知道如何连接到数据库但不一定有资格做更多的事情。
There are a few sources of good programming questions that are somewhere between coding and algorithms that may inspire you. They do not test .NET at all, but are very good indicator of smart programmers.
有一些很好的编程问题的来源,它们介于编码和算法之间,可能会激发你的灵感。它们根本不测试 .NET,但它们是聪明程序员的一个很好的指标。
回答by Eric Schoonover
I think you would be much better off coming up with a single question that will allow you to see more than just development skills using your target technologies. Strong problem solving skills are as important as expertise in a specific technology stack.
我认为你最好提出一个问题,让你看到的不仅仅是使用目标技术的开发技能。强大的问题解决能力与特定技术堆栈的专业知识一样重要。
I would even recommend that you explore the two aspects of a candidate in different parts of the process. I usually ask a bunch of questions about the technology stack we are using on our project to gauge the candidates level of knowledge as it relates to that stack.
我什至建议您在流程的不同部分探索候选人的两个方面。我通常会问一堆关于我们在项目中使用的技术堆栈的问题,以衡量候选人与该堆栈相关的知识水平。
Then I ask them a pure problem solving question and I allow them to use whichever technology they are most comfortable with to solve the problem (their choice of technology can be an important indicator).
然后我问他们一个纯粹的问题解决问题,我允许他们使用他们最熟悉的技术来解决问题(他们选择的技术可以是一个重要的指标)。
I particularly like Graph Theoryrelated problems. The candidates solutions will tell you a ton about how they approach, solve problems as well as how they validate their solutions.
我特别喜欢图论相关的问题。候选人的解决方案会告诉你很多关于他们如何处理、解决问题以及他们如何验证他们的解决方案。
As part of the problem solving portion of the interview you should be looking for:
作为面试的问题解决部分的一部分,您应该寻找:
- Proper data structure design
- Implementation of OO best practices
- Proper solution (can they debug problems effectively... one great way to see this is do not allow them to use a computer, make them code on a whiteboard and debug in their heads)
- Proper solution validation (do they come up with test cases)
- 正确的数据结构设计
- 面向对象最佳实践的实施
- 正确的解决方案(他们能否有效地调试问题......看到这一点的一个好方法是不允许他们使用计算机,让他们在白板上编码并在他们的头脑中调试)
- 正确的解决方案验证(他们是否提出了测试用例)
回答by Ravi Wallau
My 2 cents:
我的 2 美分:
We have a programming test in my company that is easy. Basically, you have to implement the listener pattern extending the ArrayList class, create unit tests for it (based on at leastwhat we require), document the corner cases, document the program itself if you want to, and then send the test back to us.
我们公司有一个很容易的编程测试。基本上,您必须实现扩展 ArrayList 类的侦听器模式,为其创建单元测试(至少基于我们需要的内容),记录极端情况,记录程序本身(如果需要),然后将测试发送回我们。
A developer has 48 hours to complete that test. We ask for production quality in the test. We want to test the following items:
开发人员有 48 小时的时间来完成该测试。我们在测试中要求生产质量。我们要测试以下项目:
- Was the developer smart enough to cover the corner cases?
- Is the developer implementation of multi-threading satisfactory?
- Are the unit tests good enough? Do they cover enough cases?
- Is the code well written and documented? Will someone be able to maintain that code in the future?
- Does he care about his code? Did he explain why he did "A" and not "B"?
- 开发人员是否足够聪明以涵盖极端情况?
- 多线程的开发者实现是否令人满意?
- 单元测试是否足够好?它们是否涵盖了足够的案例?
- 代码是否编写良好并有文档记录?将来有人能够维护该代码吗?
- 他关心他的代码吗?他有没有解释为什么他做“A”而不是“B”?
I don't think short tests are capable of evaluating a developer. You may ask for a tool or technology that someone have not been using in the past months, and whoever is being tested for that technology will need sometime to get up to speed - but if a developer was working with that the day before, he will know by memory how to use it, and he/ she will seem smarter than the other developer, what may not be true.
我认为短期测试无法评估开发人员。您可能会要求某人在过去几个月内没有使用过的工具或技术,并且正在接受该技术测试的任何人都需要一些时间来加快速度 - 但如果开发人员在前一天使用过,他会凭记忆知道如何使用它,他/她看起来比其他开发人员更聪明,这可能不是真的。
But if you ask for something that is tricky and you are interviewing the developer, you can check how he is going to solve the problem - I don't think it really matters if he/ she cannot get the 100% right answer, as long as he/ she can talk about the problems that you found on the code and show that they actually understand whatever you explained to them.
但是如果你问一些棘手的事情并且你正在采访开发人员,你可以检查他将如何解决这个问题——我认为他/她不能得到 100% 正确的答案并不重要,只要因为他/她可以谈论您在代码中发现的问题,并表明他们实际上理解您向他们解释的任何内容。
回答by Sam
Within 1 hour you can only test his programming skills, but it's not enough to write the code sample.
1小时内你只能测试他的编程能力,但写代码示例是不够的。
Take a look at this C# / ASP.NET MVC test:
看看这个 C#/ASP.NET MVC 测试:
http://tests4geeks.com/test/asp-net-mvc-c-sharp
http://tests4geeks.com/test/asp-net-mvc-c-sharp
After the applicant will pass the test and result will be good, then invite him to the interview and talk about his experience. Ask about most difficult features, that he implemented in his projects. In other words, you must understand, if he know and can do enough to take part in your project.
申请人通过测试,结果良好后,再邀请他参加面试,谈谈他的经历。询问他在项目中实现的最困难的功能。换句话说,你必须明白,如果他知道并且能够做足够多的事情来参与你的项目。
If you still want to ask him to write some code. That is some idea:
如果你还想请他写一些代码。这是一些想法:
There are the students and subjects. Please ask to write 3 pages (asp .net mvc or web-forms). First and second - for editing the dictionary of students and subjects. Third form must contain be the table. The students are in left column. The subjects are in the top row. The marks are at the intersection. Each mark can be edited (text box) and saved. Saving could be implemented by clicking the common button "Save". Or it could save each cell automatically using the Ajax.
有学生和科目。请要求写 3 页(asp .net mvc 或 web-forms)。第一个和第二个 - 用于编辑学生和科目的词典。第三种形式必须包含表。学生在左栏。主题位于顶行。标记在交叉点处。每个标记都可以编辑(文本框)和保存。可以通过单击常用按钮“保存”来实现保存。或者它可以使用 Ajax 自动保存每个单元格。
This is very simple example, but it would show you how user writes the code, what techniques does he use.
这是一个非常简单的例子,但它会向您展示用户如何编写代码,他使用什么技术。
回答by Alexander Vovolka
few days ago I was invited to pass C# programming test at skillbox website there was 30 questions quiz and 45 time to pass it. Below is some of them:
前几天我被邀请通过skillbox网站的C#编程测试,有30个问题测验和45次通过。以下是其中一些:
1) What will be printed by running the program?
1)运行程序会打印什么?
#if DEBUG Console.WriteLine("DEBUG"); #else Console.WriteLine("RELEASE"); #endif
2) What will be the result of calling SomeMethod():
2) 调用 SomeMethod() 的结果是什么:
public static void SomeMethod() { string s1 = "a"; string s2 = "b"; Swap(ref s1, ref s2); Console.WriteLine(s1); Console.WriteLine(s2); } public static void Swap(ref Object a, ref Object b) { Object t = b; b = a; a = t; }
Here is a link for reference, I think you can find more C# quezzes there http://skillbox.io
这是一个参考链接,我想你可以在http://skillbox.io找到更多的 C# quezzes