Archive for June, 2008

My New Favorite Interview Question

Lately I’ve been doing a lot of interviews, so I’ve been reflecting on the effectiveness of my questions and my methodology. I generally take a relaxed, conversational approach to interviewing. I consider myself to be a strong judge of character and a well-rounded conversationalist, so I like to get the interviewee talking and see where things go. My goal is to let the interviewee do most of the talking, prompted by me to guide the topic or curtail the time.

One of the biggest challenges in an interview is calming the applicant down so that they behave normally. I know interviews can be overwhelming — especially for technologists who sometimes are a bit weak on social skills. After a general chat about my company and their background, I used to ask an extremely simple programming question. For example, I might ask them to write a function to print out a multiplication table.

A surprising number of people stumble on this initial question. Often times I think it’s due to nerves. So now I’ve started to ask the following question:

To start us off drilling down into your skills, I’d like to start with a topic that you’re extremely comfortable with. Please think of a question, and then answer your own question. I’d like you to first clearly define what the question is. Then walk me through the answer. Try to keep it brief.

I think this is a great question for several reasons:

  1. It keeps them talking.
  2. I stay interested because I often learn something new. Even bad interviews become a better use of my time.
  3. What they choose as the question is a unique indicator of their interests and talents.
  4. Do they follow instructions? A surprising number of candidates fail to define a question. Instead he or she simply launches into a monologue.
  5. Can she answer her own question? A surprising number of candidates get tripped up answering their own question.  That’s bad.
  6. Does he have a sense of humor? It’s a great opening for the candidate to make some sort of joke because this is a fairly bizarre question. One candidate quipped, “you want me to interview myself?”

Many times I will have to cut a candidate off during their answer, but that’s okay. I typically use it as a nice springboard into a question of my choosing with a segue such as “You mentioned randomization. Could you write me a function that accepts a list of integers and returns a new list with the integers shuffled?”

Leave a Comment

Programming Excel via VSTO is painful

For the past week I’ve been programming a collection of Excel worksheets in C# .NET using VSTO. Put simply, the Excel sheet needs to pull data from a database into some spreadsheets, where the user will play with it and sometimes write new data back out to the database. Excel was selected simply because that’s what was requested.

I’ve never programmed an Excel application before, so the past week has been a learning experience. Unfortunately, pain has outweighed pleasure.

First, the documentation is abysmal. Each feature spawns a peck and hunt through a maze of MSDN pages. The functions have cryptic arguments. Examples are rare. Each page has supports user comments, but I’ve yet to see a single user comment on any of the MSDN pages.

Second, the C# code that you do manage to hammer out shares no resemblance to the plain Excel functions that you often are trying to replicate. I’ve often found myself building up cell references and ranges, and all the references are rigid (like if somebody were to insert a row or column, it would all fall apart).

This week I wasted time trying to use a ListObject (a table that supports column filters and sorts). The ListObject is seductive because you can bind it to a data source and institute rules such as read-only columns, typed columns, and primary keys. Unfortunately the ListObject falls short in some critical ways — most critically with formulas. Formulas for databound ListObjects seem to be unsupported, and even if you don’t bind the ListObject to data, every cell within a column is forced to contain the same formula.

I do think Microsoft has created a good thing with VSTO. Programming Excel from C# feels more robust than hacking some Visual Basic together (which, in fairness, I’ve never attempted). Visual Studio is a joy to use, and I’ve always said that Excel is the greatest programming application ever created (because of all the novice users who can do powerful, custom things with it).

I wish Microsoft would do two things:

  1. Improve the documentation.
  2. Add a declarative programming method for specifying ranges and relative cells. I’d like a way to say “okay, this cell contains a function that references the cell two to its left, and then I want to copy that all the way down.” You can partly accomplish that by working within the xls sheet, but once you bounce into C#, it becomes difficult.

Comments (2)

Follow

Get every new post delivered to your Inbox.