Module 8 · Capstone · Deep Dive

Interview Mastery

You built the thing. Now turn it into a job. This lesson is less new knowledge and more wisdom: how to tell your story, answer the questions you'll actually get, and apply the UAE way — through people, not just portals.

BasicIntermediateBuild

Why this matters Eight modules ago you were a PHP dev. Now you have DocChat — a deployed, full-stack, RAG-powered document Q&A app. But a portfolio doesn't hire you; a conversation does. The interviewer can't see your code at first — they hear how you think. This lesson rehearses the moments that decide the offer: the project story, the rapid-fire stack questions, the whiteboard, and the very UAE-specific reality that most roles here are won through a referral, not a cold application.
Pair this with the question bank This lesson is the strategy; the drilling lives in the Whole-Stack Interview Question Bank — 8 arenas of toggle-answer Q&A, tricky gotchas, theory, and 2026-latest material across Python, FastAPI, Postgres, RAG, React, Next.js, DevOps, and system design. Drill an arena a day.
In this lesson
  1. The 3-minute project story
  2. Stack Q&A across the curriculum
  3. System-design-lite, out loud
  4. Behavioural & UAE specifics
  5. Live-coding & whiteboard tips
  6. Build: rehearse your story
  7. Check yourself

1 · The 3-minute project story

Almost every interview opens with "tell me about a project." This is the single highest-leverage thing to prepare, because you control it completely. A great answer is tight, has a clear hero moment, and invites follow-up questions you want. Use this four-beat template:

BeatWhat you sayWhy
ProblemThe real pain, in one sentence.Shows you build for users, not for résumés.
Stack & whyWhat you chose and the reason.Proves the choices were deliberate.
The ONE hard thingThe problem you actually wrestled.This is the hero — make it specific.
What's nextOne honest improvement.Signals ownership and self-awareness.

Make the RAG retrieval the hero. It's your differentiator — most junior full-stack candidates have a CRUD app; you have an AI feature you can explain end to end. Here's a worked example for DocChat you can read in about three minutes at a natural pace:

Worked example — DocChat, spoken

Problem. "People sit on PDFs they can't search — contracts, reports, manuals. You know the answer is in there, but Ctrl-F only finds exact words. I wanted to let someone upload a document and just ask it questions in plain English."

Stack & why. "The backend is FastAPI because it's async and gives me typed request/response models and auto docs for free. Postgres for data, and crucially pgvector so I store the document embeddings in the same database — no separate vector store to operate. The frontend is Next.js App Router talking to the API, and it's deployed with Docker behind CI."

The one hard thing. "The interesting part was retrieval quality. My first version embedded whole pages and the answers were vague. The fix was the chunking and retrieval pipeline: I split documents into ~500-token overlapping chunks, embed each, and on a question I embed the query, run a cosine-similarity search in pgvector to pull the top-k chunks, then pass only those to the LLM as context with a strict 'answer only from this context' prompt. Overlap stopped me cutting sentences in half, and top-k + a similarity threshold cut hallucinations because the model stops inventing when it has the right passage in front of it."

What's next. "I'd add a re-ranking step after the vector search and show source citations in the UI so users can verify the answer against the original page."

Notice the hero beat is concrete — it names the failure ("answers were vague"), the diagnosis, and the specific fix. That's what makes an interviewer lean in and ask "how did you pick 500 tokens?" — which is exactly the question you want, because you can answer it.

PHP bridge: you've shipped PHP apps before — the instinct to talk about a real problem you solved transfers directly. The new muscle is making the AI retrieval the centrepiece instead of the database schema.

2 · Stack Q&A across the curriculum

These are the questions a UAE full-stack screen actually asks, grouped by area, with crisp model answers. Say each answer out loud — in an interview, a confident two-sentence answer beats a rambling correct one.

Python

Q: What's the difference between a list and a tuple?
"A list is mutable and ordered — you add and change items. A tuple is immutable, so it's for fixed groups like a coordinate or a database row, and it can be a dict key because it's hashable."

Q: What does *args / **kwargs mean?
"*args collects extra positional arguments into a tuple; **kwargs collects extra keyword arguments into a dict. I use them when a function needs to accept a flexible set of inputs or pass them through to another call."

FastAPI

Q: Why FastAPI over Flask or Django?
"It's async-first, so it handles concurrent I/O like LLM and database calls well, and it uses Pydantic models for typed validation and automatic OpenAPI docs. For an API-centric app like DocChat that's a lot of correctness and tooling for free."

Q: What is dependency injection in FastAPI?
"The Depends() system. I declare a dependency — like a database session or the current authenticated user — as a function, and FastAPI runs it and injects the result into my route. It keeps routes clean and makes things easy to test by swapping the dependency."

SQL & ORM

Q: What's an N+1 query problem?
"When you load a list of records and then fire one extra query per record for a relationship. The fix in SQLAlchemy is eager loading — selectinload or joinedload — so the related rows come back in one or two queries instead of N."

Q: Index or no index — when?
"Index columns you filter or join on frequently, like a foreign key or an email you look users up by. Indexes speed reads but cost write time and space, so I don't index everything — I index the query patterns the app actually has."

Auth

Q: How does JWT auth work?
"On login I verify the password, then sign a token containing the user id and an expiry with a server secret. The client sends it as a Bearer header; on each request I verify the signature and expiry and trust the claims. It's stateless — no session lookup — which is why it scales."

Q: Where do you store the password?
"Never in plain text. I store a salted hash — bcrypt or argon2 — and compare hashes on login. If the database leaks, the passwords are still protected."

React & Next.js

Q: Server Components vs Client Components?
"In the Next.js App Router, components are Server Components by default — they render on the server, can fetch data directly, and ship no JS. I add 'use client' only where I need interactivity like state or event handlers. It keeps the bundle small."

Q: What does useEffect actually do?
"It runs side effects after render — subscriptions, or fetches in a client component. The dependency array controls when it re-runs. The modern advice is to reach for it less: data fetching often belongs in a Server Component instead."

RAG

Q: What is RAG and why use it?
"Retrieval-Augmented Generation. Instead of relying on what the model memorised, I retrieve relevant chunks from my documents and put them in the prompt. It grounds answers in real sources, cuts hallucination, and lets the model answer about private data it was never trained on."

Q: Why chunk documents, and how big?
"Embeddings work best on focused passages, and the LLM context is finite, so I split into ~500-token chunks with overlap. Overlap keeps a sentence from being cut across a boundary. The size is a trade-off: smaller chunks are more precise, bigger ones keep more context — I tune it to the answers I'm getting."

DevOps

Q: Why containerise with Docker?
"It packages the app with its exact dependencies, so it runs the same on my laptop, in CI, and in production. No more 'works on my machine.' For DocChat it also makes spinning up Postgres with pgvector a one-line compose."

Q: What does your CI pipeline do?
"On every push it installs deps, runs the tests and linter, and builds the Docker image. If anything fails the merge is blocked. It means broken code never reaches main, and deploys are boring — which is the goal."

3 · System-design-lite, out loud

You won't get a FAANG-scale design round for a junior role, but you'll often hear "walk me through how you'd build a document Q&A app." They're not testing scale — they're testing whether you can structure your thinking out loud. Use this order so you never freeze:

  1. Clarify, briefly. "Roughly how many users and documents? Is real-time accuracy critical, or is best-effort fine?" One or two questions show maturity; don't interrogate.
  2. Name the components. "A frontend, an API, a database, a vector store, and an LLM provider."
  3. Trace the data flow. Two paths: ingestion — upload → extract text → chunk → embed → store vectors. And query — question → embed → similarity search → top-k chunks → LLM with context → answer.
  4. Call the trade-offs. "I'd keep vectors in Postgres with pgvector to avoid running a second datastore; if scale grew I'd move to a dedicated vector DB. I'd cache embeddings so re-uploads are cheap, and stream the LLM response so the UI feels fast."
The trick that lands it Draw the boxes and arrows as you talk, and narrate the trade-off you're choosing not to do. Saying "I'd start simple with pgvector and only reach for a dedicated vector DB if we outgrew it" shows judgement — you're optimising for the right problem at the right time, which is exactly what a senior wants from a junior.

4 · Behavioural & UAE specifics

The technical bar gets you onto the shortlist; how you come across gets you the offer. And in the UAE, how you get into the room matters more than most online advice admits.

Apply through referrals

The Dubai and Abu Dhabi market runs heavily on referrals and warm intros. A referred CV gets read; a portal application often doesn't. So the channel is people: engineers you meet at a meetup, alumni, recruiters who specialise in tech, and the LinkedIn "Tech in UAE" crowd. Your ask is small and specific — "I built a deployed RAG app, I'm targeting full-stack roles, would you be open to referring me or pointing me to your hiring team?" Make it easy to say yes.

Salary expectations

You'll be asked your expectation early. Do the homework first: ranges differ a lot by company size and whether housing/visa is included, and UAE salaries are typically quoted monthly and tax-free. Give a researched range, not a single number, and anchor it to the role: "Based on what I've seen for full-stack roles at this level in Dubai, I'm looking in the range of X to Y per month, but I'm flexible for the right team." Never bluff a number you can't justify.

Be concise, and be honest

Two habits interviewers reward: brevity and honesty. Answer the question asked, then stop — let them probe. And when you don't know something, the strongest possible move is: "I don't know that one — here's how I'd find out." Then describe your process: check the docs, test it in a REPL, reason from what you do know. That answer beats a confident wrong one every time, because they're hiring someone who'll be unblocked on the job, not someone who already memorised everything.

The honesty test Interviewers plant questions slightly beyond your level on purpose. Bluffing is the fastest way to lose trust — they can tell. "I haven't used that, but my mental model is… and I'd verify by…" turns a gap into evidence that you learn well. That is the skill they're buying.

5 · Live-coding & whiteboard tips

If there's a coding round, it's usually a small, practical problem — not a hard algorithm. They're watching your process, so make it visible:

PHP bridge: the problems are language-light — counting words, transforming a list, parsing a string. You already solved these in PHP; now you do them in Python with a dict and a comprehension. The word-counter from Lesson 1.1 is the exact shape.

6 · Rehearse it for real

Your tangible win Write out your 3-minute DocChat story using the four beats — Problem, Stack & why, the one hard thing (make RAG retrieval the hero), what's next. Then say it out loud, on a timer, three times. Record yourself once. The goal isn't to memorise a script; it's to be so comfortable that you can tell it naturally and handle the follow-ups without freezing.

Reading it silently feels like preparation but isn't — the interview is spoken, so the rep has to be spoken. By the third pass you'll hear the awkward sentence and cut it. That's the difference between "I think I built something" and "let me tell you what I built."

7 · Check yourself

These aren't trivia — they're interview-judgement calls. Pick what a strong candidate actually does.

Recall quiz

In your project story, what should the hero moment be?

An interviewer asks something you don't know. Best move?

In the UAE market, the most reliable way into the room is

During live coding, before you start typing you should

Asked your salary expectation, the strongest answer is

Where to test this for real ⭐ Skills become a job in communities, not in private. Get into the UAE dev world and use it to pressure-test your story and ask for referrals: r/dubai for local job-market reality and salary norms, Dubai developer meetups for in-person networking that turns into intros, and LinkedIn "Tech in UAE" groups to find people who'll refer you. This is the wisdom step: the best interview prep is a real conversation with someone who hires.