Tuesday, December 06, 2005

Delphi Interview Questions

Nick Hodges posted a list of interview questions for Delphi programmers. While I usually like his posts, I didn't agree with this one. I've been using Delphi since version 2 and I would get a brain freeze if I got all of those questions in an interview. I know them all, but to repeat them back in an interview, that's not going to happen. The sole exception would be writing of a function to reverse a string. If I was interviewing someone, I would make them write a function like that. It shows how they think and hopefully what processes they are accustomed to following.

Another thing I do is to describe a wierd bug that would have been submitted that no one could reproduce and ask the interviewee what steps he or she would take. I would describe a real of fictious application (it really doesn't matter) and then describe a loose series of steps that will crash the application, but only on a certain. You can adapt the description to match the perceived skill level of the applicant. This is closer to real life and you can hopefully learn a few things about the applicant. How does he react under stress? How well does he know the debugging tools and methodologies. You'll want to see what steps or directions he would go in order to isolate and reproduce the problem.

I would also ask some generic SQL questions. Every job that I 've had (OK, it's a short list) has involved SQL at some level or another. I don't think you avoid databases and every programmer should have some level of familiarity with SQL.

The rest of the questions in Nick's list show that you have memorized the help system, it doesn't tell you if you actually know to use it. Unless you are writing components, how important is it to enough about how components are read in to repeat it back in an interview. In our shop, we have 7 developers who use Delphi. Only one of us (me) has any real experience in writing a new component from scratch, and doing it the right way. And that's OK. We're not in the component development business, we're in the business of writing applications.

These questions would weed out a skilled programmer who never used Delphi. I would greatly prefer getting an experienced programmer up to speed with Delphi, then dealing a programmer with Delphi experience, but otherwise horrible.

Here are some suggested Delphi interview questions:

  1. Describe how components are loaded from a DFM file at runtime.

  2. What is the difference between TGraphicControl and TWinControl?

  3. Write a function that reverses a string.

  4. If a component has another component as a property (example:  TDatasource has a TDataset component as a property), what happens if the “pointed to“ component is deleted?

  5. Where does TCustomControl fit into the VCL heirarchy?

  6. What is the purpose and significance of the TPersistent class?

  7. What are the three methods required for an implementation of IInterface?  What do they do?

  8. What class in the VCL heirarchy implements IInterface?

from [Nick's Delphi Blog]

1 comment:

  1. Get some more questions on:



Note: Only a member of this blog may post a comment.