Effective Perl by Joseph N. Hall

Observations and Tips from the author of Effective Perl Programming

Thursday, October 11, 2007

Your Phone Screen Homework Question

Before or after the phone screen, depending on how things work out, you may be asked to complete a short programming exercise. It won't be something with a lengthy answer but it will require you to demonstrate an understanding of a few key Perl skills. Here is the one that I have used recently. It is a kind of "beginning intermediate" question about a type of problem that comes up reasonably often in serious Perl programming and that has a distinctive Perl solution. Ordinarily you would be allowed access to (and encouraged to use) the Internet and/or other references if necessary.

The problem:

Create a hash that represents a set of items, and another hash that represents another set of items.

Compute a hash that represents the union of both sets.

Compute a hash that represents the intersection of both sets.

Print out the contents of the union and intersection sets sorted in alphabetic order.

Wednesday, October 10, 2007

Preparing for the Phone Screen, Part 1

It has been a while since I last blogged here! Let's put that aside for a bit, though, in favor of a general-interest topic.

Nowadays I am happily working at VMware. I will probably be doing interviews and phone screens from time to time, and if you are being considered for a position in my team, I will be the "Perl Person" you have to speak with. If you are doing a little research ahead of time, I have a treat for you, because here are some of the questions I am going to ask. If I have space and/or energy, I will eventually post all the questions I will ask, but that will have to wait for later.

These questions aren't too complicated, but I don't necessarily expect you to get them all correct. In fact, you can get a number of them incorrect as long as, during the process, you convince me that you know which ones you don't know, and you know how to find the answer quickly.

Introduction
  • When have you used Perl? What version(s)? What platform(s)?
  • What Perl book(s) have you read? What class(es) have you taken? Have you taught yourself? How much? What about?
Basics
  • What is strict? What is warnings?
  • Name a special variable. One other than $_. What is $_?
  • What is perldoc?
  • What is a Perl module?
  • What is the difference between print and printf?
  • What does local mean? Where could you use it?
  • How do you open a file? What is the return value from open? What is $!?
  • What is "null" in Perl? How do you tell if something is "null"?
  • How do you find the size of an array?
  • How do you write an infinite loop?
  • What is a regular expression that matches any character?
  • How do you remove a key-value pair from a hash?
  • What is a "pointer" in Perl? What kinds are there? How do you make one? What can you do with them?
That's all for now. Answers, and more questions, later.