Stoopid Tech Interviewer Tricks

Published 16 January 08 01:19 AM | Mike C

OK, so you’ve got your suit fresh from the drycleaners. Your shirt is pressed and your shoes are shined. You’ve gone over the job requirements a dozen times, and even took the time to scan BOL for obscure tips the interviewer might try to turn into trick questions. All that hard work and now you find yourself on the losing end of a conversation like this:

 

Interviewer: “Tell me about your favorite new feature of SQL Server 2005.”

You: “I like the new XML data type, I’ve found that...”

Interviewer: “That’s not a new feature. That was around in SQL 2000.”

 

[‘Nuff said.]

 

So what do you do?  As I told my friend (the job applicant) my first instinct would have been to stand up, shake the interviewer’s hand, and politely tell him that the interview was over.  My friend, however, has a much higher threshold for mental anguish than I do.

 

Just for grins, here are some more recent gems from various friends on tech. interviews:

 

Interviewer: “What’s the difference between a temporary variable and a temporary table?”

Applicant: “The temporary variable has well-defined scope, they cause fewer stored procedure recompilations than temporary tables, and they are not affected by transaction rollbacks.”

Interviewer: “You left out the most important part – table variables are always stored in memory, they don’t clog up tempdb!”

 

[Yes, he used the highly technical term "clog up". Microsoft weighs into the discussion with the following from http://support.microsoft.com/default.aspx/kb/305977: A table variable is not a memory-only structure. Because a table variable might hold more data than can fit in memory, it has to have a place on disk to store data. Table variables are created in the tempdb database similar to temporary tables. If memory is available, both table variables and temporary tables are created and processed while in memory (data cache).”]

 

Interviewer: “Why do we normalize our tables?”

Applicant: “To preserve data integrity.”

Interviewer: “No, that’s not right.”

 

[No further explanation was apparently necessary or forthcoming from this idiot. Dr. Codd had a few words on this in his paper "Further Normalization of the Data Base Relational Model". One of his objectives of normalization was to free the database from certain insert, update, and delete anomalies. Sounds like a data integrity issue to me, but I ain't no hiring manager...]

 

Interviewer: “What’s the difference between using DELETE to delete all rows from a table and using TRUNCATE?”

Applicant: “DELETE logs every row as it’s being deleted, TRUNCATE logs page deallocations so TRUNCATE executes much faster. Oh, and TRUNCATE reseeds the IDENTITY column if the table has one.”

Interviewer: “No. TRUNCATE is not logged.”

 

[Microsoft’s take on the situation is at http://technet.microsoft.com/en-us/library/ms177570.aspx: “TRUNCATE TABLE removes the data by deallocating the data pages used to store the table data and records only the page deallocations in the transaction log.” You be the judge.]

 

Interviewer: “Why does BULK INSERT provide better performance than individual INSERT statements?”

Applicant: “For one thing if you’re loading 1,000,000 rows you’re not running 1,000,000 individual INSERT statements. Also BULK INSERT queues up batches of rows and commits them in batches. BULK INSERT can also take advantage of minimal logging if your database is configured appropriately.”

Interviewer: “Wrong, BULK INSERT doesn’t write to the transaction log!”

 

[Hmmm, Microsoft seems to think it does. In reference to BULK INSERT with minimal logging “...the Database Engine still logs extent allocations each time a new extent is allocated to the table.” If your database is in full recovery mode, “all row-insert operations that are performed by bulk import are fully logged in the transaction log.”]

Comments

# RamGanesh said on February 6, 2008 11:57 PM:

This is a great article with a bunch of tricky questions. Very useful. I am interested in more of similar questions (Needless to say, i am preparing for interviews)

# Gail said on February 7, 2008 12:10 AM:

I haven't had the pleasure of being interviewed for some years. Recently I've been doing interviews and I'm always very, very careful to make 100% sure that I know the correct answers to any question I ask a candidate.

If I was looking for a job, most of the above situations would be a strong indication not to work for that company. The excpetion being if the interviewer was willing to be corrected.

# Michael Gilchrist said on February 7, 2008 03:24 AM:

Lol - thanks for the "grins".  I've been subjected to several stoopid tricks over the years. I'm sure as a senior dba or specialist I've been wrong a few times in interviews as the interviewer and interviewee without even realising it.

# Radha Krishnan said on February 7, 2008 08:54 AM:

Very interesting Mike, particularly because I am relating as the interviewer :-). Not for the stupid (or wrong) challenges, but for the occasions when the chap is giving a totally wrong response and I feel like jumping all over him.  

But I don't , because I feel there's a widely held perception that the interviewer holds a position of strength (wrongly, I think, for s/he too wants to find a good candidate for the job), and it's very easy to intimidate somebody looking for a job. I think even if the interviewee gives a wrong (or what I think is wrong) answer, s/he might be wrong just this once, and could come through alright in the rest of the interview, IF you don't scare the daylights out of him.

There have been cases when at the end of the interview I have (gently, if I may say so) pointed out any glaring lapses. The idea being that even if this interview does not end up with a job-offer, at least there's some learning.

My advice to the interviewees in your example, is to sidestep the argument - "Oh, is that so, somehow I did not get to use XML in the prior version", or "yes, truncates are not logged at record level, but I think they are at the page level". Of course, the overly-aggressive interviewer might come back harder ("No, they are NEVER Logged!"), at which point you just say "Ok", and get on.

# Rex Imperial said on February 7, 2008 10:13 AM:

These are all unnecessary questions in an interview. I have interviewed scores of people in my capacity and I never pose textbook type of questions. Rather I am more interested in their drive, determination and resourcefulness to solve a problem. Knowing the answers to these 'stupid questions' is not my basis for hiring anyone.

# Mike C said on February 7, 2008 12:15 PM:

Thanks for all the comments.  Personally I think questions like this could have a place in a technical interview, although many times the information interviewers spend 80% of their time talking about account for only about 20% of the job requirements.  

Your advice is well taken, and I agree 100%: politely correct the mistake, and use your future boss'/coworkers' responses to help decide if these are people you really want to work for.

# AlexM said on February 7, 2008 12:40 PM:

I agree wit Rex. I've never asked difficult technical questions on interview. General conversation like "How would you do this or that?" gives pretty good understanding about candidate. I myself, did not give right answers  on the questions I knew very well, when I was interviewed. It happens during interview.

If you see smart candidate - grab it. Google will give technical answers, not necessary to know everything.

Some of my university teachers let us use books at the funals. Why not? You can use them when face real problem.

# Andrew said on February 7, 2008 01:27 PM:

Why would you not debate (not argue) the fact someone has told you you are wrong if you know you are right? As an interviewer, I respond similar to these to try and guage how people respond in these situations.

I expect good candidates to respond something along the lines of "Has there been a change recently? I will go and look into that because that was not what M$ said last I looked", etc. The lesser candidates will sit back and stew or be beaten down. I dont want people like that working for me.

The idea of interviewing is not to make the person feel intimidated, its to make them feel as comfortable as possible and get them feeling like they have known you for a long time. This gives you the best opportunity of seeing them in their natural behaviour. Unless of course you want people working on a daily basis feeling intimidated and second guessing themselves.

# Shawn said on February 7, 2008 02:46 PM:

Well I have been on both ends of the interviewing spectrum.  I do not know all the answers but I can find them  I argree that seeing how the interviewee responds is typically more important that the answers.  And as far as intimidating people, I do not intimidate easily.  And I will be the first one to say I dont know the answer but I will get it for you. Google > sliced bread.  I also dont want to work with someone who thinks they can snow you just by talking a good game.  If you say I am wrong, fine, prove it.  If I disagree with you, I will show why.  This is on either side of the interview.