Interview Questions

590 words.

I was asked recently to sit in on an interview to evaluate a candidate’s .NET experience. I thought about what kinds of questions I could ask, did some Googling, and thought back to some of the technical interviews I’d been through.

I found literally hundreds of .NET interview questions onTechInterviews.com. Scanning through them made me laugh. They aren’t interview questions at all, they are more like geek trivia questions. I can assure any young programmers out there that you will never need to know the answers to 95% of those questions in the daily course of your job, and even if you did need to know one, it takes anywhere from seconds to minutes to find the answers you need using a combination of Intellisense, MSDN Library, and Google.

What’s missing entirely from those lists are questions dealing with software development concepts, which imho are more important than syntax and API calls.

Here are the questions I came up with. These were tailored specifically for the skills listed on the candidate’s resume and skills we were looking for.

Object-Oriented Basics

  • The old standard: What is the difference between an Interface and an Abstract class?
  • In C#, what does it mean to use the “virtual” modifier on a class method? The “static” modifier?

General

  • What .NET class is everything derived from? *
  • Will the finally block get executed if an exception has not occurred? *
  • When should you call the garbage collector in .NET? *

Data Structures

  • What’s the difference between a Hashtable and a List?

.NET 1.1 vs. 2.0

  • What’s different about System.Configuration in .NET 2.0?
  • What are Generics?

ASP.NET

  • What is a WSDL?
  • What are some ways to protect against cross-site scripting and SQL injection attacks in an ASP.NET app?

ADO.NET

  • To read rows from a database, one could use DataAdapter.Fill to fill a DataSet object or DataCommand.ExecuteReader to get a DataReader object. What’s the difference?
  • What does the “Initial Catalog” parameter specify in a connection string? *

Discipline

  • Why would you write a design approach before coding? **
  • Why would you stick with a naming convention?
  • What are your thoughts on error handling?

Experience

  • Do you prefer to use Visual Studio designers or write code directly?
  • How many users consume your software?
  • Have you worked with source control?
  • Have you worked with database administrators?
  • Have you used Microsoft Enterprise Library?
  • Have you used Microsoft AJAX Extensions?

Passion

  • What is a “design pattern?”

  • What is “NUnit?”

  • Do you follow any programming blogs?

  • I didn’t think of these; I pulled them directly from another batch of questions somebody gave to me.

** I added this one because we have to write a lot of design documents to appease various levels of management.

As you can see, I tried to avoid trivia questions about syntax, but I think the answers to those questions would reveal a lot about a person’s experience level.

In a perfect world, I think it would also be instructive to ask a candidate to write a very, very short piece of code — say, 10 lines or less — to solve some trivial problem (eg. to strip numbers from a string). In a really perfect world, I might even setup a laptop with Visual Studio and a very simple set of project requirements or changes, and ask the candidate to build or alter the project. That was something I had to do once. (When I say simple, I mean something that shouldn’t take more than 10-15 minutes.)

All in all, the experience was very instructive for me.

Related

This page is a static archival copy of what was originally a WordPress post. It was converted from HTML to Markdown format before being built by Hugo. There may be formatting problems that I haven't addressed yet. There may be problems with missing or mangled images that I haven't fixed yet. There may have been comments on the original post, which I have archived, but I haven't quite worked out how to show them on the new site.

Sorry, new comments are disabled on older posts. This helps reduce spam. Active commenting almost always occurs within a day or two of new posts.