# Monday, July 07, 2008
« Happy 5th of July | Main | Interviewing - Coding Samples »

Looking for a new job can be an intimidating proposition, especially for developers who haven't changed jobs in a few years.  Are my skills current?  What kind of horrible interview trivia questions are popular these days?  Luckily the initial phone screen is the easiest part of the interview process, especially if you do your homework. 

Despite this, it amazes me how many candidates completely flounder the phone screen regardless of how senior their resume says they are.  I've found that a large majority of candidates don't pass the phone screen.  Yet, its doesn't have to be this way.  Don't rest on your laurels, do your homework!

Most phone screen questions are very superficial and don't go into any depth, you either know the answer or you don't.  If you've been coding every day for the majority of your time then you will generally find the questions very easy.  If you're fumbling for an answer, then that's definitely a bad sign to the interviewer because most of these questions they expect you to just know the answer as if it were reflex.  Its usually better to give answers promptly that are shallow than in depth answers that take a while to get out. 

And if you don't know an answer, just say so - don't try and BS your way through it.  Its disrespectful and you will get negative points, but having said that you should also follow up with a guess if you have one.  Here's an example. 

Interviewer: Is XML case sensitive? 

You: I don't know, but I always pretend it is when I write out my tags.

Beyond that, what kind of stuff should I do to prepare?  I'm glad you asked.  Find interview questions online and spend some time brushing up your skills.  Maybe even take a BrainBench test to help solidify your knowledge, the C# one used to be free.  Eventually you will notice a pattern to the interview questions.  Some of the most common that I've asked and/or answered are below.

General C#

  • Brush up on the basics: and, or, xor, bits, bytes, hexadecimal, max size of data types, etc. etc.
  • Learn the collection types. How does a stack differ from a queue?  What's a linked list?  What collection types are available in .NET 2.0?  How do you find something (quickly) in a given collection?
  • What is the heap?  What is the stack?  You should know how .NET manages memory.  What is System.GC.Collect()?
  • IDisposable.  Why does IDisposable exist?  What does using have to do with IDisposable in C#?  What's a Finalizer? How is a Finalizer different from a C++ destructor?
  • What is the GAC?  What problem does it solve?  What is sn.exe?
  • In .NET is a string a stack or reference type?  Is the .NET string class immutable?  Why does StringBuilder exist?
  • What is an interface?  Abstract class?  Virtual method?  Does C# allow multiple inheritance?
  • What is recursion?  Why would you use/not use recursion?
  • Exception handling. How many catch blocks can a try block have? When does the finally block run? How do you rethrow an exception without killing the stack trace?
  • What's a thread?  What's a process?  Compare contrast a thread and a process.  What's the lock keyword in C# do?  What's a deadlock?
  • What does Debug.Assert, Debug.Trace, Debug.Write do?  Why would you use these?
  • What an event?  What's a delegate?  When/why would you use them?

ASP.NET

  • ASP.NET page lifecycle.  I know, I know... but learn it!  You will be asked this question!
  • What's a postback?  What is Page.IsPostback? 
  • What kind of controls exist in ASP.NET?  What's a user control?  What's a master page?
  • What are several ways to maintain state in ASP.NET?  Where is session stored?  How does having a web farm affect this?
  • How can we secure an ASP.NET application?  Your answer should cover coding as well as infrastructure.
  • How can you debug an ASP.NET app?  How about with IIS?  How about with a remote IIS server?
  • Does POST or GET mean anything to you?  How do they differ?  What is Fiddler?  What's a cookie?
  • What's an http module?  What is an ASHX file?

SQL Server

  • What types of joins exist in SQL Server?  Compare contrast the different types.
  • Learn your indexes and how they differ. How does SQL Server store data?
  • What's a primary key?  What's a foreign key?  What's a candidate key?  How would you model a many to many relation?
  • When would you use GROUP BY and HAVING clauses?  How would you write a query that finds all the duplicate rows in a table?
  • Sprocs and functions, how to they differ?  What advantages/disadvantages do they have?  What are the different ways of returning data from a sproc?
  • What's a transaction?  How do they work?  When would you use one?  What's optimistic concurrency?
  • What's a SqlConnection?  What's a connection pool and why are they useful?  What's a trusted connection?

I'm not sure this is true, but it seems to me that the better employers will ask a few basic comp sci questions (like 1 & 2 above), while the crappier ones skip this area and focus more on ASP.NET or SQL.

Wednesday, July 09, 2008 3:42:37 PM (GMT Standard Time, UTC+00:00)
This is very helpful info. I came across this podcast, I thought it was very insightful and funny ;)..."Copy & Paste from google".
http://deepfriedbytes.com/podcast/episode-2-interview-war-stories/
Peter
Wednesday, July 09, 2008 5:34:04 PM (GMT Standard Time, UTC+00:00)
Ayende's story about the guy who was copying C++ code from Google and trying to build it with the C# compiler is, and always will be a classic in my book.
Thursday, March 05, 2009 6:09:11 PM (GMT Standard Time, UTC+00:00)
>> ASP.NET page lifecycle. I know, I know... but learn it! You will be asked this question!

A necessary evil when interviewing. Here is a helpful cheat sheet:

http://john-sheehan.com/blog/wp-content/uploads/aspnet-life-cycles-events.pdf
Comments are closed.