Tuesday, October 31, 2006

(C#) Interview Questions

Seems to be the trend at the moment to post some interview questions on your blog. So not being one to buck a trend, I thought I would do the same.

Some of the questions I have seen are more pop quiz types questions. For example: Name 5 C# data types?
To me these questions like this are stupid. I don't care if someone can recite the entire class library word for word, I care about how much of an understanding of actual programming someone has. My questions are more aimed at creating an insight into how someone thinks, and perhaps starting a discussion. I prefer open ended, no one right answer questions.

Without further ado, here are my questions...

1. What are you thoughts on the following?:

try
{
...
}
catch (Exception ex)
{
...
}

The answer should create an insight into how deeply the developer thinks. I think catch all exceptions are the devils spawn, but would be interested in learning justification someone might have for using

2. Name your favourite feature of .NET 2.0? Why?

Just a matter of interest. Should get the person talking.

3. Explain the difference between an Interface, and an Abstract class.

If the person knows the difference then it shows they have created bases classes or at least know about OO programming.

4. In your opinion, when should you use each?

Just to try and see if they have an understanding of the difference, not just know what each is.

5. How do you define the n-tier model?

Again it should be reasonably clear from the answer if the person has actually don e n-tier design/programming

6. When passing data between tiers, do you prefer passing a custom class, or something else such as a Dataset? Why?

Always interesting to hear peoples approach to this. Also it demonstrates what level the person has. I.E a junior - intermediate may not have had to worry about this before.

7. Who is Anders Hjelsberg?

I would want people who take an interest in the language they use. If they do then they will know who Anders is, or at least heard of him

8. Explain the terms Pascal Casing and Camel Casing.

Most people should know what these mean, although not a show stopper if not

9. Explain your coding standards for: a member variable, a parameter, a method, a class an interface and a local variable.

This question just shows if people have thought about standards or not. Any good developer should have a fixed standard they stick to. It is good to discuss their reasonings for using a particular standard. For example I use m_(camelCase) for member variables because I feel it is easier to read and harder to transpose the variable by mistake.

10. What is your understanding of a business layer?

Everyone has a different idea about what a Business Layer should be and do.

Coding Tasks

Here are some coding tasks that could be given at an interview. Obviously not enough time to do them all....

1. You are creating a basic accounting application. Create a business layer stub which would allow the application handle Creditors, Debtors and Invoices. Just create any classes needed, the variables needed and the method headers. In each method, just add a comment as to what the method will do. As a starting point, the database has been created where the business data will be persisted to.

I think this would be an interesting task to give. It shows the interviewee's ability to take a problem and apply their skills to it. We're not really that interested in the actual coding, just the design and thinking behind it. I would expect most people to either create custom classes based on the database, or create an approach based on datasets which will be passed between layers. I am a student of the Rocky Lhotka approach to business layers where the business classes shouldn't just replicate the table design, it should define a behaviour, and can include data from several tables.

2. Create a simple Webservice that given two numbers, returns the sum of these two numbers.

3. Create a console application that consumes the Webservice created above.

Fairly simple task that anyone worth hiring should handle in 30 minutes or so.

4. Give them an application with a number of bugs, some compile time, some runtime and get them to fix as many as possible in a given time.

5. Explain to the interviewee that they can use any datastore they like - have MS Access, SQL Express, SQL Server installed on the test machine - create a simple application to store contact details.

Give no hints on what you are after, give them a set time (60-90 minutes) and then let them loose. Good developers should work out what is important given the time constraints. I would prefer a well engineered solution that wasn't finished, than a slap happy finished product. Above all else it should show how people think about design and give an indication about their ability. Afterwards, let them explain why they did X and give justifications for that approach.

Comments welcome....

5 comments:

Anonymous said...

You spelled Anders' nameincorrectly

Anonymous said...

Over smart

2nd interview questions said...

companies marketing mineral makeups and also get the best bargains in mineral makeup you can imagine,
find aout how to consolidate your students loans or just how to lower your actual rates.,
looking for breast enlargements? in Rochester,
homeopathy for eczema learn about it.,
Allergies, information about lipitor,
save big with great bargains in mineral makeup,

change edition interviewing motivational people preparing second
,

interviewing motivational people preparing second time
,

interviewing people motivational preparing for a second time
,

black mold exposure
,

black mold exposure symptoms
,

black mold symptoms of exposure
,

free job interview questions
,

free job interview answers
,

interview answers to get a job
,

lookfor hair styles for fine thin hair
,

search hair styles for fine thin hair
,

hair styles for fine thin hair
,

beach resort in the philippines
,

great beach resort in the philippines
,

luxury beach resort in the philippines
,
iron garden gates, here,
iron garden gates,
wrought iron garden gates
, here
,
wrought iron garden gates
,
You: The Owner's Manual: An Insider's Guide to the Body That Will Make You Healthier and Younger
,
answer from more much,
eat eating mindless more than think we we why
,
la times classified,
new york times classified


texturizer,
texturizers here,
black hair texturizer,
find aout how care curly hair,
find about how to care curly hair,
care curly hair,
lipitor rash,
lipitor reactions,
new house ventura california,
the house new houston tx,
new house washington dc,
new house washington dc,
new house ventura california,
the house new houston tx,
the house new houston tx, that you ar looking for,
new house ventura california, you need to buy,
new house washington dc,

hair surgery transplant
,

air filter allergy
,

refurbished dell laptop computers
,

hair surgery transplant
,

air filter allergy
,

refurbished dell laptop computers
,

hair surgery transplant
,

air filter allergy
,

refurbished dell laptop computers
,

chocolate esophagus heartburn study
,

chocolate esophagus heartburn study
be informed,

digestion healing healthy heartburn natural preventing way
,

digestion healing healthy heartburn natural preventing way
,


Allergies, lipitor rash,
alcohol rash,
lipitor and alcohol,
lipitor alcohol,

natural remedies to aid healing of esophagus
,

chicory heartburn
,

effectiveness of zocor vs. lipitor
,

chocolate esophagus
,
southwestern wrought iron yard gate,
exterior iron gates,
oriental wrought iron gates,
powder coated iron garden fencing,

thin hair said...

black mold exposure,black mold symptoms of exposure,wrought iron garden gates,your next iron garden gates, here,hair styles for fine thin hair,search hair styles for fine thin hair,night vision binoculars,buy, night vision binoculars,lipitor reactions,lipitor reactions,luxury beach resort in the philippines,beach resort in the philippines,homeopathy for baby eczema.,homeopathy for baby eczema.,save big with great mineral makeup bargains,companies marketing mineral makeups,prodam iphone praha,Apple prodam iphone praha,iphone clone cect manual,manual for iphone clone cect,fero 52 binoculars night vision,fero 52 night vision,best night vision binoculars,buy, best night vision binoculars,computer programs to make photo albums,computer programs, make photo albums,free printable tax forms,printable tax forms, free here,craftmatic adjustable air bedcraftmatic adjustable air bed, info hereboyd night air bedboyd night air bed, low priceair bed in wisconsinbest air beds in wisconsincloud air inflatable bedbest cloud air inflatable bedsportable sealy air bedportables, sealy air bedsaluminum rv luggage racksaluminum made, rv luggage racksair bed form raisedbest air beds form raisedsupport equipments aircraftbest support equipments for aircraftsinformercials bed airbest, informercials bed airmattress sized air bedsbest mattress sized air bedantique doorknob identificationantique doorknob, identification tipstroubleshooting dvd playertroubleshooting with the dvd playerflat panel television lcd versus plasmaflat panel television, lcd versus plasma pic the bestcauses of economic recessionwhat are the causes of economic recessionbed air foam adjustablebed air adjustable foam hoof prints antique and unusual equestrian printshoof prints, antique equestrian printsbuy adjustable air bedbuy the best adjustable air bedsair bedscanadian storesair beds, cheap canadian stores

rahul said...

First of all. Thanks very much for your useful post.

I just came across your blog and wanted to drop you a note telling you how impressed I was with the

information you have posted here.

Please let me introduce you some info related to this post and I hope that it is useful for community.

There is a good C# resource site, Have alook

http://CSharpTalk.com

Thanks again
Rahul