ThatSoftwareDude
Developer Tools, Guides and Articles

Menu

Interview Questions I Enjoy Asking Programmers

When will then be now?
Interview Questions I Enjoy Asking Programmers

At my latest job I had the opportunity to interview a fair number of people. It's definitely a challenge and it takes some preparation. Somebody's future lies in your hand and you don't want to make a mistake in selecting a candidate. Choose the wrong one and you're in for a real treat. If you've read which interview questions I most dislike, now see which ones I actually enjoy.

My interview approach is very simple. I ask questions relating to the position that is being applied for. I don't ask about pointers, memory allocation and bubble sort algorithms. I ask questions about HTML, CSS, Sql Server, IIS, and .NET. There usually are multiple answers to most questions, and if the interviewee can defend their answer then more power to them. I've gotten a few people hired that have not disappointed me one bit. Here's a list of my favorite questions that I've asked and why they helped me decide who was the right fit and some witty results I received on some of them. I'll keep it a bit non-technical here, as most people probably don't care about IIS Rewrite modules or task scheduling.

Here are 3 divs. Can you create this layout using them?

A very simple question, that so many people have gotten wrong it's not even funny. It's a little funny. If you're applying for a web development position, you should know how that navigation bar was created when you were on the interwebs applying for work. Someone once told me during an interview, as a legit answer, that they "email someone for that kind of stuff". You can't possibly work on a website and not know what a div is! o-o

aaa
bbb
ccc

Create a quick phonebook database.

There are no wrong answers, and it's a simple example. It gives a good idea of db design skills, ability to normalize, referential integrity. It tells you whether the person knows what a database is. You're either going to create one table and fit as many columns as you can into it, or you're going to give me 3 or 4 basic tables, add a few PK's and FK's maybe, or lastly, you're going to scoff at the question and brush it off, because you have a phD in mechanical engineering and you're too good for that. Really happened :|

How do "YOU" insert into a database?

I once had someone tell me they email the dba for any and all database tasks. While that is a correct answer, it doesn't tell me anything about their skill. Any functioning answer works for me:

1. I call Database.Insert(insert statement) that someone wrote.
2. Here's the ADO.NET code:
SqlConnection connect = new SqlConnection();
SqlCommand command = new SqlCommand(connect, "insert statement");
etc etc
3. I use the Entity Framework SaveChanges().
All fine answers. I once got all three of those answers without me asking. It's a quick question, and it brought up other topics like mitigating sql injections and such. It's basically something that as a developer you will be doing every day.

Create a quick contact page.

One of my favorite questions, that I was once asked at an interview when I was starting off. It covers design skills, front-end, back-end, database. No other specs on this one. Doesn't even have to work really, especially given a time constraint. When I first did it, it was a mess, but it worked and most of the interview was me explaining what I did, going through bugs I left in, etc.

You have a slow query, what do you do?

There aren't too many right answers to this question. Which is why it's good. You either know, or you don't, or you can hopefully give a good guess. I've had people answer "I would select less items in the query" and that's it. How about you check if the table is indexed properly?

Name some personal projects.

Any good developer worth his weight will have at least one project they work on for themselves. Every great developer I know has several. Everyone else, doesn't even have a StackOverflow account. Someone once told me they built a game once, back in the 80's. There was no proof or anything, just "some game". Another person told me they have a number of sites they work on and spent a good amount of time telling me about the database, the code, the framework with passion in their voice. Big points for passion.

If you ask a developer to talk about their own personal work, you'll learn more than enough about that person. I've spent hours with friends discussing projects that we're working on and ways to improve them and we enjoy it. If you ask a web developer to tell you about multithreading and view engines you'll probably get a bumbling mess of an answer in return.

Write me a function that takes all the vowels out of a string.

Because I have to have at least one programming question. It's easy and it does a few things. Let's me know the person knows what a for loop is, what a function is, and it's simple enough that it should take less than a minute. My fondest memory of asking this question, is someone who did not know how to write in English I later found out, which is fine if they would of just told me. So instead they scribbled lines on top of each other while telling me the importance of making sure loops end. This took 15 minutes. Not that the rest of the interview went any well mind you, but that was the icing on the cake if you will.

I don't normally ask anything to complex as far as programming questions go, mainly because in my normal job I don't get any random complex problems to figure out. You can ask sorting questions and search algorithm questions then spend the next 15 minutes trying to figure out if their algorithm works or not, or you can ask something simple that won't confuse anyone.

A lot of people have been surprised when I ask certain questions, due to the simplicity sometimes. They pause, look at me, repeat the question, and then try to give me some complex explanation that doesn't answer the question. Simple and to the point. I avoid asking any annoying questions that could put the person off from giving me his or her real answer. If I just finished redirecting a page, adding padding on an element, or writing a quick query, how can I possibly spend an hour asking someone about Red Black Trees.

Walter G. author of blog post
Walter Guevara is a Computer Scientist, software engineer, startup founder and previous mentor for a coding bootcamp. He has been creating software for the past 20 years.

Get the latest programming news directly in your inbox!

Have a question on this article?

You can leave me a question on this particular article (or any other really).

Ask a question

Community Comments

No comments posted yet

Add a comment