Jump to content



Photo

Programmers: Your favorite interview questions


  • Please log in to reply
105 replies to this topic

#1 FightAndLive

FightAndLive

    Neowinian

  • Joined: 31-August 12

Posted 28 September 2012 - 07:21

I haven't seen one these posts yet on this forum(if there is forgive me : )), but I figured to help out more people looking for programming work I would start a post for employers who are looking to hire new programmers what kind of questions you guys ask. I'm the technical director at a small game studio in LA, and were expanding so I also looking to see what everyone does so I can adjust accordingly.

Some of the basic questions I ask are:

What is global scope/local scope.
What is a template class
What is inheritance/polymorphism/etc.

Than some really basic logic stuff like whats a recursive function, etc etc.

Than I begin to ask a couple questions that are kind of off the wall because one thing I noticed is College graduates from big schools such as UCLA 9/10 can't figure stuff for themselves. Students are so used to stuff getting spoon fed to them, some of which is just nasty. One thing that really irritated me at one of the studios I worked at previously a couple of there senior programmers came to me and said "I don't know how to do xyz, can you help?" This normally is a pretty common thing, except when xyz happens over and over again and its something that easily be found by doing a quick google search.

I ask the interviewee if they can do something that 99% of the programmers out there can't do. They would obviously say I don't know, I would then ask them than to look it up for me on google and write out basic steps on how to get it done. Lets say I ask them how to register a custom Debug Engine in Visual Studio, first google search for "visual studio custom debug engine" which turns up http://msdn.microsof...4(v=vs.80).aspx , with a link to http://msdn.microsof...(v=vs.110).aspx. Even though the information on the latter article is actually wrong if they copied that I would be so happy. I've had guys sit there for 10 minutes struggling, and I feel that's kind of ridiculous. Every programmer in world should know how to use google :/.

Than depending on the level of the job, I would go into some more nitpicker things say in Unreal, Unity, D3D, whatever and if someone didn't know the answer I would ask them to google it and give me an explanation. I had actually had one guy who didn't graduate from a college, straight out of high school and he didn't know something I asked him, and than he immediately asked if he could go on google and look it up. I actually hired him on the spot and he ones of the best programmers I've ever had.

Anyway what kind of stuff do you guys ask?


#2 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 6
  • Joined: 26-October 05

Posted 28 September 2012 - 17:46

I'm not an interviewer, but if I was I think I would always start with the Fizz Buzz Test. Filtering out 99.5% of incompetents with such a simple question is appealing :)

Questions I've been asked:
For a game programming, C++ position:
1) Explain what is a conditional breakpoint and how to create one.
2) Write a function in C++ to inverse the endianness of an unsigned integer.
3) You have a cloud of points in 2d. Design an algorithm to draw the smallest circle that contains all the points.

For a C# position:
1) What's the most important difference between C# and C++? (IIRC I answered that so thoroughly he didn't ask any other questions :p)

#3 HSoft

HSoft

    Neowinian Senior

  • Joined: 09-January 08

Posted 28 September 2012 - 17:50

For a C# position:
1) What's the most important difference between C# and C++? (IIRC I answered that so thoroughly he didn't ask any other questions :p)

This one is kinda subjective. Different people can have different answers and (potentially) they could all be correct.

#4 WelshBluebird

WelshBluebird

    Neowinian Senior

  • Joined: 05-August 05
  • Location: Rhondda, South Wales

Posted 28 September 2012 - 17:57

Not to do with interviews, but a quick reply to what you mentioned in your post.

In terms of using google and such, one problem is company conventions, or company specific libraries etc etc.
I just started a job as a developer, and my company has quite a lot of internally developed libraries that we can use (without any real documentation that says what the libraries include). There are also quite a lot of conventions and "done things" which restrict what kind of things we can do, and where in the code things should go. Obviously as a new starter I don't know everything that is included in the libraries or all of the conventions.

If I am struggling with something I will try to figure it out myself at first, and if that fails use google. But sometimes I will also double check with a colleague just to make sure I am not going down totally the wrong way and wasting an hour or whatever.

#5 seethru

seethru

    Neowinian Senior

  • Joined: 27-March 03
  • Location: Toronto, Ontario

Posted 28 September 2012 - 18:08

I'm a lead developer at a games studio as well.

Typically we start with FizzBuzz and move from there. I focus more on finding out how the person thinks. I'm less concerned with syntax because that can be taught, while teaching someone to think logically is near impossible.

#6 El Marto

El Marto

    Serial Lurker

  • Joined: 07-October 04
  • Location: Bucks, England

Posted 28 September 2012 - 18:10

I'm not an interviewer, but if I was I think I would always start with the Fizz Buzz Test. Filtering out 99.5% of incompetents with such a simple question is appealing :)

We use FizzBuzz and it literally filters out 95% of candidates for iOS positions as well as firmware engineers. Shocking how many people cant do it.

#7 vetneufuse

neufuse

    Neowinian Senior

  • Joined: 16-February 04

Posted 28 September 2012 - 18:14

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

I've never seen that test used in interviews myself, but gawd, if you can't do a modulus program..... and 99.5% don't get it? seriously?!

We don't even start that simple, we start out with a complex problem and see how they squirm... if they get frustrated we have an issue, if they stop think it out and write down a plan, we have a possible winner even if they don't get it, they still took the correct starting route

#8 rfirth

rfirth

    Software Engineer

  • Tech Issues Solved: 2
  • Joined: 11-September 09
  • Location: Baton Rouge, Louisiana
  • OS: Windows 8
  • Phone: Nokia Lumia 620

Posted 28 September 2012 - 18:17

I've never seen that test used in interviews myself, but gawd, if you can't do a modulus program..... and 99.5% don't get it? seriously?!


I've been asked that question. As soon as you give the solution using modulus, they ask you to do it again without using modulus/multiplication/division.

Microsoft asked me this question:
Given a matrix of numbers where all numbers are monotonically increasing from left to right across every row, and monotonically increasing from top to bottom down every column, design an efficient algorithm to search for an element in the matrix.

Then there is always the usual linked list questions.

#9 El Marto

El Marto

    Serial Lurker

  • Joined: 07-October 04
  • Location: Bucks, England

Posted 28 September 2012 - 18:18

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

I've never seen that test used in interviews myself, but gawd, if you can't do a modulus program..... and 99.5% don't get it? seriously?!

We had a woman last week open up word and write out 1-100 manually. before then going through and adding the fizz-buzz. I was literally in amazement.

#10 vetneufuse

neufuse

    Neowinian Senior

  • Joined: 16-February 04

Posted 28 September 2012 - 18:26

We had a woman last week open up word and write out 1-100 manually. before then going through and adding the fizz-buzz. I was literally in amazement.


on a simple problem, that is overkill, but after seeing how some colleges teach programming, it doesn't suprise me....

we actually did some more "annoying" things like giving people problems in ML and LISP after giving them an introduction to it and asked them to solve a problem..

if you can take a language like LISP after given a quick tutorial on it and use it, we've definatly take you to the top of the list

learning languages on the fly is definatly something few can do

my favorite problems are data structure problems, and giving a change stacking issue where you can only flip side by side coins but they can only flip if their size is greater, how to store this, how to sort it, how to sort it efficiently etc, drives some nuts

#11 vetneufuse

neufuse

    Neowinian Senior

  • Joined: 16-February 04

Posted 28 September 2012 - 18:34

I've been asked that question. As soon as you give the solution using modulus, they ask you to do it again without using modulus/multiplication/division.

Microsoft asked me this question:
Given a matrix of numbers where all numbers are monotonically increasing from left to right across every row, and monotonically increasing from top to bottom down every column, design an efficient algorithm to search for an element in the matrix.

Then there is always the usual linked list questions.


see something like that would get me because I'd have to say what's your definition of monotonically, unless you had a lot of math experience you might not of heard it before to know its a function between ordered sets.. if you gave me the definition sure could code it.

I'm a languages person, I can pick up languages quickly and learn efficiencies fast... math wise though beyond Discrete math sometimes my mind goes haywire... I hated calculus, I understand it, I just hate it.. something about calculating the volume of a sea shell always drove me nuts and finding the integral that creates it ugh

#12 vetneufuse

neufuse

    Neowinian Senior

  • Joined: 16-February 04

Posted 28 September 2012 - 18:48

I've been asked that question. As soon as you give the solution using modulus, they ask you to do it again without using modulus/multiplication/division.


if they would tell me to do it without mod/mul/div then I'd do it in binary step by step and see if they remember how that all works using bitwise masking.. not hard to take a number in binary AND it with a mask of the binary version of the divisior - 1 to get the remainder then check from there (i know this is still a modulus by hand, but it shows you understand the workings of it at the binary level)

#13 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 6
  • Joined: 26-October 05

Posted 28 September 2012 - 19:24

if they would tell me to do it without mod/mul/div then I'd do it in binary step by step and see if they remember how that all works using bitwise masking..

You don't necessarily need binary:


using System;

class Program {

    static void Main() {
        int fizz = 0;
        int buzz = 0;
        for (int i = 1; i < 100; ++i) {
            if (++fizz == 3) {
                Console.Write("Fizz");
                fizz = 0;
            }
            if (++buzz == 5) {
                Console.Write("Buzz");
                buzz = 0;
            }
            if (fizz != 0 && buzz != 0) {
                Console.Write(i);
            }
            Console.WriteLine();
        }
    }
}


#14 vetneufuse

neufuse

    Neowinian Senior

  • Joined: 16-February 04

Posted 28 September 2012 - 19:25

You don't necessarily need binary:


using System;

class Program {

	static void Main() {
		int fizz = 0;
		int buzz = 0;
		for (int i = 1; i < 100; ++i) {
			if (++fizz == 3) {
				Console.Write("Fizz");
				fizz = 0;
			}
			if (++buzz == 5) {
				Console.Write("Buzz");
				buzz = 0;
			}
			if (fizz != 0 && buzz != 0) {
				Console.Write(i);
			}
			Console.WriteLine();
		}
	}
}


yes, but binary is another way of doing it...

#15 El Marto

El Marto

    Serial Lurker

  • Joined: 07-October 04
  • Location: Bucks, England

Posted 28 September 2012 - 19:26

Interesting site for fizzbuzz solutions :) http://rosettacode.org/wiki/FizzBuzz



Click here to login or here to register to remove this ad, it's free!