Tales from an Interview

April 2, 2008


For the past couple of years, my side of Tales from an Interview (from "The Daily WTF") has been from the interviewer’s position.  Sela Technology Center and Sela College are constantly looking for talented professionals to fill a variety of positions – developers, architects, to-be-consultants, lecturers and a combination of these jobs.


I have my own share of funny stories from interviews.  Probably the funniest one lately was a guy with several years of .NET experience who kept tackling even the most trivial of questions with answers like:

  • If I had to do <something>, I’d go look it up on the web.
  • If I had to do <something>, you can rest assured it’s going to be the best <something> you have ever seen!
  • If I had to do <something>, it would be a <something> that would sell for millions and there would be no bugs in it because I would test it so well!
  • If I had to do <something>, I would instead do <something else entirely> because <something> is not interesting at all.

Now replace <something> with a random simple question like putting objects in a collection, loading information from a database table, or serving a dynamic web page to a visitor, and you get the picture.

Anyway, for now, I’ll just give you my list of questions that I ask in an interview.  This is by no means a full list, just some of the stuff I have been asking recently.  Some of these questions are fairly difficult, I obviously ask them in an ascending degree of complexity.  BTW, you won’t see any ASP.NET/WPF/WCF/TLA questions here, because I wanted to show the bare minimum.

If you can answer every single question without so much as a blink of an eye, I’ll certainly love to know where you live and when we can send a SWAT team to seize you for a job at Sela ๐Ÿ˜‰

For .NET developers:

  • What are the methods of System.Object?  (Name at least 3, and as you name them, explain what their job is.)
  • What does Object.GetHashCode return?  What are the requirements from an object’s hash code?
  • How are hash codes implemented differently for value types and reference types?
  • What are the primary differences between value types and reference types?  (Internal representation, allocation, destruction…)
  • What facilities does the System.Type class offer?
  • What is reflection?  Discuss using reflection for obtaining values of internal or private members, or invoking internal or private methods.  Discuss the security issues behind reflection.
  • How would you implement object serialization?  What are the obstacles?  What different kinds of serialization does .NET offer?
  • How would you implement a singleton?  Discuss possible problems with the implementation.
  • When does a .NET static constructor get called?
  • What’s the purpose of the .NET GC?  How does it work?  Are there any memory leaks in .NET?  How do you find them?
  • What’s the purpose of a finalizer in a .NET class?  Why do we need it?  How do we release unmanaged resources deterministically?
  • What kind of advantages can the JIT have over pre-runtime compilation?
  • What IPC technologies have you used in .NET?  Compare and contrast.
  • What’s an AppDomain?  What does it enable?  How do you use it?
  • How are events implemented by the compiler?
  • How do you load an assembly dynamically?  What’s the difference between loading by name and loading by path?

For C++ developers:

  • What are the uses of the const keyword?  Why is it important?
  • How is a const method implemented?  (I.e., what stops me from modifying state.)
  • How would you express an interface to a class in C++?
  • How do virtual functions get called (at assembly level)?
  • What is inlining?  How do you achieve inlining?  How do you achieve inlining across translation units?
  • What are templates?  Show some common usages of templates.  Discuss uses of meta-programming.
  • What are STL iterators all about?  What’s the advantage compared to using plain old pointers?
  • How would you implement a string class, encapsulating a string of characters?  (With several operators like +, +=, ==, =.)
  • What are exceptions?  How would you deal with resource management when every single line of code can throw an exception?
  • How would you diagnose memory leaks at the language level?

General questions:

  • How do you sharpen your technological skills?  What are the last 3 books, blogs, magazines that you have read, and what have you learned from them?
  • Have you been playing around with the latest bits of <insert here>?
  • What’s a thread?  Why would you use a thread?  What kind of problems ensue?
  • How do multiple threads appear to run simultaneously on a single processor?  Who maintains the illusion?  Discuss the illusion.
  • What enables me to use more memory in my applications than I have physically installed on my machine?
  • How do you address a situation where you have more client load than your single server can handle?  Discuss distribution scenarios and technologies.

There are certainly more that I can’t remember, but the above list as it is doesn’t fit in an hour of an interview anyway.

Add comment
facebook linkedin twitter email

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>



  1. Eber IrigoyenApril 3, 2008 ื‘ 2:55 AM

    good questions, added them to my (private) list of questions =o)

    unfortunately not for the average .NET developer =o(

    I would’ve missed your interview because I didn’t know what “IPC technologies” was… of course if you would’ve said “inter-process communication” I would’ve passed =o)

  2. Eber IrigoyenApril 3, 2008 ื‘ 2:59 AM

    would one get extra points if he/she objects that System.Object only has 2 methods?

  3. Daniel GrunwaldApril 3, 2008 ื‘ 3:43 AM

    System.Object has 7 to 14 methods (maybe more depending on what is you count as method).

    static bool Equals(object a, object b);
    static bool ReferenceEquals(object a, object b);
    bool Equals(object a);
    int GetHashCode();
    Type GetType();
    string ToString();
    protected object MemberwiseClone();

    Not necessarily methods depending on your definition:
    protected void Finalize(); – in C#, it’s the destructor, not a method; but in VB it’s a method.
    void .ctor(); – called constructor in most .NET languages, but in IL it’s a (special) method.

    And then there are 5 more methods that are internal, so you only see them using Reflection or when loading mscorlib in ILDASM.

  4. MladenApril 3, 2008 ื‘ 8:19 PM

    does not fully knowing 2 questions include a job offer or not? :))

  5. Sasha GoldshteinApril 6, 2008 ื‘ 11:02 AM

    Not being able to answer some of these questions doesn’t disqualify you for a job. However, answering every single one of them from memory but not being able to extrapolate the knowledge to other areas might disqualify you for a job.

    This is not an exhaustive list, but these are some of the things I think all .NET developers (or C++ developers) have to know if they want to be professional at what they’re doing for a living.

  6. DmitriyApril 9, 2008 ื‘ 11:04 AM

    Too bad… I’m already in SELA ๐Ÿ™‚

  7. David NelsonMay 14, 2008 ื‘ 5:14 PM

    Its somewhat disturbing that even many “experienced” C# developers couldn’t answer many of those questions.