Interview practice

Python Backend Developer

0–2 years · Junior — Python · Django / Flask / FastAPI · REST APIs · SQL · Celery · Testing

0–2 years 2–5 years 5–8 years 8+ years
technical Debugging 1 of 6
An error occurs intermittently in a production Flask application, but you can't reproduce it in development. What steps do you take to troubleshoot it?
What a strong answer covers

Enables detailed logging to gather more information; reviews error logs for stack traces and context; checks for race conditions in the code; considers environmental differences between production and development; uses monitoring tools to observe application behaviour in production.

The follow-up you would get

What if the logs don't reveal much? What would you try next?

Could you have answered that?
scenario API authentication issues 2 of 6
Users are reporting authentication failures on your REST API, but everything appears to be functioning correctly. How do you respond in the first 15 minutes?
What a strong answer covers

Confirms the authentication method being used by clients; checks the server logs for authentication errors; verifies the validity of API tokens or credentials; considers potential recent changes to the authentication logic; communicates with affected users for further details.

The follow-up you would get

If you discover that the issue is on the client side, how do you communicate this to the users?

Could you have answered that?
technical ORM Performance 3 of 6
You notice that a Django application is experiencing slow performance when loading a user profile page that requires multiple related database queries. What do you do first?
What a strong answer covers

Uses Django's query logging to identify N+1 query issues; checks the ORM relationships to ensure they are being optimised; considers using select_related or prefetch_related; examines the database schema for missing indexes.

The follow-up you would get

You decide to use select_related. What does that do?

Could you have answered that?
technical Database Optimisation 4 of 6
You have a SQL query that performs well on a small dataset but becomes slow with a larger dataset. What techniques do you employ to improve its performance?
What a strong answer covers

Reviews the query execution plan for inefficiencies; checks for proper indexing of columns used in WHERE clauses; considers using query hints; evaluates whether the query can be rewritten for efficiency; tests the impact of database partitioning if applicable.

The follow-up you would get

If indexing doesn’t help, what could be another issue?

Could you have answered that?
scenario API versioning 5 of 6
You are tasked with updating a REST API to support a new feature, but it breaks existing client integrations. How do you address this issue in the first 15 minutes?
What a strong answer covers

Identifies the breaking changes and assesses the impact on clients; considers creating a new version of the API; communicates the changes to stakeholders; evaluates options for backward compatibility; suggests a deprecation plan for old versions.

The follow-up you would get

What would you include in the deprecation plan to ensure clients migrate smoothly?

Could you have answered that?
ownership A failure in deployment 6 of 6
Describe a time when a deployment you managed went wrong. What was the impact?
What a strong answer covers

Identifies specific deployment steps taken; explains the resulting issues and their impact on users; clarifies how they communicated the problem; discusses what corrective actions were taken; reflects on lessons learned for future deployments.

The follow-up you would get

What could you have done differently to prevent it?

Could you have answered that?
That is this set.

Load six more — you will get questions you have not seen first.

Give me six more →

Say your answer out loud before revealing. Reading the answer first feels like learning and is not.