Pages

Sunday, March 15, 2015

How to fail an interview (or learn from others mistakes)

I think of myself as "open for opportunities" professional. I have a great job that I like but I dont mind to try something new. Recently I found a really interesting puzzle - part of the employment process. That was a task to recreate a web service by its interface so the checking bot could access it and try its tests.

Sounds fun so I decided to try. The hardest part of that process was to understand what is the expected behavior of that service just by methods names. And take into account all tricks from the employer side (like overflow exceptions, impossible combinations of parameters etc.) I`ve solved that puzzle to 90% and that was enough to pass to the real interview. At that  point I`ve decided to try the interview as well - just in case :). Unfortunately, I failed and here is my thoughts about the interview.

That was completely my mistake. I have not really prepared myself to the interview and have not refreshed in my memory the most common questions. I thought that I dont need anything to pass.
Here is the list of some of those questions from the interview with my comments - maybe it would help someone (and all of them about c#).


  • Difference between value type and reference type 
    • hopefully everyone can explain it from the top of their heads).
  • Boxing vs Unboxing ()
    • I`ve made my first mistake here as I could not remember what is what...
  • Is string a value type or reference type?
    • Just be careful here as well as string is a special case. I`ve remembered it but not sure what I`ve answered :)
  • What is sealed keyword? Can we derive from sealed class?
  • some questions about garbage collector
    • Cant remember those questions, they were like when collector does its work by default, how to suspend it etc. I dont know a lot about it as that's not a day-to-day stuff. Possibly mine knowledge of GC.Collect and that that is not a best line of code to include just not enough :)
  • SOLID principles
    • simply name them
  • Describe Strategy pattern; Singleton pattern
    • once again, describe them in your own words
  • What are 4 types of design patterns
    • I could not remember them, but the common sense is your friend - some of them are aimed at creation of objects, other about interactions and so on.
  • Session variables in Asp.Net
    • that was a question about ViewBag, ViewData and TempData. I could not remember them (and the difference between them) as I just so get used to models. Unfortunately, I have not described my thoughts on Models either - so that is my big mistake...
  • Authorization in Asp.Net
    • I started talking about security tokens and roles, but the question was only about [Authorize(Roles = "...")] attribute. And I forgot to mention it :(
  • Can 2 different routes lead to the same action in Asp.Net?
    • Yes - but it would be better to answer with example and I just said yes.
  • Difference between Shared views and Partial Views
    • Own words explanation
  • Difference between WebForms and MVC
    • I`ve told about postbacks and stateless MVC controllers, probably that was not what interviewer was expecting...
  • Is doctype needed for HTML5?
    • I`ve said that no (from the personal experience) but accordingly to the documentation - the answer is yes...
  • What is the difference between Data Contract and Operational Contract in WCF
    • I`ve answered honestly that I dont really know WCF :( And by the way, in the job ad there was no mention of WCF
  • Can WebAPI method return ActionResult?
    • I`ve answered that yes (especially as I can wrap it as I want) but the proper answer was no
  • Can WebAPI replace WCF
    • Em... Yes?
  • Are dependencies in IoC framework singletons?
  • Lifetime management of dependencies in IoC framework
  • What will I do and how would I approach bug fixing at some client as a software development consultant?
  • How can I monitor problems in production?
  • What is TDD, BDD, DDD, Kanban?
After about hour of talking on those questions I was given a small tax calculator application with bugs and txt file with tests. My task was to fix as many bugs as possible and the interviewer was looking at my screen with Skype shared desktop. I`ve fixed some of those tests (not all of them) and after another 30 minutes interviewer asked me to show only the first test - and that was all.

And finally, on the next day or so I`ve received the email with "sorry you failed.". Not a big deal :)
Now I can learn from mine mistakes :)