← Back to videos

Mock interview for a Middle Python Developer – Grisha

Mock interview for a mid-level Python developer role.

We discussed:
— what synchronous and asynchronous code are
— the difference between threads and processes
— why the GIL is needed and how it affects code execution in Python
— what a race condition is and why it matters
— how to think about I/O-bound and CPU-bound tasks
— analysis of tricky code and typical logical errors
— detailed feedback following the interview

The result was a lively and, at times, challenging interview that provided a good analysis of the candidate’s strengths, gaps in their knowledge, and what truly distinguishes a junior from a middle-level developer.

This video will be useful for:
— novice Python developers
— those preparing for a technical interview
— anyone who wants to better understand async/await, threads, processes and the GIL
— developers interested in seeing a real interview format

Timecodes

00:00 Start
00:11 Greetings and introduction of participants
01:49 Interview format and rules
03:19 What is synchronous code
04:17 Problems with synchronous code and I/O-bound tasks
07:39 Threads and processes: where it all begins
09:58 How a thread differs from a process
12:49 How to solve the waiting problem
13:19 Working with threads in Python
19:53 Working with processes in Python
23:29 What is the GIL
25:05 What the GIL means in practice
28:22 Is it possible to bypass the GIL
29:33 Threads or processes for I/O-bound tasks
31:49 Why do we need asynchronous code
34:47 How async/await switching works
35:53 When are threads, processes or asynchronous operations preferable
40:09 What is a race condition
41:32 How to deal with race conditions
43:43 When multithreading and asynchronous operations are not needed at all
48:25 Moving on to code review
55:56 Candidate’s self-assessment after the interview
57:42 Detailed feedback from the interviewer

Please share in the comments how you would answer these questions and which part of the interview you would find most challenging.