Tăng tốc 7 ngày
1 tuần, mỗi ngày một mảng — toàn bộ câu trọng điểm của core stack, kết thúc bằng scenario production và behavioral.
0/204 câu đạt ≥ 3
Dành cho khi còn khoảng 1 tuần. Mỗi ngày ~2–3 giờ: đọc phần trọng điểm của overview, rồi luyện toàn bộ câu essentials của ngày.
- Mục tiêu mỗi ngày: mọi câu trong ngày đạt ≥ 3 (Solid). Thanh tiến độ của ngày dựa trên đúng tiêu chí này.
- Sáng hôm sau, dành 15 phút mở Random với pool Chưa vững (≤2) để ôn lại hôm trước.
- Còn thời gian thì đọc thêm Cơ chế hoạt động của track, nơi có flow diagram.
- JavaScript CoreĐọc: TL;DR · Cheat sheet
- MediumPredict the output order and explain it in terms of the call stack, microtask and macrotask queues.
- EasyWhat is a closure, and give one practical use case in production code?
- EasyCompare
Promise.all,Promise.allSettled,Promise.raceandPromise.any. When do you use each? - MediumThis function is supposed to save all orders in parallel and report failures, but errors are silently lost in production. Find the bugs.
- EasyExplain the four rules that determine
thisin a regular function call, in order of precedence. - HardA long-running Node service's heap grows ~50 MB/hour. The code below is suspected. Explain the leak and fix it.
- HardA CPU-heavy function (e.g. parsing a 50 MB JSON) freezes your UI / API for 2 seconds. Walk through your options.
- Senior probingYou join a team whose codebase mixes callbacks, raw promises, and async/await, with inconsistent error handling. How do you standardize it without a big-bang rewrite?
TypeScriptĐọc: TL;DR · Cheat sheet- EasyTypeScript types are erased at runtime. What are the practical consequences for a backend API?
- MediumModel an API result or UI state with a discriminated union and make the compiler force you to handle every case.
- EasyWhat is the difference between
any,unknownandnever? Which assignments compile? - EasyTypeScript is structurally typed. What does that mean, and when does it bite you?
- MediumCompare
const x: T = ...,const x = ... as T, andconst x = ... satisfies T. When do you usesatisfies? - HardA production crash reads
Cannot read properties of undefined (reading 'price')in code that compiled understrict. How can that happen, and how do you prevent the class of bugs? - HardImplement branded types for
TenantIdandProductId. Where do values get branded, and what does this prevent? - Senior probingDesign how types are shared between a Next.js frontend and a Node/Express API in a monorepo. What is the source of truth?
- EasyName the phases of the Node.js event loop and what runs in each.
- EasyWhat does "blocking the event loop" mean? Give four realistic ways production code does it by accident.
- EasyCompare
process.nextTick,queueMicrotask/Promise.then,setImmediateandsetTimeout(fn, 0). - HardA CSV import endpoint works in staging but the pod gets OOMKilled on a 2 GB file in production. Review the code.
- MediumExplain backpressure in Node streams. What do
write()returningfalse,'drain'andhighWaterMarkmean? - HardDuring every deploy, clients see a burst of 5xx / connection-reset errors. Here's the shutdown code. What's wrong?
- HardIn production, p99 latency spikes to 2 seconds every few minutes while average CPU looks fine. How do you find the cause?
- Medium
worker_threadsvsclustervschild_process: when do you use each? - MediumWhat uses the libuv thread pool, what doesn't, and how do you size it with
UV_THREADPOOL_SIZE? - Senior probingDesign how an API service should handle CPU-heavy work like generating PDFs or resizing images on demand.