Question

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.

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.

Thanks in advance!

No correct solution

OTHER TIPS

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.

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:

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++).

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.

Within 1 hour you can only test his programming skills, but it's not enough to write the code sample.

Take a look at this C# / ASP.NET MVC test:

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.

This is very simple example, but it would show you how user writes the code, what techniques does he use.

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.

And give the developer 1 hour to write the application. Make it realistic that they can implement the features in the given time frame.

As Joel and Jeff say on the Stackoverflow podcast, there is a direct correlation between developer skill and speed.

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?

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.

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.

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.

You should check GeekInterview -- a good source for interview questions There are hundreds of questions.

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 Theory related 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)

My 2 cents:

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 least what we require), document the corner cases, document the program itself if you want to, and then send the test back to us.

A developer has 48 hours to complete that test. We ask for production quality in the test. We want to test the following items:

  • 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"?

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.

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.

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.

I would test for lambda expressions, performance patterns maintain files, or writing an object to several files dynamically.

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.

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:

1) What will be printed by running the program?

 
    #if DEBUG
            Console.WriteLine("DEBUG");
    #else
            Console.WriteLine("RELEASE");
    #endif
    

2) What will be the result of calling 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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top