Python Interview Questions

Discussion in 'Python' started by Krypto, Oct 30, 2007.

  1. Krypto

    Krypto Guest

    Hi,

    I have used Python for a couple of projects last year and I found it
    extremely useful. I could write two middle size projects in 2-3 months
    (part time). Right now I am a bit rusty and trying to catch up again
    with Python.

    I am now appearing for Job Interviews these days and I am wondering if
    anybody of you appeared for a Python Interview. Can you please share
    the questions you were asked. That will be great help to me.

    Thanks,
     
    Krypto, Oct 30, 2007
    #1
    1. Advertising

  2. Krypto

    Guest

    Krypto wrote:
    > Hi,
    >
    > I have used Python for a couple of projects last year and I found it
    > extremely useful. I could write two middle size projects in 2-3 months
    > (part time). Right now I am a bit rusty and trying to catch up again
    > with Python.
    >
    > I am now appearing for Job Interviews these days and I am wondering if
    > anybody of you appeared for a Python Interview. Can you please share
    > the questions you were asked. That will be great help to me.
    >
    > Thanks,


    assert() in the c functions extending python ends the interview rather
    quickly.
    or at least it did for me @IronPort ages ago.
    To be honest they have massively multithreaded app
    and the last thing they needed was an appliance down because
    some programmer was not sure what to do when a certain condition
    arises.
     
    , Oct 30, 2007
    #2
    1. Advertising

  3. Krypto

    Tim Chase Guest

    > I have used Python for a couple of projects last year and
    > I found it extremely useful. I could write two middle size
    > projects in 2-3 months (part time). Right now I am a bit
    > rusty and trying to catch up again with Python.
    >
    > I am now appearing for Job Interviews these days and I am
    > wondering if anybody of you appeared for a Python
    > Interview. Can you please share the questions you were
    > asked. That will be great help to me.


    While I haven't interviewed precisely for Python, I've been
    on the other (interviewing) end and can offer a few of the
    sorts of things I ask. I don't expect perfect answers to
    all of them, but they show me a range of what the
    interviewee knows. I try and give a scattershot of
    questions from the following areas to try and narrow down
    where they fall in terms of pythonability, and then grill
    more deeply around the edges that I find.

    Basic Python:
    =============
    - do they know a tuple/list/dict when they see it?

    - when to use list vs. tuple vs. dict. vs. set

    - can they use list comprehensions (and know when not to
    abuse them? :)

    - can they use tuple unpacking for assignment?

    - string building...do they use "+=" or do they build a list
    and use .join() to recombine them efficiently

    - truth-value testing questions and observations (do they
    write "if x == True" or do they just write "if x")

    - basic file-processing (iterating over a file's lines)

    - basic understanding of exception handling

    Broader Basic Python:
    =====================
    - questions about the standard library ("do you know if
    there's a standard library for doing X?", or "in which
    library would you find [common functionality Y]?") Most
    of these are related to the more common libraries such as
    os/os.path/sys/re/itertools

    - questions about iterators/generators

    - questions about map/reduce/sum/etc family of functions

    - questions about "special" methods (__<foo>__)

    More Advanced Python:
    =====================
    - can they manipulate functions as first-class objects
    (Python makes it easy, but do they know how)

    - more detailed questions about the std. libraries (such as
    datetime/email/csv/zipfile/networking/optparse/unittest)

    - questions about testing (unittests/doctests)

    - questions about docstrings vs. comments, and the "Why" of
    them

    - more detailed questions about regular expressions

    - questions about mutability

    - keyword/list parameters and unpacked kwd args

    - questions about popular 3rd-party toolkits (BeautifulSoup,
    pyparsing...mostly if they know about them and when to use
    them, not so much about implementation details)

    - questions about monkey-patching

    - questions about PDB

    - questions about properties vs. getters/setters

    - questions about classmethods

    - questions about scope/name-resolution

    - use of lambda

    Python History:
    ===============
    - decorators added in which version?

    - "batteries included" SQL-capible DB in which version?

    - the difference between "class Foo" and "class Foo(object)"

    - questions from "import this" about pythonic code

    Python Resources:
    =================
    - what do they know about various Python web frameworks
    (knowing a few names is usually good enough, though
    knowledge about the frameworks is a nice plus) such as
    Django, TurboGears, Zope, etc.

    - what do they know about various Python GUI frameworks and
    the pros/cons of them (tkinter, wx, pykde, etc)

    - where do they go with Python related questions (c.l.p,
    google, google-groups, etc)

    Other Process-releated things:
    ==============================
    - do they use revision control
    (RCS/CVS/Subversion/Mercurial/Git...anything but VSS) and
    know how to use it well

    - do they write automated tests for their code

    Touchy-feely things:
    ====================
    - tabs vs. spaces, and their reasoning

    - reason for choosing Python

    - choice of editor/IDE

    Good luck with your interviewing and hope this helped,

    -tkc
     
    Tim Chase, Oct 30, 2007
    #3
  4. Krypto

    Krypto Guest


    > Good luck with your interviewing and hope this helped,
    >
    > -tkc


    Well, I was looking exactly for this. Many thanks to you Tim. After
    going through your list I came to know that I know nothing in Python
    and have to catch up a whole lot.
     
    Krypto, Oct 30, 2007
    #4
  5. Krypto

    Ben Finney Guest

    Krypto <> writes:

    > I am now appearing for Job Interviews these days and I am wondering
    > if anybody of you appeared for a Python Interview. Can you please
    > share the questions you were asked. That will be great help to me.


    I've given some interviews for programming positions. I find it
    worthless to ask questions about the language; instead, I ask the
    applicant *what they've done* with the language.

    Then, I ask them to write some code, usually something simple but
    poorly-specified, and observe their approach to the task. That tells
    me far more about their knowledge of the language than answers to quiz
    questions; it also tells me far more about them as a programmer, which
    is what I actually care about.

    --
    \ "Any intelligent fool can make things bigger and more |
    `\ complex... It takes a touch of genius – and a lot of courage |
    _o__) – to move in the opposite direction." —Albert Einstein |
    Ben Finney
     
    Ben Finney, Oct 30, 2007
    #5
  6. Krypto

    Tim Chase Guest

    >> Good luck with your interviewing and hope this helped,
    >>
    >> -tkc

    >
    > Well, I was looking exactly for this. Many thanks to you Tim. After
    > going through your list I came to know that I know nothing in Python
    > and have to catch up a whole lot.


    It was certainly not an exhaustive list of "you must know
    everything on this list or else you'd never get hired", or
    conversely, it's also not a "if you don't know everything on this
    list, you're not worthy to call yourself a Python programmer".

    It's a way I've found to gauge what somebody means when they say
    the program in Python. I've had the gamut of folks where that
    phrase means anything from "I glanced at some Python code once"
    to "I'm Guido" (okay, so that's a bit of hyperbole, but you get
    the idea). My goal is to use as few questions as possible to
    flush out just what an interviewee mean by "I program in Python".

    Hanging out here on the c.l.p list will introduce you to a lot of
    these ideas on the sly. For my "basic" categories,
    lists/tuples/dicts/sets as well as list-comprehensions show up
    here regularly; I've answered several on basic file processing in
    the last day or two (iterate over a file object, doing something
    with each line); you see truth-testing regularly (and
    chastizement when folks do things like "if foo == True"); you see
    basic exception handling...all the basic stuff is regularly
    covered/used here.

    Knowledge of the available system libraries comes with using them
    and having need for them. I'm still learning it. I finally
    tired of writing my own command-line parsers and investigated
    what the std. lib had to offer, only to find that optparse did
    everything I needed: cleanly, readably, and extensibly. So now I
    use that instead. That sort of experience only comes from time
    emersed in using Python to solve problems.

    All that to say, don't sweat it too badly, and that fortunately
    Python is an easy language to work with.

    -tkc
     
    Tim Chase, Oct 30, 2007
    #6
  7. Krypto

    konryd Guest


    > - string building...do they use "+=" or do they build a list
    > and use .join() to recombine them efficiently



    I'm not dead sure about that, but I heard recently that python's been
    optimized for that behaviour. That means: using += is almost as fast
    as joining list. Besides, "+=" is more obvious than the other choice
    and since performance is not a problem until it's a problem, I'd
    rather use it. Anyway: I wouldn't pick it for an interview question.

    regards
    Konrad
     
    konryd, Oct 31, 2007
    #7
  8. konryd wrote:
    >> - string building...do they use "+=" or do they build a list
    >> and use .join() to recombine them efficiently

    >
    >
    > I'm not dead sure about that, but I heard recently that python's been
    > optimized for that behaviour. That means: using += is almost as fast
    > as joining list.


    For some simple cases, this is true. But it only works in CPython, not
    say Jython. So it's a better practice to continue using .join().

    STeVe
     
    Steven Bethard, Oct 31, 2007
    #8
  9. On Oct 31, 2:58 am, konryd <> wrote:
    > > - string building...do they use "+=" or do they build a list
    > > and use .join() to recombine them efficiently

    >
    > I'm not dead sure about that, but I heard recently that python's been
    > optimized for that behaviour. That means: using += is almost as fast
    > as joining list. Besides, "+=" is more obvious than the other choice
    > and since performance is not a problem until it's a problem, I'd
    > rather use it. Anyway: I wouldn't pick it for an interview question.


    Concatenating strings using += will often perform quadratically with
    the number of concatenations. Your testing will likely use a small
    number and not take a noticeable amount of time. Then it'll get
    deployed and someone will plug in a much larger number, wondering why
    the program is so slow. The recent optimizations just make it more
    obscure.

    += shouldn't be an obvious choice for sequences. If it's mutable,
    use .append(). If it's immutable, build up in a mutable sequence,
    then convert.

    --
    Adam Olsen, aka Rhamphoryncus
     
    Rhamphoryncus, Oct 31, 2007
    #9
  10. Krypto

    Paul Rubin Guest

    Rhamphoryncus <> writes:
    > += shouldn't be an obvious choice for sequences. If it's mutable,
    > use .append(). If it's immutable, build up in a mutable sequence,
    > then convert.


    I generally prefer to do this with generators rather than mutation.
    I.e. instead of

    blech = []
    while some_condition():
    yuck = some mess
    blech.append(yuck)
    result = ''.join(blech)

    I like

    def gen_blech():
    while some_condition():
    yield (some mess)
    result = ''.join(gen_blech())

    It just seems cleaner. YMMV. Of course when "some mess" is a single
    expression instead of multiple statements, it may be possible to use
    a genexp without the auxiliary function.
     
    Paul Rubin, Nov 1, 2007
    #10
  11. Krypto

    Guest

    On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote:
    > > I have used Python for a couple of projects last year and
    > > I found it extremely useful. I could write two middle size
    > > projects in 2-3 months (part time). Right now I am a bit
    > > rusty and trying to catch up again with Python.
    > >
    > > I am now appearing for Job Interviews these days and I am
    > > wondering if anybody of you appeared for a Python
    > > Interview. Can you please share the questions you were
    > > asked. That will be great help to me.

    >
    > While I haven't interviewed precisely for Python, I've been
    > on the other (interviewing) end and can offer a few of the
    > sorts of things I ask. I don't expect perfect answers to
    > all of them, but they show me a range of what the
    > interviewee knows. I try and give a scattershot of
    > questions from the following areas to try and narrow down
    > where they fall in terms of pythonability, and then grill
    > more deeply around the edges that I find.
    >
    > Basic Python:
    > =============
    > - do they know a tuple/list/dict when they see it?
    >
    > - when to use list vs. tuple vs. dict. vs. set
    >
    > - can they use list comprehensions (and know when not to
    > abuse them? :)
    >
    > - can they use tuple unpacking for assignment?
    >
    > - string building...do they use "+=" or do they build a list
    > and use .join() to recombine them efficiently
    >
    > - truth-value testing questions and observations (do they
    > write "if x == True" or do they just write "if x")
    >
    > - basic file-processing (iterating over a file's lines)
    >
    > - basic understanding of exception handling
    >
    > Broader Basic Python:
    > =====================
    > - questions about the standard library ("do you know if
    > there's a standard library for doing X?", or "in which
    > library would you find [common functionality Y]?") Most
    > of these are related to the more common libraries such as
    > os/os.path/sys/re/itertools
    >
    > - questions about iterators/generators
    >
    > - questions about map/reduce/sum/etc family of functions
    >
    > - questions about "special" methods (__<foo>__)
    >
    > More Advanced Python:
    > =====================
    > - can they manipulate functions as first-class objects
    > (Python makes it easy, but do they know how)
    >
    > - more detailed questions about the std. libraries (such as
    > datetime/email/csv/zipfile/networking/optparse/unittest)
    >
    > - questions about testing (unittests/doctests)
    >
    > - questions about docstrings vs. comments, and the "Why" of
    > them
    >
    > - more detailed questions about regular expressions
    >
    > - questions about mutability
    >
    > - keyword/list parameters and unpacked kwd args
    >
    > - questions about popular 3rd-party toolkits (BeautifulSoup,
    > pyparsing...mostly if they know about them and when to use
    > them, not so much about implementation details)
    >
    > - questions about monkey-patching
    >
    > - questions about PDB
    >
    > - questions about properties vs. getters/setters
    >
    > - questions about classmethods
    >
    > - questions about scope/name-resolution
    >
    > - use of lambda
    >
    > Python History:
    > ===============
    > - decorators added in which version?
    >
    > - "batteries included" SQL-capible DB in which version?
    >
    > - the difference between "class Foo" and "class Foo(object)"
    >
    > - questions from "import this" about pythonic code
    >
    > Python Resources:
    > =================
    > - what do they know about various Python web frameworks
    > (knowing a few names is usually good enough, though
    > knowledge about the frameworks is a nice plus) such as
    > Django, TurboGears, Zope, etc.
    >
    > - what do they know about various Python GUI frameworks and
    > the pros/cons of them (tkinter, wx, pykde, etc)
    >
    > - where do they go with Python related questions (c.l.p,
    > google, google-groups, etc)
    >
    > Other Process-releated things:
    > ==============================
    > - do they use revision control
    > (RCS/CVS/Subversion/Mercurial/Git...anything but VSS) and
    > know how to use it well
    >
    > - do they write automated tests for their code
    >
    > Touchy-feely things:
    > ====================
    > - tabs vs. spaces, and their reasoning
    >
    > - reason for choosing Python
    >
    > - choice of editor/IDE
    >
    > Good luck with your interviewing and hope this helped,
    >
    > -tkc
     
    , Jul 9, 2012
    #11
  12. Krypto

    Tim Chase Guest

    On 07/09/12 01:39, wrote:
    > On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote:


    yes, yes I did, almost 5 years ago. :)

    You didn't include any questions/comments on my email, so it's a bit
    hard to respond.

    >> While I haven't interviewed precisely for Python, I've been
    >> on the other (interviewing) end and can offer a few of the
    >> sorts of things I ask.

    [snip]
    >> Python History:
    >> ===============
    >> - decorators added in which version?
    >>
    >> - "batteries included" SQL-capible DB in which version?


    I've long wanted to update my original post in this department to
    include things like the "with" statement as well as my reasoning.
    Some of our deployments were stuck on earlier versions (currently
    our oldest is a 2.4 deployment that is merrily chugging along,
    somewhat stuck due to an external binary dependency for which terms
    changed between versions). At the time I wrote that, we had some
    2.2 and 2.3 code in production that couldn't use decorators, and
    sqlite wasn't officially added until 2.5 (IIRC). Now that
    everything is at least 2.4, code can now use decorators freely.

    I'd also likely include questions about integer division and other
    stuff added in 3.x (such as the default new-class behavior).

    So my main motivation was to make sure applicants knew that, in some
    of our environments, certain features might not be available. Not
    that I wanted to hire a Python historian.

    >> Other Process-releated things:
    >> ==============================
    >> - do they use revision control
    >> (RCS/CVS/Subversion/Mercurial/Git...anything but VSS) and
    >> know how to use it well
    >>
    >> - do they write automated tests for their code


    Don't let the importance of these two escape. It's SOOOOOOO easy to
    grab any of the freely available VCS tools and learn the ropes, or
    to write some test code. Failure to do so just seems like
    negligence these days.

    -tkc
     
    Tim Chase, Jul 9, 2012
    #12
  13. Krypto

    Roy Smith Guest

    In article <>,
    wrote:

    > On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote:


    > > - more detailed questions about the std. libraries (such as
    > > datetime/email/csv/zipfile/networking/optparse/unittest)


    You need to be careful when you ask questions like this. I would expect
    somebody to be aware of those and have a high-level understanding of
    what they do, but certainly not remember the details of the exact syntax
    and argument order. Even with stuff I use everyday (like unittest and
    datetime), I have a browser open to the reference manual most of the
    time.

    > > - questions about PDB


    Heh. I would answer that with, "Python Debugger? I've never used it".

    > > Python History:
    > > ===============
    > > - decorators added in which version?
    > >
    > > - "batteries included" SQL-capible DB in which version?
    > >
    > > - the difference between "class Foo" and "class Foo(object)"
    > >
    > > - questions from "import this" about pythonic code


    With the exception of the question about new-style classes, these are
    silly questions. I was around when both decorators and sqlite3 were
    added. I couldn't possible tell you when to any precision better than
    "2 dot something". As for the zen of python, it's cute, and a piece of
    python folklore, but hardly an essential part of being a good python p
     
    Roy Smith, Jul 9, 2012
    #13
  14. Krypto

    Tim Chase Guest

    On 07/09/12 08:25, Roy Smith wrote:
    >> On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote:

    >
    >>> - more detailed questions about the std. libraries (such as
    >>> datetime/email/csv/zipfile/networking/optparse/unittest)

    >
    > You need to be careful when you ask questions like this. I would expect
    > somebody to be aware of those and have a high-level understanding of
    > what they do, but certainly not remember the details of the exact syntax
    > and argument order. Even with stuff I use everyday (like unittest and
    > datetime), I have a browser open to the reference manual most of the
    > time.


    Yeah, the aim isn't to grill them on the minutia, but to get a
    feeling that they know the basics. The zipfile module offers a
    ZipFile object for reading/writing zip files with or without
    compression. The CSV file allows for reading/writing CSV files with
    definable delimiters and quoting/escaping. Etc.


    >>> - questions about PDB

    >
    > Heh. I would answer that with, "Python Debugger? I've never used it".


    The ability to know off the top of your head that it's the "Python
    Debugger" is more than enough :) That's just first-order
    ignorance: you know what you don't know and can spend a few minutes
    reading up on it if you need it. 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.

    >>> Python History:
    >>> ===============
    >>> - decorators added in which version?
    >>>
    >>> - "batteries included" SQL-capible DB in which version?
    >>>
    >>> - the difference between "class Foo" and "class Foo(object)"
    >>>
    >>> - questions from "import this" about pythonic code

    >
    > With the exception of the question about new-style classes, these are
    > silly questions. I was around when both decorators and sqlite3 were
    > added. I couldn't possible tell you when to any precision better than
    > "2 dot something".


    I'd even be satisfied if a person just knew that such features
    weren't there all along and might need to be worked around for older
    deployments.

    > As for the zen of python, it's cute, and a piece of python
    > folklore, but hardly an essential part of being a good python p


    [Ed: something appears to have gotten truncated there] Yeah, it's
    more about a person being sufficiently steeped in python to know
    bits and pieces of the zen, and their ability to recognize/create
    pythonic code. I've seen enough Java-written-in-Python to know what
    I don't want :)

    -tkc
     
    Tim Chase, Jul 9, 2012
    #14
  15. Krypto

    Rick Johnson Guest

    On Jul 9, 12:40 pm, Tim Chase <> wrote:
    > 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.

    > [Ed: something appears to have gotten truncated there]  Yeah, it's
    > more about a person being sufficiently steeped in python to know
    > bits and pieces of the zen, and their ability to recognize/create
    > pythonic code.  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.
     
    Rick Johnson, Jul 9, 2012
    #15
  16. On Monday, 9 July 2012 10:40:59 UTC-7, Tim Chase wrote:
    > On 07/09/12 08:25, Roy Smith wrote:
    > >> On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote:

    > >
    > >>> - more detailed questions about the std. libraries (such as
    > >>> datetime/email/csv/zipfile/networking/optparse/unittest)

    > >
    > > You need to be careful when you ask questions like this. I would expect
    > > somebody to be aware of those and have a high-level understanding of
    > > what they do, but certainly not remember the details of the exact syntax
    > > and argument order. Even with stuff I use everyday (like unittest and
    > > datetime), I have a browser open to the reference manual most of the
    > > time.

    >
    > Yeah, the aim isn't to grill them on the minutia, but to get a
    > feeling that they know the basics. The zipfile module offers a
    > ZipFile object for reading/writing zip files with or without
    > compression. The CSV file allows for reading/writing CSV files with
    > definable delimiters and quoting/escaping. Etc.
    >
    >
    > >>> - questions about PDB

    > >
    > > Heh. I would answer that with, "Python Debugger? I've never used it".

    >
    > The ability to know off the top of your head that it's the "Python
    > Debugger" is more than enough :) That's just first-order
    > ignorance: you know what you don't know and can spend a few minutes
    > reading up on it if you need it. 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.
    >
    > >>> Python History:
    > >>> ===============
    > >>> - decorators added in which version?
    > >>>
    > >>> - "batteries included" SQL-capible DB in which version?
    > >>>
    > >>> - the difference between "class Foo" and "class Foo(object)"
    > >>>
    > >>> - questions from "import this" about pythonic code

    > >
    > > With the exception of the question about new-style classes, these are
    > > silly questions. I was around when both decorators and sqlite3 were
    > > added. I couldn't possible tell you when to any precision better than
    > > "2 dot something".

    >
    > I'd even be satisfied if a person just knew that such features
    > weren't there all along and might need to be worked around for older
    > deployments.
    >
    > > As for the zen of python, it's cute, and a piece of python
    > > folklore, but hardly an essential part of being a good python p

    >
    > [Ed: something appears to have gotten truncated there] Yeah, it's
    > more about a person being sufficiently steeped in python to know
    > bits and pieces of the zen, and their ability to recognize/create
    > pythonic code. I've seen enough Java-written-in-Python to know what
    > I don't want :)
    >
    > -tkc


    Definitely appreciate your approach, I've asked similar questions when interviewing.

    I also usually like to ask what a candidate likes and dislikes about Python, hoping for the GIL to creep up, along with an explanation as to what it is, implementations that don't have it along with methods of getting around the lock (although that would be a fairly advanced topic IMHO). If it doesn't come up, sometimes I'll pop it in depending on their level of experience..
     
    Demian Brecht, Jul 9, 2012
    #16
  17. On Monday, 9 July 2012 10:40:59 UTC-7, Tim Chase wrote:
    > On 07/09/12 08:25, Roy Smith wrote:
    > >> On Tuesday, 30 October 2007 21:24:04 UTC+2, Tim Chase wrote:

    > >
    > >>> - more detailed questions about the std. libraries (such as
    > >>> datetime/email/csv/zipfile/networking/optparse/unittest)

    > >
    > > You need to be careful when you ask questions like this. I would expect
    > > somebody to be aware of those and have a high-level understanding of
    > > what they do, but certainly not remember the details of the exact syntax
    > > and argument order. Even with stuff I use everyday (like unittest and
    > > datetime), I have a browser open to the reference manual most of the
    > > time.

    >
    > Yeah, the aim isn't to grill them on the minutia, but to get a
    > feeling that they know the basics. The zipfile module offers a
    > ZipFile object for reading/writing zip files with or without
    > compression. The CSV file allows for reading/writing CSV files with
    > definable delimiters and quoting/escaping. Etc.
    >
    >
    > >>> - questions about PDB

    > >
    > > Heh. I would answer that with, "Python Debugger? I've never used it".

    >
    > The ability to know off the top of your head that it's the "Python
    > Debugger" is more than enough :) That's just first-order
    > ignorance: you know what you don't know and can spend a few minutes
    > reading up on it if you need it. 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.
    >
    > >>> Python History:
    > >>> ===============
    > >>> - decorators added in which version?
    > >>>
    > >>> - "batteries included" SQL-capible DB in which version?
    > >>>
    > >>> - the difference between "class Foo" and "class Foo(object)"
    > >>>
    > >>> - questions from "import this" about pythonic code

    > >
    > > With the exception of the question about new-style classes, these are
    > > silly questions. I was around when both decorators and sqlite3 were
    > > added. I couldn't possible tell you when to any precision better than
    > > "2 dot something".

    >
    > I'd even be satisfied if a person just knew that such features
    > weren't there all along and might need to be worked around for older
    > deployments.
    >
    > > As for the zen of python, it's cute, and a piece of python
    > > folklore, but hardly an essential part of being a good python p

    >
    > [Ed: something appears to have gotten truncated there] Yeah, it's
    > more about a person being sufficiently steeped in python to know
    > bits and pieces of the zen, and their ability to recognize/create
    > pythonic code. I've seen enough Java-written-in-Python to know what
    > I don't want :)
    >
    > -tkc


    Definitely appreciate your approach, I've asked similar questions when interviewing.

    I also usually like to ask what a candidate likes and dislikes about Python, hoping for the GIL to creep up, along with an explanation as to what it is, implementations that don't have it along with methods of getting around the lock (although that would be a fairly advanced topic IMHO). If it doesn't come up, sometimes I'll pop it in depending on their level of experience..
     
    Demian Brecht, Jul 9, 2012
    #17
  18. Krypto

    Peter Guest

    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 haveit 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 tospeed 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.
     
    Peter, Jul 9, 2012
    #18
  19. Krypto

    Peter Guest

    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 haveit 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 tospeed 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.
     
    Peter, Jul 9, 2012
    #19
  20. On Mon, Jul 9, 2012 at 5:22 PM, Peter <> wrote:
    > 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.


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

    -- Devin
     
    Devin Jeanpierre, Jul 9, 2012
    #20
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tim Chase
    Replies:
    0
    Views:
    711
    Tim Chase
    Mar 4, 2009
  2. Steve Holden
    Replies:
    0
    Views:
    413
    Steve Holden
    Mar 4, 2009
  3. Vijay
    Replies:
    2
    Views:
    658
    Öö Tiib
    May 7, 2010
  4. reema
    Replies:
    0
    Views:
    310
    reema
    Aug 26, 2008
  5. Cameron Simpson

    Re: Python Interview Questions

    Cameron Simpson, Jul 10, 2012, in forum: Python
    Replies:
    0
    Views:
    242
    Cameron Simpson
    Jul 10, 2012
Loading...

Share This Page