It’s count(), you idiot.

I had an interview the other day. You know the kind of thing, sitting at one side of a boardroom table with a firing squad on the other, ready-aim-firing technical questions for an hour. Like most, sane, interviewess, I prepare for these. I read. I code. “What questions would ‘I’ ask?” This time was no different. Sort of.

The job in question required knowledge of PHP. Now, it feels like half a lifetime since I’ve used in PHP in anger (that’s how I remember coding in PHP, at least), so I thought I had a little more preparing to do than usual. I spent a couple of evenings reading, coding, “What questions would ‘I’ ask?”-ing and felt I’d more or less covered everything I’d need. Security, database access, objects in PHP etc.

I was ready. Confident. Wrong.

First question was about the difference between GET and POST. Ok. Next, retrieving values that have been GETted or POSTed to your application. Fine. How to you find the size of an array in PHP? The exchange went something like this:

“Mmmm … in Python that would be the len function … mmmm” (Inner voice - Good start cretan.)

“Erm, there’s a method on an array ….” (Inner voice - They’re laughing at you now)

“length?” “No” “len?” “No” “size?” “No, it’s count” (Inner voice - It’s count, you idiot)

This was the prelude to a series of basic PHP questions upon which I poured huge buckets of FAIL. You see, I’d forgot to go over the basics. In all my preparation, I had neglected to take even a cursory glance over the fundamentals of the language. The very things that will leave you if you don’t code in a language for a while. I spent that part of the interview being able to answer all those questions in Python and Java. Big help.

Lesson learned? Keep a hand in everything that’s on my CV as much as possible. That’s scary, because over the past 11 years, I’ve been in contact with a *lot* of technologies. I know that I’ll never remember everything I’ve ever done, but surely I should be able to remember the basics. Some of them.

BTW, I got the job.

2 Responses to “It’s count(), you idiot.”

  1. mj Says:

    Woot! Congrats!

    Crap…that means I’m on my tod

  2. Gareth Says:

    Cheers Matt. You’re never on your own. You just call out my name, and you know wherever I am, I’ll come running …. wohoa there. Attack of the James Taylors there. (note to self, that’s a good name for a band).

Leave a Reply