Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How best to prepare for Python interviews starting in 3 months?
69 points by Takizawamura 3 days ago | hide | past | favorite | 37 comments
My friend works in a bank and for a long time has wanted to make the switch to Python. To date, he has read a few books and knows some intermediate concepts, such as closures, generators, etc.. Outside of Python, he has built workflows in Alteryx and knows some SQL.

His teenage son challenged him to start applying for roles in 3 calendar months from now. He figures he can dedicate a max of 3 hours per day. How should he best use his time?

Should he drill on Leetcode? Build a small portfolio? Gain a specialization within Python? How best would you allocate his hours?






If you have 3-months - https://pythonmorsels.com has been a godsend for me when drilling on the fundamentals of the python language. I guarantee that if you are relatively new to the language, that you won't run out of (A) Interesting exercises, (B) Fundamental language concepts in less than 30-45 days, even spending 2-3 hours/day. Just knock off 1 or 2 a day, and then come back a couple days later, and, without checking into the hints/guidance, try and recall how you solved the exercise the first time - with zero checking into SO/exercise hints. I got 10x more out of the second solve, doing it from only my knowledge. If you can keep that cadence up for even a month - you will have at least the language fundamentals down really, really solid - then you can pivot to various algorithmic solves in the language, or, if there is a particular front-end/back-end/etc.. framework that you need to know - drilling into the characteristics of that.

Trey Hunner is one of the more gifted speakers - and he's really laid out a great exercise and test-coverage plan.

The best thing I can say about pythonmorsels is that, every 15-20 exercises, I look back and realize how little I actually knew. Going through all the exercises is easily the equivalent of a full-semester "Introduction to language" course at a college (minus the algorithmic elements - this is a "language concepts" site)


I assume you're talking about the pro plan and not the lite plan?

Yeah - whatever plan lets you draw from his full library. Best education money I've ever spent in my life.

It's heavily domain dependent IMO.

Leetcode only gets you pass the first round of interviews and not every company does them. I consider these useless textbook problems but you'll need them to get the job. They won't help you much in the job.

More importantly (imo) he needs domain specific knowledge. I.e. if it's going to be web development then he needs to start a web project with the backend in python. If it's stats/analysis he needs to start on analysis projects. Etc.

My advice is on making small projects that cover topics he'll be working on in the jobs he applies for to build a small portfolio. And brush up on the leetcode like a month before.


Take an interview now and see what questions they ask you so you know how better to prepare in those 3 months. If you know closures and generators you're probably already fine to work it's just passing an interview. Maybe you'll get lucky early on, more than likely it will take a little bit, but you'll "learn as you go."

Some excellent suggestions here.

For learning, exercism.io is amazing: they assign people as mentors to review your code, and I've had really good experiences while learning Rust, with feedback calibrated nicely to my level of expertise.

For how to think about algorithmic interviews, I always recommend this short set of notes: http://courses.csail.mit.edu/iap/interview/materials.php

For fun, try Advent of Code this year and see how far you get, and whether you like it. As @analog31 suggested, this might be a fun thing to do with his son.


I registered at exercism.io as a mentor to help other people. Thank you for sharing!

Grind Leetcode (in Python) and build a small full-stack project with his son. Django is written in Python so they could build a functioning web app with that. I recommend paying for Leetcode Premium - $35 a month - because it'll teach data structures/algorithms and have problems from big high paying companies.

I really like jetbrains academy courses[1]. Their subscription is quite expensive but some courses are free and they have 2 months free trial.

Courses are project based. You are doing some small programing project. You will learn both theoretical and practical knowledge to be able to successfully finish it. Their courses are integrated into jetbrains IDEs or you can use web version.

i.e. See projects from "python core track" https://hyperskill.org/tracks/2/projects

[1] https://www.jetbrains.com/academy/


> ...How should he best use his time?

Making switch to Python is rather a broad goal. It's just a tool, and as any tool it's used for a purpose and often along with other tools.

If he aims at any entry level coding position, then likely it'd be more about entry level, than proficiency. Basically, testing the discipline and analytical thinking (thus all puzzle and algo problems, dreadful leetcode etc).

If he plans to leverage his present skillset and experience, then in that alloted time I'd try to implement some aspects of his present job projects in Python (if such aspects are mappable, of course). General goal is to try and fuse his present experience with the newly acquired knowledge of Python (a known problem and solution, just a new tool).

Again, it does not need to be grand, just some specific aspect, say, parsing args or a configuation file, or grabbing something from a database, or triggering some process based on some config, logging something, wrapping his code for reuse or installation etc. Whatever he is familiar with in his job responsibilities.

The goal is to get used to the new tool, know what it takes for it to become useful at his level of experience.

Eventually, he could (in a stretch, perhaps) claim of trying to apply or evaluate the use of Python in his current job scope. This could count more, than just leetcoding ability, which may still be a barrier to get through, however, depending on the chosen companies.

Good luck to him!


Build a site like hacker news using flask. I say flask instead of Django because it’s more light weight. I would also recommend doing something math heavy like following the stock market (even if you don’t spend actual money) just to learn the ins and outs and what’s slow/etc in python (spoiler: use numpy.)

Those are the two things I did, I came from PHP and until a 2.5 years ago I never touched python but I work with it full time (also react, which I didn’t know at all when I started.)

What you build isn’t all that important, or the language. Most languages can be picked up on the job. But doing some personal projects + a couple leet code or project Euler problems a week will make one a good programmer in 3 months. You want the personal projects to act as a portfolio you can show off to recruiters though.


In addition to finding a cool tutorial site, I have a less exciting recommendation: spend some time reading the reference documentation. This will give him a sense of the scope of the language, the difference between core language and library features, and most of all, a bit of direction for how to help himself find answers as he progresses out of the absolute beginner phase.

The standard docs don't get recommended to beginners very often because they are not designed to be fun/motivating like learning sites, but provided that the student is intrinsically motivated, I think it can be exciting to look at all the modules and start to learn about all the things that people have built and provide for the programmer. Learning to navigate the reference material is an important skill. Some of the sections are confusing, dry, and unhelpful. Others are very worthwhile and knowing where they are is important.

Python in particular has a large standard library, much of which is quite old (good in that it is very mature, not so good in that some of it is barely relevant any more). I've been programming python for a decade and I look at the standard docs every day for something. `stdtypes.html` is kind of a big mess but at some point you have to learn most of what is in there.

If I were hiring a programmer, one of the things I would try to evaluate would be their basic research skills.


I like the Python course on HackerRank.

I did all the problems. I had some Python experience already but I learned a lot. It felt like climbing a mountain but I found it was frictionless and fun the whole way. I printed out the completion certificate I got.

(I did the Java course and some other courses and they were not as good.)

If your friend wants to keep doing work like the work your friend has been doing in Alteryx, your friend should learn Jupyter, Pandas, and scikit-learn.


Climbing a frictionless mountain sounds really difficult. ;0)

There's a contradiction there I grant, but by "frictionless" I mean I didn't fight with the environment at all.

I'd contrast that to the Java course where you learn the strange dialect of "single file Java" where you might write a single main() method or write only static methods. If you need to you can write as many classes in a single file, but only one can be public, unless they are inner methods. You probably don't need public methods.

It's a strange enough world and distant from ordinary Java coding, yet kinda fun and helpful for mastering whiteboard interviews.


Off topic to OP. I already use Python. I would love to learn Go or Rust this way. Do you know if Hackerrank or any other sites like it have similar for Go/Rust?

I know the docs of the language and the primary books are excellent, but I am lacking in the motivation department. If it was hacker rank style stuff with mini challenges, I think I might pull myself together better.


what's the python course? link? I can only find challenges in python..

https://exercism.org/ has been amazing for learning programming languages, I've taken the rust, golang and elixir tracks and they are very good at getting immersion into the language by getting tests pass. Especially the new version that was launched in September is really slick and you no longer have to wait for mentors.

1. Choose three companies now to apply to in three months 2. Research their interview style and focus on that 2.a If they are algo/ds heavy, do algoexpert; leetcode is a hit or miss 2.b If they are programming heavy, no suggestions from me but making apps in Python 2.c Probably not enough time for design but the boar book ( designig data intensive applications by martin kleppmann)

If he's read a few books and knows generators, etc, then I suggest:

"Python Cookbook", which shows you how to do many things (files, networks, servers, binary, data handling). It effectively is a cookbook and helps you have or be aware of several "recipes" to do common things.

To write better Python: Brett Slatkin's "Effective Python: [59|90] Specific Ways to Write Better Python" will get him to write good quality Python code "in general". This could reassure potential employers to some degree.

Having some familiarity or experience with the domain of the organization helps. Python is Python, but there are several subtleties in working writing code that encodes to/decodes from binary packets, or with systems work, or audio processing, etc.

It will depend on whether these companies want someone who "can code", or someone who "can code in Python", or "someone who can code X in Python because that's we're doing X in Python".


Few questions to get started:

  -  __init__ vs __new__
  -  Difference between list and set
  -  Abstract classes use
  -  Generators vs iterators
  -  How yield works
  -  Is python call by ref/val or both. How to implement each
  -  How python list allocates space, how it is implemented
  -  what is cpython, pypy

I'd be surprised if #1, #4, #7, #8 were ever asked in an interview, let alone for someone just learning the language.

Like others wrote here, first thing to do is probably to narrow down the python skills he needs to practice (web ? data science ? ... ).

But as we are about to get in December, if he wants to practice general python skills in a fun way, I'd recommend having a look at the advent of code (https://adventofcode.com/2021).

Solving the problems on your own provides only a fraction of the learning opportunity, though. To capture it all, you need to read others' solutions on the related sub reddit. There are a few people out there documenting their solutions super effectively. Last year, for instance, I learned a lot from https://github.com/mebeim/aoc/tree/master/2020


https://www.youtube.com/c/mCodingWithJamesMurphy for advanced tips and explanations of things taken for granted at a deeper level along with some hard interview puzzles solved and explained.

1) look for python jobs (https://www.indeed.com/q-Python-jobs.html?vjk=91c523abc4708c...) or (https://www.python.org/jobs/)

2) figure out what roles he'd want to apply to

3) figure out what python knowledge / tools he's expected to know

4) find project tutorials that use that knowledge / tools

5) reach out to the companies saying what he's doing and if they have any suggestions


MIT's 6.006 teaches algorithms and some python internals https://ocw.mit.edu/courses/electrical-engineering-and-compu...

Study with your son and you'll both learn it in a jiffy.

If you're just looking to drill problems, I think adventofcode.com is more fun than Leetcode.

What's worked best for me in learning new languages and such is trying to solve small problems I've had or just working on something I'm interested in. I get so burnt out just grinding generic programming problems.

Lots of other great suggestions here.


I did the Udacity courses on full stack web-dev in ~2 months. Really good though I have a CS background so I knew some of the concepts (haven't coded in 20 years though). The very first intro CS course is really well done and all exercises are in python. The rest are not as good but still worth going through.

I don't think there is much of a way to study. They always seem to be really stupid with some off the wall question that has zero to do with the job

Personally I think tech interviews should be talking about the implementation of a solution, even to a stupid question rather than coding


Depends, if you want to work for big tech companies, leetcode will give you the biggest bang for your buck, smaller companies/non tech companies generally favor skills on a certain stack, so learning python django etc... can pay off here.

Check out https://www.youtube.com/c/ArjanCodes he has some indepth quality python tutorials

Depends on the goal... Does he want to work at Google or just some local software shop as a junior engineer?

develop few simple games using [pygame](https://www.pygame.org). It will create a portfolio and will give a chance to explore some of the lesser used python concepts.

Work on a small project and do some practice problems

i'm curious if leetcode or other similar gives you a competency level after you do two or three questions.

like, on a 1-10 scale, you're a 5. or a leetcode-5.

as opposed to, how good are you at python?

oh, well, i can usually do leetcode difficult questions without too much difficulty until they involve floating regressive recusions, in which case i'm a little bit more middle-to difficult completing sort of.

sure you can't measure communication abilities, etc., but you should be able to measure pure mastery of a language, then maybe with an algo addition, etc.


Pramp also offers mock interview challenges



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: