Python Interview Questions

C

Cameron Simpson

| > The second[or higher]-order
| > ignorance of not knowing what pdb is (or, if you need more powerful
| > debugging, how to do it) is sign the person hasn't been programming
| > in Python much.
|
| So guru knowledge of pdb is prerequisite to being accepted as a
| Pythonista? I find that ridiculous since *real* programmers don't use
| debuggers anyway.

You've misread him. He's saying not knowing what PDB is and what it may
be used for is a sign of low experience. Whether one uses it or not
isn't what he's measuring, it's whether one knows what it is for and how
it may be used.

| > [...]  I've seen enough Java-written-in-Python to know what
| > I don't want :)
|
| I know you are a member of the group who has an aversion to strict OOP
| paradigm but is this a justified aversion, or just fear of OOP due to
| static evolution? Look, i don't like java's strict approach either,
| however, i do not have an aversion to OOP.

More misreading. "Java-written-in-Python" (and its variants) means non-python
code written in python, in this case from someone with a strong (or
rigid) Java background who is not adept with Python idioms. It has
nothing to do with OOP one way or the other. Surely we've all seen
(and doubtless written) clumsy python code; this is an example.

Cheers,
 
R

Roy Smith

Peter said:
One of my favourite questions when interviewing - and it was 100% reliable
:) - "what are your hobbies?"

"My hobby happens to be gardening, for which I don't expect to be paid."
 
T

Tim Chase

Woe is the poor college grad, who wants to appear like a
well-rounded individual and lists capoeira and gardening,
instead.

The problem is the "instead...if your list of hobbies includes
capoeira and gardening in addition to programming, you're at least
considered. :)

-tkc
 
R

Roy Smith

Christian Heimes said:
Am 09.07.2012 23:22, schrieb Peter:

on the contrary! When a potential candidate has computer stuff as her
main hobby then she goes on the no-hire list.

I think this points out the silliness of these kinds of questions.
There is no "right" answer. More to the point, the interviewee, when
he/she gets one of these questions, probably goes into hyper-analysis
mode: "Now, just what did he mean by that question?" He's likely to
give the answer he thinks you want to hear.

Do you really want to make hire/no-hire decisions based on somebody's
ability to second-guess what you probably wanted to hear when you asked
a pointless question?
 
E

Emile van Sebille

On 7/9/2012 2:22 PM Peter said...
One of my favourite questions when interviewing - and it was 100% reliable :) - "what are your hobbies?"

If the answer included programming then they were hired, if not, then they went to the "B" list.

In my experience, anybody who is really interested in programming will have it as a hobby (and is keen to learn even if they don't currently have the knowledge you require) - otherwise it is "just a job". Every job has a learning curve - whether it is just the particular domain or even a new language, the individual who sees programming as more "than a job" will come up to speed much faster and be more productive in both the short and long term.

Every programmer I have ever hired using this criteria worked out well.

Hence the age bias.

Personally, I'm quite happy now that I've divorced my hobby from my
career. And my family likes me better too.

Emile
 
D

dncarac

Tim,

I've read your list and with one exception it all looks very reasonable. (As an hobbiest, I'm amazed at just how much I have picked up.)

The set of questions I'm not sure I understand is the 'What version did ...appear?' questions. This, to me, doesn't seem to indicate any programmingexperience or expertise. A question asking 'Do you understand different versions?' and 'How would you find out whether a particular version can do aparticular thing?' (i.e. which version can you use on GAE?) would seem togive good information. 'How do decorators work?' would seem to give good information.

So my question is: what information are you looking for by asking which version introduced decorators?

With respect,

Den
 
D

dncarac

Tim,

I've read your list and with one exception it all looks very reasonable. (As an hobbiest, I'm amazed at just how much I have picked up.)

The set of questions I'm not sure I understand is the 'What version did ...appear?' questions. This, to me, doesn't seem to indicate any programmingexperience or expertise. A question asking 'Do you understand different versions?' and 'How would you find out whether a particular version can do aparticular thing?' (i.e. which version can you use on GAE?) would seem togive good information. 'How do decorators work?' would seem to give good information.

So my question is: what information are you looking for by asking which version introduced decorators?

With respect,

Den
 
T

Tim Chase

The set of questions I'm not sure I understand is the 'What
version did ... appear?' questions. This, to me, doesn't seem to
indicate any programming experience or expertise. A question
asking 'Do you understand different versions?' and 'How would you
find out whether a particular version can do a particular thing?'
(i.e. which version can you use on GAE?) would seem to give good
information.

The reason *I* ask them is that we have some 2.4 installations
(where things like "with" aren't available) and at the time I typed
up the list, there was some earlier 2.2 and 2.3 code out there where
decorators or sqlite[*] didn't work.

So I guess it's a bit of a "how long have they been programming in
python" experience aspect. Programmers that have been around a
while often remember the frustration of $FEATURE_LACK and then the
relief of a much better way to do it. The functionality of
decorators was around far earlier, but the clean syntactic sugar
made it much nicer to use. The sqlite/sqlite3 libraries were
around, but you had to install them yourself (whether from source, a
custom installer, or your package manager).

As mentioned in another branch of this thread, I don't require
python historians, but do prefer folks that know which features to
check availability for deployment.

-tkc

[*] without installing an add-on
 
R

Roy Smith

Tim Chase said:
As mentioned in another branch of this thread, I don't require
python historians, but do prefer folks that know which features to
check availability for deployment.

Heh. Tell me, when did strings get methods? :)
 
T

Tim Chase

Heh. Tell me, when did strings get methods? :)

IIRC, ~2.0? I'm cognizant of the shift happening from the string
module to string methods, but I wouldn't expect deep history
knowledge--last I checked, RedHat still supports a RHEL version that
ships with 2.4, so that's about as far back as I'd probe these days
(so I'd drop the decorators question now). Certainly not a
deal-breaker either way. Just more data points.

-tkc
 
R

rusi

I think this points out the silliness of these kinds of questions.
There is no "right" answer.  More to the point, the interviewee, when
he/she gets one of these questions, probably goes into hyper-analysis
mode: "Now, just what did he mean by that question?"  He's likely to
give the answer he thinks you want to hear.

Do you really want to make hire/no-hire decisions based on somebody's
ability to second-guess what you probably wanted to hear when you asked
a pointless question?

Add to that the Heisenberging that happens to interviewees (and
interviewers) from reading this thread
 
S

Steven D'Aprano

Am 09.07.2012 23:22, schrieb Peter:

on the contrary! When a potential candidate has computer stuff as her
main hobby then she goes on the no-hire list. I prefer people that can
cope with stress and pressure as well as people who can think outside
the box. When you work with computers all day at work *and* at home then
you are unable to shut off mentally.

....because the stuff you do on computers at work, and the stuff you do on
computers at home, are obviously exactly the same thing.

If they read for their job, and read at home, does that also mean they
can't shut off?

This is why I hate job interviews. You have like 30 minutes, or even as
little as 30 seconds, to make a good impression on somebody who may or
may not be capable of telling the difference between a cheese sandwich
and a box of hair -- and even the *good* interviewers are probably making
their judgement on the basis of subjective factors with no right or wrong
answers.

Gardening is great hobbies for a developer. You need to be patient,
reliable and provide constantly good work to grow your own vegetables.

And live in a house in the suburbs with enough room for a garden, good
soil, and not in the shadow of buildings. And work hours where you are
home during daylight hours.

You know what else is a great hobby for a developer? Anything, or
nothing, at all.
 
C

Chris Angelico

I agree with Christian, a developer should have hobbies other than computer stuffs. Versatile environment give more
Ability to think differently.
I like playing guitar :)

Music and programming do go VERY well together. My hobbies include
online roleplaying (Dungeons & Dragons, etc), writing/managing a MUD,
playing the church organ, and arranging 19th-century music. It's not
at all an uncommon pairing.

But would a job interviewer REALLY care that I spend my Sunday
mornings up front, hiding behind two manuals and a set of faulty
pedals? Or would it be of interest that I play the odd video game (and
believe you me, some of the games I play are VERY odd)? If so, I
hereby resign all hope of comprehending job interviews, and will fall
back on Mr Hall Pycroft's notion[1] that there's absolutely no logic
to them at all.

ChrisA

[1] cf Sherlock Holmes: The Adventure of the Stock-Broker's Clerk
 
J

Jean-Michel Pichavant

Tim said:
IIRC, ~2.0? I'm cognizant of the shift happening from the string
module to string methods, but I wouldn't expect deep history
knowledge--last I checked, RedHat still supports a RHEL version that
ships with 2.4, so that's about as far back as I'd probe these days
(so I'd drop the decorators question now). Certainly not a
deal-breaker either way. Just more data points.

-tkc
Why would you want to hire someone that knows something pointless as the
version where feature X has been introduced ? Just tell him that feature
X has been introducted in version Y, costless 2.5sec training. Don't you
want to hire someone that knows things you don't and benefit from each
others abilities, learning from each others, improving the company
global skill range ?

JM
 
M

Mark Lawrence

I agree with Christian, a developer should have hobbies other than computer stuffs. Versatile environment give more
Ability to think differently.
I like playing guitar :)

Music and programming do go VERY well together. My hobbies include
online roleplaying (Dungeons & Dragons, etc), writing/managing a MUD,
playing the church organ, and arranging 19th-century music. It's not
at all an uncommon pairing.

But would a job interviewer REALLY care that I spend my Sunday
mornings up front, hiding behind two manuals and a set of faulty
pedals? Or would it be of interest that I play the odd video game (and
believe you me, some of the games I play are VERY odd)? If so, I
hereby resign all hope of comprehending job interviews, and will fall
back on Mr Hall Pycroft's notion[1] that there's absolutely no logic
to them at all.

ChrisA

[1] cf Sherlock Holmes: The Adventure of the Stock-Broker's Clerk

Surely the purpose of asking questions about hobbies or similar is to
establish whether or not the person is likely to fit in?

Slightly different tack, you have to get into the interview, i.e. pass
the first thirty seconds test. I recall reading in a book in the local
library of a manager that wouldn't employ people unless they were
wearing a new pair of shoes. Guess they didn't take many people on.
 
R

rusi

This is why I hate job interviews. You have like 30 minutes, or even as
little as 30 seconds, to make a good impression on somebody who may or
may not be capable of telling the difference between a cheese sandwich
and a box of hair -- and even the *good* interviewers are probably making
their judgement on the basis of subjective factors with no right or wrong
answers.

You make it sound terrible...
But just think which is worse: jobs decided in 30 minutes or marriages
decided in 30 seconds?
 
B

BartC

Peter said:
One of my favourite questions when interviewing - and it was 100% reliable
:) - "what are your hobbies?"

If the answer included programming then they were hired, if not, then they
went to the "B" list.

In my experience, anybody who is really interested in programming will
have it as a hobby (and is keen to learn even if they don't currently have
the knowledge you require) - otherwise it is "just a job".

Won't they be tempted to work on their pet project instead of what they're
being paid for? There's also the risk of mixing up software created at home,
with that done at work, with all the intellectual property issues that might
arise.
 
C

Chris Angelico

There's also the risk of mixing up software created at home, with that done
at work, with all the intellectual property issues that might arise.

You just make the matter clear from the beginning, for instance:
what's done at work stays at work, and copyright is assigned by the
act of pushing to the repository. I've lifted oddments of code from my
home projects to use at work; it's no different from using skills
learned at home, which is exactly what a programmer is being paid for.

This is another good reason to make license terms clear and explicit
on every project you ever put a hand to. Doesn't matter who's lifting
code from where to where, it's easy to work out whether it's
permissible or not.

ChrisA
 
E

Ethan Furman

Jean-Michel Pichavant said:
Why would you want to hire someone that knows something pointless as the
version where feature X has been introduced ?

As an example from today, if someone claimed to have 5+ years of Python
experience, but didn't know that 'with' was standard in 2.6 (or at least
the end of the 2.x cycle) I would be suspicious that they actually had
the experience they claimed.

~Ethan~
 
S

Steven D'Aprano

As an example from today, if someone claimed to have 5+ years of Python
experience, but didn't know that 'with' was standard in 2.6 (or at least
the end of the 2.x cycle) I would be suspicious that they actually had
the experience they claimed.

Be careful of jumping to conclusions though. Perhaps they have five years
experience with Python 1.5, 2.3 and 2.4 on Centos systems. Of course, if
they try to sell themselves as having five years experience with Python
3.2 and they don't know anything about the with statement, that tells you
everything you need to know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top