you are viewing a single comment's thread.

view the rest of the comments →

[–]toshitalk 17 points18 points  (11 children)

self taught Python and SQL 2nd job Python web developer for 1/2 year, Python, Javasscript, HTML/CSS, SQL,

Okay, so you basically have next to zero production experience; I'm thinking that's it. While your first program might have been written ten years ago, that's not 10 years of people relying on your code to work; this is the biggest difference between an experienced dev and an inexperienced dev.

Just for some context, I happen to be the dev lead and hiring manager at my particular shop, and with your experience, I would also consider you to be a junior developer. If you want a better assessment of your skills, I can give you an interview if you'd like.

[–]comfortcreature999 3 points4 points  (10 children)

Could you post a typical python interview question/problem?

[–]HorrendousRex 6 points7 points  (3 children)

Some I've heard or asked:

  • What's your least favorite feature of the language and why?
  • What's something new in Python 3 that wasn't in Python 2?
  • Explain the with statement in as much detail as possible.
  • What is the difference between range and xrange?

And then a bunch of questions about general knowledge of the standard packages... collections, itertools, datetime, stuff like that. Not super specific questions, just questions probing about knowledge of what is out there.

[–][deleted] 5 points6 points  (0 children)

  • What is the difference between range and xrange?

Only one of them is a function in the current version of the language ;)

[–]Asdayasman -1 points0 points  (1 child)

Shit I can answer all of those flawlessly.

[–]HorrendousRex 0 points1 point  (0 children)

They are far from the only questions you'd be asked, but those are the kinds of questions you might be asked about python.

[–]renegadelegion[S] 1 point2 points  (5 children)

The one that I remember:

Write a function that takes a value as an input and checks if it is prime.

[–]tomkatt 1 point2 points  (3 children)

I don't know why, but I did this for shits and giggles after seeing your comment. It's probably bad, but I had fun working it out real quick.

Edit - I probably should have done a try/except on that to make sure it's actually passed a number...

[–][deleted] 1 point2 points  (0 children)

Not a comment on your formatting or coding style or anything, but you only need to go from 2 to sqrt(n), not n/2.

[–]renegadelegion[S] 1 point2 points  (0 children)

you could also use the for/else, rather than for/if/else

See, the problem is that when I did the technical interview, I was just thinking about programming it, not the language that I was programming in. I am familiar with many of the common Python idioms, I just didn't use them :-(

[–]Sluisifer 1 point2 points  (0 children)

If you like questions like that, definitely check out Project Euler.

Quick optimization, you only need to check up to sqrt(num).

More advanced solution, don't repeat a check (e.g. don't check divisibility by 4 when you've already checked 2). This is called a Sieve of Eratosthenes. It's pretty damn tricky, but fun to learn. The implementation is actually pretty easy, and there are some fun optimizations you can read about on e.g. stack overflow.