This blog is going to have surfing, snowboarding, tech stuff and maybe some 'meaning of life' stuff if I'm feeling particularly stoked.

Monday, December 20, 2004

Interview Questions

Greg Reinacker (founder of NewsGator) recently posted this list of requirements for developers he wants to hire.

Since I could be interviewing in the US sometime soon I tried to see how many boxes I could tick!

You know the difference between _beginthreadex and CreateThread:
I would have been able to explain this succintly a few years ago (when I developed Win32 desktop applications) but I probably would have had to go into waffle mode. _beginthreadex is the C runtime method to create a thread. You should use this call if you want the new thread to call into the CRT (talk of CreateThread leaking memory in this case) so most guidelines recommend using this instead of the Win32 API call CreateThread. If you're using MFC of course you should always use AFXBeginThread().

You know all of the ways to share memory between Win32 processes:
Memory Mapped Files

You know what an AppDomain is, and you can think of a reason you might want to create one yourself:
I hope I know what an AppDomain is since I have been building DotNet applications for the last two years! Jeffrey Richters Applied Microsoft .Net Framework Programming is just a great book on the nuts & bolts of the framework. For my applications IIS usually hosts the CLR and the AppDomains that come with that (e.g. one per site) but you may want to host your own instance of the CLR and some AppDomains if you were planning to run some managed code on an application server (i.e. CLR hosted in an NT service).

You know what a HttpModule is, and you can think of at least two examples of why you might use one:
Again, building ASP.NET application for the last 2 years has meant getting to know pipeline modules pretty well. Plenty of good articles out there on when these would be useful but of course you need to understand ASP.NET Request processing and the HTTP pipeline first. Most people use these without even realising (e.g. Forms Authentication).

You know what Mutexes and Semaphores are used for:
To be honest I haven't used low level synchronisation techniques nearly as much as we talked about them at university! Today .NET provides high level constructs with the Lock statement and ReaderWriterLock class but I suppose it all comes back to the initial Critical Section Problem outlined by Dijkstra in the sixties. Just type "Critical Section" & Dijkstra into Google and you'll find plenty of academic content on this. Watch out for Dining Philosophers!

You know you can override member functions in C++ without them being declared virtual; and you know when and why you should declare them virtual:
Hands up, don't know what he's getting at here, really need to refresh my C++. I'll find out and post the answer.

You can explain the difference between:
A::A() {m_x = 5;}
A::A() : m_x(5) { }
Second constructor is using an initializer list to achieve the same thing as first, so no difference?

When someone asks you to write code on a whiteboard to reverse a string in place, you're disappointed that they didn't ask a more interesting question:
That's just nerdy, as far as I'm concerned there's no such thing as too easy a question in any interview.

You know that IL isn't interpreted:
Again, I'm deferring to Jeffrey Richters great book for a superb section on IL & JIT compilation. pp 11-21

You can explain transaction isolation levels as they relate to SQL Server:
The isolation level at which your transaction runs determines your applications sensitivity to changes made by others. The four isolation levels are Read Uncommitted (Dirty Read - most concurrent, least consistent), Read-Committed (this is the default), Repeatable Read and Serializable (least concurrent, most consistent). Book Recommendation Inside SQL Server 2000

You know what the Running Object Table is, and can think of situations when you might want to use it:
This was a COM technique of InterProcess Communication (kind of) where you could register your application in the ROT and then clients could get at that instance (e.g. automation clients, like VBScript using GetObject). I don't think I've ever registered anything in the ROT but I have accessed Word application objects from it to get at a running instance of Word and maybe pull data from there?

Just one passed, are there any wrong?