What possible tricky areas/questions could be asked in Python based
Technical Interviews? 25 3406
PyPK wrote: What possible tricky areas/questions could be asked in Python based Technical Interviews?
I would try to check if the applicant understands the Python data model: http://docs.python.org/ref/objects.html Because I thinkt that's
fundamental to understanding the Python language and understanding
complexity of operations.
-- Gerhard
hmm Thats one thing. Also I was thinking of something like benefites of
python over other languages. Probably that coould be one ?
I usually start by asking how you make variables "private" within
classes. That seems to tell me if they understand something about the
design of the language and it's a quick filter to tell if they know
something about the syntax.
The other question that I use is asking about 3rd party libraries that
they have found useful. That can lead into some good questions about
what they like about those libraries and what they dislike. That
question helps me understand whether they've thought at all about how
to design in Python.
If I can't get a good conversation started with either of those, I'll
ask what they don't like about Python, to see if they've actually used
it to solve a real problem, or if they've just read the tutorial.
As always, the best interview questions are open-ended, and give the
candidate some room to really show their stuff (or give them enough
rope to hang themselves).
PyPK <su*******@gmai l.com> wrote: What possible tricky areas/questions could be asked in Python based Technical Interviews?
I like to present code that seems like it should work, but has some kind
of relatively subtle problem, either of correctness in some corner case,
or of performance, etc -- and I ask them what they would say if they
were to code-review that code, or how they would help a student who came
to them with that code and complaints about it not working, &c.
This tells me whether they have real-world Python experience, and how
deep, or whether they've carefully studied the appropriate areas of
"Python in a Nutshell" and the Cookbook (and I'm biased enough to think
that the second kind of preparation is almost as good as the first
kind...;-).
Not sure whether you think this count as "tricky"... they're typically
problems that do come up in the real world, from (e.g.):
for string_piece in lots_of_pieces:
bigstring += string_piece
(a typical performance-trap) to
for item in somelist:
if isbad(item):
somelist.remove (item)
(with issues of BOTH correctness and performance), to
class Sic:
def getFoo(self): ...
def setFoo(self): ...
foo = property(getFoo , setFoo)
to
class Base(object)
def getFoo(self): ...
def setFoo(self): ...
foo = property(getFoo , setFoo)
class Derived(Base):
def getFoo(self): ....
and so on, and so forth. If a candidate makes short work of a couple of
these, and I've been asked to focus my part of the interview solely on
Python coding, I may branch out into more advanced stuff such as asking
for an example use case for a closure, a custom descriptor, or an import
hook, for example -- those are the cases in which I'm trying to decide
if, on a scale of 1 to 5, the candidate's Python competence is about 4
or well over 4 (I would not consider having no idea of why one might
want to code a custom descriptor to be at all "disqualify ing" -- it
would just mean I'd rate the candidate 4 out of five, instead of 4.5 or
more, for Python coding competence).
Alex
On 10/24/05, Alex Martelli <al*****@yahoo. com> wrote: I may branch out into more advanced stuff such as asking for an example use case for a closure, a custom descriptor, or an import hook, for example
Isn't that approaching things from the wrong angle? You're asking them
to synthesise a problem for a given solution, rather than analyse a
problem to determine an appropriate solution. Asking questions like
these tests memory more than competence -- for example, if you ask me
of a use case for a closure, the only answer I could give would be to
remember a problem I'd solved in the past using one.
Andrew
Andrew Durdin <ad*****@gmail. com> wrote: On 10/24/05, Alex Martelli <al*****@yahoo. com> wrote: I may branch out into more advanced stuff such as asking for an example use case for a closure, a custom descriptor, or an import hook, for example
Isn't that approaching things from the wrong angle? You're asking them to synthesise a problem for a given solution, rather than analyse a problem to determine an appropriate solution. Asking questions like these tests memory more than competence -- for example, if you ask me of a use case for a closure, the only answer I could give would be to remember a problem I'd solved in the past using one.
And why do you think that would be wrong? If you've used closures, you
know what you've used them for, and (I would hope) why. If you've never
used them, you're welcome to answer "I have no idea why anybody would
wanna use THAT crazy thing for" (I always give points for honesty;-), or
else try to bluff your way through (sorry, no points for chutzpah!-).
I don't know of any issue that could be solved ONLY by a closure (we
didn't have closures in 1.5.2 yet we made out excellently well
anyhow;-), after all. The point is, does the candidate really
understand closures (ideally by practical experience)? Within the
limited confines of a less-than-an-hour interview (which is what we
normally use -- several interviewers, but no more than about 45 minutes
each, with different focus for each interviewer) I believe that asking
for use cases is a perfectly good way to gauge if a candidate fully
understands (ideally by experience) a certain language feature.
It's not just Python, btw. When I'm asked to focus on C++ skills, I
will similarly ask, e.g., what a use case would be for virtual
inheritance, say. How ELSE would you gauge, within that very limited
time-span, a candidate's grasp of some advanced language feechur?-)
Alex
PyPK wrote: hmm Thats one thing. Also I was thinking of something like benefites of python over other languages.
That's fairly context-dependant *and* subjective.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom. gro'.split('@')])"
Alex Martelli wrote: I like to present code that seems like it should work, but has some kind of relatively subtle problem, either of correctness in some corner case, or of performance, etc -- and I ask them what they would say if they were to code-review that code, or how they would help a student who came to them with that code and complaints about it not working, &c.
[snip]
Not sure whether you think this count as "tricky"... they're typically problems that do come up in the real world, from (e.g.): for string_piece in lots_of_pieces: bigstring += string_piece (a typical performance-trap) to for item in somelist: if isbad(item): somelist.remove (item) (with issues of BOTH correctness and performance), to
Those two are easy. However, and this is where I show
my hard-won ignorance, and admit that I don't see the
problem with the property examples:
class Sic: def getFoo(self): ... def setFoo(self): ... foo = property(getFoo , setFoo) to class Base(object) def getFoo(self): ... def setFoo(self): ... foo = property(getFoo , setFoo)
class Derived(Base): def getFoo(self): ....
Unless the answer is "Why are you using setters and
getters anyway? This isn't Java you know."
Oh wait! Yes I do... the setter doesn't actually take
an argument to set the property too. Is that it, or
have a missed a cunningly hidden deeper problem?
--
Steven.
Steven D'Aprano wrote: Alex Martelli wrote:
Those two are easy. However, and this is where I show my hard-won ignorance, and admit that I don't see the problem with the property examples:
class Base(object) def getFoo(self): ... def setFoo(self): ... foo = property(getFoo , setFoo)
class Derived(Base): def getFoo(self): ....
Unless the answer is "Why are you using setters and getters anyway? This isn't Java you know."
Oh wait! Yes I do... the setter doesn't actually take an argument to set the property too. Is that it, or have a missed a cunningly hidden deeper problem?
Derived.getFoo( ) will not override the use of Base.getFoo() to access the attribute foo.
Kent This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jonathan P. |
last post by:
....that would be for desktop-based apps, games, 3d graphics,
and multimedia.
....thanks to APIs and bindings like Pygame, PyOpenGL, PyGtk
and PyGtkGLExt.
A summary of a lengthy post on the subject:
http://lists.free.net.ph/pipermail/compsci/2003-October/001510.html
> - OpenGL for accelerated graphics.
|
by: Bung |
last post by:
Hi,
I have a tricky sql statment I have to write (tricky for me) and I am
stuck. I'm having trouble with the following problem.
Table1 (Column a, Column b, Column c)
Table2 (Column a, Column b, Column c)
Table3 (Column a, Column b, Column c)
Table1 contains a row of value (1, 2, 3)
|
by: pruebauno |
last post by:
I am currently working on a tricky problem at work. I googled around a
bit, but "time intervals" did not come up with anything useful.
Although I have some rough idea of how I could solve it, I still would
value some input.
I have information of (It has only couple dozen entries.)
ServiceNum, DollarCost
and a input database table in the form (several GBytes):
ClientNumber (CN), BeginDate(BD), EndDate(ED),
|
by: Dave |
last post by:
So I'm trying to write a CSS preprocessor.
I want to add the ability to append a selector onto other selectors.
So, given the following code:
=========================================
#selector {
{ property: value; property: value; }
.other_selector { property: value; property: value; }
|
by: cfriedalek |
last post by:
OK, I've asked this earlier this week with no response. Since then I've
also received a suggestion from the app developers but that failed with
the same type error problem. Hopefully Mark Hammond or other experts
can offer a suggestion as to how to get around this problem. I'm
foolish enough to think that a solution can be found. Or can someone
suggest how to pm Mark.
---------------------------
I'm using pywin32com to drive a 3rd...
| |
by: brian.turner |
last post by:
This is sort of a design/javascript question. It involves CSS
rendering in dynamic areas of a page using IE.
E 6 & 7
HI There, We've created some example static html pages (using CSS)
that look great in IE. We are now converting these into dynamic pages
that use javascript to dynamically update certain areas of the page.
After the conversion the dynamic areas of the page do not render the
CSS styles (the styles are not displaying...
|
by: seberino |
last post by:
How extract the visible numerical data from this Microsoft financial
web site?
http://tinyurl.com/yw2w4h
If you simply download the HTML file you'll see the data is *not*
embedded in it but loaded from some other file.
Surely if I can see the data in my browser I can grab it somehow right
in a Python script?
|
by: schweet1 |
last post by:
Greetings,
I am attempting to automate accessing and saving a file (a TIF) from
the following URL:
http://patimg1.uspto.gov/.DImg?Docid=US007376435&PageNum=1&IDKey=E21184B8FAD5
I have tried some methods using urllib, httplib, and
web32com.client(InternetExplorer), but haven't been successful.
Currently I am using (in Python 2.5)
|
by: iceanfire |
last post by:
On the backend I have a python script that gets two pieces of
information from the database:
1. html
2. xml file
The javascript is supposed to :
1. inject the html file into a div
2. use the xml file to create markers on google maps
I want to avoid multiple calls to the database, so I was wondering, if
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |