Skip to content

Road to SeniorNotes & patterns for the senior SWE interview

System design, technical patterns, and behavioral prep — one place to think like a senior.

Browse all notes

behavioral

A Failure or Mistake

Demonstrate genuine accountability, self-awareness, and the kind of learning that prevents recurrence.

#behavioral#ownership
tech-concepts

Access & Refresh Tokens

Why two tokens, lifetime trade-offs, refresh rotation with reuse detection, and the XSS vs CSRF browser storage dilemma.

#concept#auth#tokens
tech-concepts

Access & Refresh Tokens

Vì sao dùng hai token, đánh đổi về thời gian sống, refresh rotation kèm reuse detection, và thế lưỡng nan XSS so với CSRF khi lưu token trong trình duyệt.

#concept#auth#tokens
tools

Backend & Web

Frameworks, routers, code-gen, and DI tools for building services.

#tools#backend
problem-solving

Backtracking

Systematically explore all candidates and prune invalid branches early.

#dsa#recursion#backtracking
behavioral

Bài toán kỹ thuật khó nhất

Thể hiện chiều sâu kỹ thuật, khả năng giải quyết vấn đề bài bản khi mọi thứ còn mơ hồ, sự kiên trì, và tác động đo lường được.

#behavioral#technical
behavioral

Bất đồng quan điểm với quản lý

Cho thấy khả năng phản biện một cách tôn trọng, dựa trên dữ liệu, cùng tinh thần "bất đồng nhưng vẫn cam kết".

#behavioral#communication
tech-concepts

Bên trong Slice & Map

Cách slice header, append và cơ chế nội bộ của map hoạt động — aliasing, rò rỉ bộ nhớ và các cạm bẫy về concurrency.

#concept#golang#language
problem-solving

Big-O Primer

Just enough complexity analysis to reason about trade-offs in interviews.

#interview#complexity#big-o
problem-solving

Binary Search

Define what you're searching for — the validation function is the most important thing.

#dsa#binary-search
problem-solving

Bit Manipulation

Core bitwise ops — XOR cancellation, lowest-set-bit tricks, masks, and bitmask enumeration.

#dsa#bit-manipulation
tech-concepts

Các Concurrency Pattern

Worker pool, fan-out/fan-in, pipeline, và errgroup — khi nào dùng cái nào và làm sao tránh leak.

#concept#golang#concurrency#patterns
tech-concepts

Các khái niệm kỹ thuật

Kiến thức về backend và hệ thống, trình bày dưới dạng hỏi đáp phỏng vấn.

#concept#overview
tech-concepts

Các sync Primitive

Mutex, RWMutex, WaitGroup, Once, Pool — cách dùng đúng và những lỗi kinh điển.

#concept#golang#concurrency
tech-concepts

Cache Invalidation & Eviction

How and when cached data is removed or refreshed.

#concept#caching#performance
tech-concepts

Cache Invalidation & Eviction

Dữ liệu trong cache được xóa hoặc làm mới như thế nào và khi nào.

#concept#caching#performance
tech-concepts

Cache Strategies

How applications read and write data relative to a cache.

#concept#caching#performance
tech-concepts

CAP Theorem

Consistency, Availability, and Partition tolerance trade-offs in distributed systems.

#concept#consistency#distributed-systems
tech-concepts

CAP Theorem

Các đánh đổi giữa Consistency, Availability và Partition tolerance trong hệ phân tán.

#concept#consistency#distributed-systems
tech-concepts

Change Data Capture (CDC)

Stream row-level database changes by tailing the transaction log rather than polling tables.

#concept#concurrency#reliability
tech-concepts

Change Data Capture (CDC)

Stream các thay đổi ở mức dòng của database bằng cách bám theo transaction log thay vì polling bảng.

#concept#concurrency#reliability
tech-concepts

Channel & select

Channel unbuffered so với buffered, ngữ nghĩa của close, select, và các cạm bẫy deadlock.

#concept#golang#concurrency
tech-concepts

Channel so với Mutex

Khi nào dùng channel để giao tiếp và khi nào dùng mutex để bảo vệ shared state.

#concept#golang#concurrency
tech-concepts

Channels & select

Unbuffered vs buffered channels, close semantics, select, and deadlock pitfalls.

#concept#golang#concurrency
tech-concepts

Channels vs Mutexes

When to use channels for communication and when to use mutexes for shared state protection.

#concept#golang#concurrency
tech-concepts

Chiến lược Cache

Ứng dụng đọc và ghi dữ liệu như thế nào trong tương quan với cache.

#concept#caching#performance
behavioral

Cố vấn (Mentoring) cho Ai đó

Cho thấy bạn biết phát triển người khác bằng cách điều chỉnh phương pháp cho phù hợp, kiên nhẫn, và nhân rộng ảnh hưởng của mình qua những người bạn dìu dắt.

#behavioral#leadership
tech-concepts

Cohesion & Coupling

The two underlying metrics that SOLID, DRY, and every modularity principle ultimately serve — and why you can't (and shouldn't) drive both to zero.

#concept#oop#design
tech-concepts

Cohesion & Coupling

Hai thước đo nền tảng mà SOLID, DRY và mọi nguyên tắc về modularity rốt cuộc đều phục vụ — và vì sao bạn không thể (và không nên) kéo cả hai về không.

#concept#oop#design
problem-solving

Communication & Whiteboard

How to talk through a problem and present code under observation.

#interview#communication
tech-concepts

Composition over Inheritance

Why composition is the default for sharing behaviour, when inheritance is still right, and how LSP is the litmus test between them.

#concept#oop#design
tech-concepts

Composition over Inheritance

Vì sao composition là lựa chọn mặc định để chia sẻ hành vi, khi nào inheritance vẫn đúng, và LSP là phép thử phân định giữa hai bên như thế nào.

#concept#oop#design
tech-concepts

Concurrency Patterns

Worker pools, fan-out/fan-in, pipelines, and errgroup — when to use each and how to avoid leaks.

#concept#golang#concurrency#patterns
behavioral

Conflict with a Teammate

Demonstrate mature conflict resolution — empathy, communication, and putting the shared goal over ego.

#behavioral#collaboration
tech-concepts

context.Context

Propagating cancellation, deadlines, and request-scoped values across goroutine boundaries.

#concept#golang#concurrency
tech-concepts

context.Context

Lan truyền cancellation, deadline và các giá trị theo phạm vi request qua ranh giới goroutine.

#concept#golang#concurrency
behavioral

Dẫn dắt một dự án

Cho thấy tinh thần làm chủ, khả năng thúc đẩy kết quả, điều phối con người và tháo gỡ vướng mắc — lãnh đạo mà không cần quyền hạn chính thức.

#behavioral#leadership
tools

Data & Storage

Databases, queues, caches, and object stores I rely on.

#tools#data
tech-concepts

Data Race & Memory Model

Data race là gì, vì sao chúng gây ra undefined behavior, race detector, và happens-before.

#concept#golang#concurrency
tech-concepts

Data Races & the Memory Model

What data races are, why they cause undefined behavior, the race detector, and happens-before.

#concept#golang#concurrency
tech-concepts

Database Indexing

How indexes speed up queries, their internal structures, and when they hurt more than they help.

#concept#database#indexing
tech-concepts

Database Indexing

Index tăng tốc query như thế nào, cấu trúc bên trong của chúng ra sao, và khi nào chúng gây hại nhiều hơn lợi.

#concept#database#indexing
behavioral

Deadline Gấp / Ưu tiên Chồng chéo

Cho thấy bạn biết ưu tiên dứt khoát, đưa ra những đánh đổi rõ ràng, và giao tiếp mạch lạc dưới áp lực.

#behavioral#execution
tech-concepts

defer, panic, recover

Precise semantics of defer (LIFO, argument evaluation timing), panic propagation, and recover boundaries.

#concept#golang#language
tech-concepts

defer, panic, recover

Ngữ nghĩa chính xác của defer (LIFO, thời điểm đánh giá đối số), sự lan truyền của panic, và ranh giới của recover.

#concept#golang#language
tech-concepts

Delivery Semantics

At-most-once, at-least-once, and exactly-once guarantees in messaging systems.

#concept#messaging#reliability
tech-concepts

Delivery Semantics

Các bảo đảm at-most-once, at-least-once và exactly-once trong hệ thống messaging.

#concept#messaging#reliability
tech-concepts

Design Patterns

The handful of patterns that actually show up in day-to-day backend code — what each solves, when to reach for it, and when not to.

#concept#oop#design#patterns
tech-concepts

Design Patterns

Nhóm ít ỏi các pattern thực sự xuất hiện trong code backend hằng ngày — mỗi cái giải quyết vấn đề gì, khi nào nên với tới, và khi nào thì không.

#concept#oop#design#patterns
tools

DevOps Stack & Flow

My current GitOps delivery pipeline — GitHub Actions, ECR, ArgoCD, EKS, and Terraform.

#tools#infra#devops#gitops
problem-solving

Difference Array

Apply range updates in O(1); reconstruct via prefix sum.

#dsa#bonus#difference-array
behavioral

Disagreed with Your Manager

Show respectful, data-backed pushback and the ability to disagree and commit.

#behavioral#communication
problem-solving

Divide and Conquer

Split the problem in half, solve each half recursively, then merge.

#dsa#recursion#divide-and-conquer
problem-solving

DSA Roadmap

My ordered path through data structures & algorithms for interviews.

#dsa#roadmap
behavioral

Đưa ra hoặc Tiếp nhận Phản hồi Khó khăn

Thể hiện sự thẳng thắn nhưng vẫn đồng cảm khi đưa ra phản hồi, và giữ thái độ cầu thị cùng hành động tiếp nối khi tiếp nhận phản hồi.

#behavioral#communication
problem-solving

Dynamic Programming

Cache overlapping sub-problems identified by their recurrence relation.

#dsa#recursion#dp
tech-concepts

Error Handling

Go errors-as-values idioms — wrapping, sentinel vs typed vs opaque, errors.Is/As, and panic boundaries.

#concept#golang#language
tech-concepts

Eventual Consistency

How distributed replicas converge and what guarantees weaker-than-strong consistency provides.

#concept#consistency#distributed-systems
tech-concepts

Eventual Consistency

Các replica phân tán hội tụ như thế nào và mức nhất quán yếu-hơn-strong cho bạn những bảo đảm gì.

#concept#consistency#distributed-systems
behavioral

Gây ảnh hưởng khi không có quyền hạn

Cho thấy khả năng tạo đồng thuận và thúc đẩy sự áp dụng từ những người và những đội mà bạn không quản lý — bằng dữ liệu, quan hệ và mục tiêu chung.

#behavioral#leadership
tech-concepts

GC & Escape Analysis

How Go's concurrent tri-color GC works, what controls it, and how the compiler decides stack vs heap.

#concept#golang#runtime
tech-concepts

GC & Escape Analysis

Concurrent tri-color GC của Go hoạt động thế nào, điều gì điều khiển nó, và compiler quyết định stack hay heap ra sao.

#concept#golang#runtime
tech-concepts

Generics

Go generics — type parameters, constraints, GC-shape stenciling, and when to use vs interfaces vs concrete types.

#concept#golang#language
tech-concepts

Generics

Generics trong Go — type parameter, constraint, GC-shape stenciling, và khi nào dùng generics thay vì interface hay kiểu cụ thể.

#concept#golang#language
behavioral

Giving or Receiving Difficult Feedback

Demonstrate directness paired with empathy when giving feedback, and non-defensiveness with follow-through when receiving it.

#behavioral#communication
tools

Go vs Java vs Rust (Interview)

How the three compare, and which to reach for in a coding interview — and why.

#tools#comparison#languages
tech-concepts

Goroutine & Scheduler

Cách Go lập lịch goroutine, mô hình G-M-P, và những chi phí bạn phải trả.

#concept#golang#concurrency
tech-concepts

Goroutine Leak

Goroutine leak là gì, cách phát hiện, và các pattern để ngăn chặn.

#concept#golang#concurrency
tech-concepts

Goroutine Leaks

What goroutine leaks are, how to detect them, and patterns to prevent them.

#concept#golang#concurrency
tech-concepts

Goroutines & the Scheduler

How Go schedules goroutines, the G-M-P model, and the costs you pay.

#concept#golang#concurrency
problem-solving

Graphs

Generalised trees with cycles — DFS, BFS, adjacency list, visited set.

#dsa#graph
problem-solving

Greedy

Greedy algorithm pattern — exchange argument, sort-then-scan, and when to fall back to DP.

#dsa#greedy
behavioral

Hardest Technical Problem

Show technical depth, structured problem-solving under ambiguity, persistence, and measurable impact.

#behavioral#technical
problem-solving

Hashmap

The universal supporting data structure — frequency, memoization, O(1) access.

#dsa#hashmap
problem-solving

Heap & Stack

Top is the most important thing — find the logic with respect to the top element.

#dsa#heap#stack
notes

How I use this site

Conventions for adding notes and keeping the card grid useful.

#meta
tech-concepts

Idempotency Keys

Make unsafe operations safe to retry with client-supplied keys.

#concept#reliability#api
tech-concepts

Idempotency Keys

Làm cho các thao tác không an toàn trở nên an toàn để retry nhờ key do client cung cấp.

#concept#reliability#api
behavioral

Influencing Without Authority

Show you can drive alignment and adoption across people and teams you don't manage — through data, relationships, and shared goals.

#behavioral#leadership
tools

Infra & DevOps

Container, orchestration, IaC, and CI/CD tools I use to ship.

#tools#infra
tech-concepts

Interface & cái bẫy nil-interface

Interface của Go hoạt động ra sao dưới lớp vỏ, bug nil-interface kinh điển, và các nguyên tắc thiết kế.

#concept#golang#language
tech-concepts

Interfaces & the nil-interface gotcha

How Go interfaces work under the hood, the classic nil-interface bug, and design principles.

#concept#golang#language
problem-solving

Intervals

Interval merging, sweep-line for peak overlap, and scheduling patterns.

#dsa#intervals
problem-solving

Interview Process (UMPIRE)

A 6-step framework so you never freeze on a new coding problem.

#interview#process#umpire
tech-concepts

JSON Web Tokens (JWT)

Structure, signing vs encryption, validation steps, revocation problem, and the attacks that break JWT implementations.

#concept#auth#jwt
tech-concepts

JSON Web Tokens (JWT)

Cấu trúc, ký (signing) so với mã hóa (encryption), các bước validation, bài toán thu hồi token, và những kiểu tấn công phá vỡ triển khai JWT.

#concept#auth#jwt
tools

Kafka vs RabbitMQ

How the two dominant messaging systems compare, and when to choose each.

#tools#comparison#messaging
behavioral

Làm chủ một vấn đề mơ hồ

Thể hiện sự chủ động, khả năng định hình một vấn đề mơ hồ, và tinh thần làm chủ vượt ra ngoài phạm vi được giao.

#behavioral#ownership
tools

Languages

Programming and data-definition languages in my daily workflow.

#tools#languages
behavioral

Led a Project

Demonstrate ownership, driving outcomes, coordinating people, and removing blockers — leadership without formal authority.

#behavioral#leadership
problem-solving

Linked List

Core linked-list patterns — dummy head, fast/slow pointers, in-place reversal, and merging.

#dsa#linked-list
behavioral

Mentoring Someone

Show you can develop others by tailoring your approach, staying patient, and multiplying your impact through the people you grow.

#behavioral#leadership
tech-concepts

Message Queue vs Stream

Queue và stream dựa trên log khác nhau ra sao về ngữ nghĩa và tình huống sử dụng.

#concept#messaging
tech-concepts

Message Queues vs Streams

How queues and log-based streams differ in semantics and use cases.

#concept#messaging
behavioral

Một thất bại hoặc sai lầm

Thể hiện tinh thần dám nhận trách nhiệm, khả năng tự nhìn lại mình, và kiểu học hỏi khiến sai lầm không lặp lại.

#behavioral#ownership
system-design

News Feed

Design a social home timeline that fans out posts to followers' feeds with sub-200ms read latency at billions-of-reads scale.

#fan-out#feed#caching#scaling
tech-concepts

Normalization

Normal forms that eliminate redundancy and update anomalies, and when to deliberately break the rules.

#concept#database#schema
tech-concepts

Normalization

Các normal form giúp loại bỏ dư thừa và update anomaly, và khi nào nên cố tình phá luật.

#concept#database#schema
tech-concepts

OAuth 2.0

Delegated authorization framework — grant flows, PKCE, roles, and the pitfalls that lead to token theft.

#concept#auth#oauth
tech-concepts

OAuth 2.0

Framework ủy quyền truy cập (delegated authorization) — các grant flow, PKCE, các vai trò, và những cạm bẫy dẫn tới đánh cắp token.

#concept#auth#oauth
tools

Observability

Metrics, logs, traces, and profiling tools to understand running systems.

#tools#observability
tech-concepts

OpenID Connect (OIDC)

Authentication layer on top of OAuth 2.0 — id_token vs access_token, JWKS validation, and the confused-deputy attack.

#concept#auth#oidc
tech-concepts

OpenID Connect (OIDC)

Lớp xác thực đặt trên OAuth 2.0 — id_token so với access_token, validation qua JWKS, và kiểu tấn công confused-deputy.

#concept#auth#oidc
behavioral

Owned an Ambiguous Problem

Show bias for action, the ability to structure ambiguity, and ownership beyond your assigned lane.

#behavioral#ownership
system-design

Payment System

Design a financial-grade payment system that processes charges, refunds, and payouts with zero double-charges and a complete audit ledger.

#payments#consistency#reliability
tools

PostgreSQL vs MySQL

How the two dominant open-source relational databases compare, and when to choose each.

#tools#comparison#database
problem-solving

Prefix Sum

Pre-compute cumulative sums to answer range queries in O(1).

#dsa#hashmap#prefix-sum
behavioral

Production Incident / Outage

Demonstrate calm under pressure, mitigation-first thinking, clear communication, and blameless follow-through.

#behavioral#ownership
system-design

Rate Limiter

Token-bucket rate limiting at the API gateway, and where it breaks.

#scaling#api
system-design

Realtime Chat

Design a realtime messaging system supporting 1:1 and group chat with sub-200ms delivery, presence, and offline push at hundreds-of-millions-of-users scale.

#realtime#websockets#messaging#scaling
tools

REST vs gRPC vs GraphQL

How the three API paradigms compare, and when to reach for each.

#tools#comparison#api
tech-concepts

Saga Pattern

Coordinate multi-service business transactions using local transactions and compensating actions.

#concept#concurrency#distributed-transactions
tech-concepts

Saga Pattern

Điều phối các business transaction đa service bằng local transaction và compensating action.

#concept#concurrency#distributed-transactions
tech-concepts

Sharding & Replication

Two complementary scaling strategies — replication duplicates data for availability, sharding partitions it for capacity.

#concept#database#scaling
tech-concepts

Sharding & Replication

Hai chiến lược scaling bổ trợ cho nhau — replication nhân bản dữ liệu để có tính sẵn sàng, sharding phân mảnh dữ liệu để có dung lượng.

#concept#database#scaling
tech-concepts

Slices & Maps Internals

How slice headers, append, and map internals work — aliasing, memory leaks, and concurrency pitfalls.

#concept#golang#language
problem-solving

Sliding Window

Maintain a variable-length window that grows and shrinks to satisfy a condition.

#dsa#two-pointers#sliding-window
tech-concepts

SOLID & OOP

How SOLID's five principles form a system — not a checklist — for high cohesion, low coupling, and changeable OO code.

#concept#oop#design
tech-concepts

SOLID & OOP

Năm nguyên tắc SOLID hợp thành một hệ thống chặt chẽ — không phải một checklist — để đạt cohesion cao, coupling thấp và code OO dễ thay đổi.

#concept#oop#design
tech-concepts

SQL vs NoSQL

When to reach for a relational database vs. a NoSQL store, and the real trade-offs between them.

#concept#database#modeling
tech-concepts

SQL vs NoSQL

Khi nào nên chọn một relational database thay vì một kho NoSQL, và những đánh đổi thực sự giữa chúng.

#concept#database#modeling
behavioral

STAR-L Method

Structure behavioral answers as Situation, Task, Action, Result, Learned — the five-beat framework that signals seniority.

#behavioral#communication
behavioral

STAR-L Method

Structure behavioral answers as Situation, Task, Action, Result, Learned — the five-beat framework that signals seniority.

#behavioral#communication
problem-solving

Strings

Frequency maps, sliding windows on strings, and common character tricks.

#dsa#strings
problem-solving

Study Plan

Time-boxed roadmaps and a curated must-do problem set for interview prep.

#interview#study-plan
behavioral

Sự cố / Gián đoạn trên Production

Thể hiện sự bình tĩnh dưới áp lực, tư duy ưu tiên khắc phục trước, giao tiếp rõ ràng, và khâu xử lý hậu sự cố không đổ lỗi.

#behavioral#ownership
behavioral

Sử dụng AI trong Kỹ thuật

Cách bạn dùng AI như một người phản biện thiết kế và để kiểm thử áp lực — chứ không chỉ là công cụ sinh code. Những ý trả lời ở tầm senior về các chế độ hư hỏng, bug âm thầm, và second-order effects.

#behavioral#ai
tech-concepts

sync Primitives

Mutex, RWMutex, WaitGroup, Once, Pool — correct usage and classic mistakes.

#concept#golang#concurrency
tech-concepts

Technical Concepts

Backend & systems knowledge in interview Q&A form.

#concept#overview
tools

Testing

Test frameworks, linters, load tools, and mocking libraries.

#tools#testing
behavioral

Tight Deadline / Competing Priorities

Show you can prioritize ruthlessly, make explicit trade-offs, and communicate clearly under pressure.

#behavioral#execution
problem-solving

Topological Sort & Shortest Paths

Kahn's algorithm for ordering DAGs; Dijkstra for weighted shortest paths.

#dsa#bonus#graph
tech-concepts

Transactional Outbox

Reliably publish events by writing them in the same DB transaction as the business change.

#concept#concurrency#reliability
tech-concepts

Transactional Outbox

Publish event một cách tin cậy bằng cách ghi chúng trong cùng DB transaction với thay đổi nghiệp vụ.

#concept#concurrency#reliability
tech-concepts

Transactions & Isolation Levels

ACID guarantees, read phenomena, the four isolation levels, and how MVCC makes them practical.

#concept#database#transactions
tech-concepts

Transactions & Isolation Levels

Các đảm bảo của ACID, những hiện tượng đọc, bốn isolation level, và cách MVCC biến chúng thành khả thi trong thực tế.

#concept#database#transactions
problem-solving

Trees & Recursion

The gateway to the recursion family — base cases, recurrence relations, DFS & BFS.

#dsa#recursion#tree
problem-solving

Trie

Prefix tree for fast word and prefix lookup.

#dsa#bonus#trie
problem-solving

Two Pointers

The main technique for sub-array conditions — slow/fast or opposite-ends pointers.

#dsa#two-pointers
tech-concepts

Two-Phase Commit (2PC)

A distributed protocol that guarantees atomic commit or abort across multiple participants.

#concept#concurrency#distributed-transactions
tech-concepts

Two-Phase Commit (2PC)

Một distributed protocol đảm bảo commit hoặc abort atomic trên nhiều participant.

#concept#concurrency#distributed-transactions
problem-solving

Union-Find (DSU)

Disjoint Set Union with path compression and union by rank for near-O(1) connectivity.

#dsa#bonus#union-find
system-design

URL Shortener

Design a read-heavy URL shortening service with analytics and sub-50ms redirect latency.

#read-heavy#hashing#caching
behavioral

Using AI in Engineering

How you use AI as a design reviewer and stress-tester — not just a code generator. Senior-grade talking points on failure modes, silent bugs, and second-order effects.

#behavioral#ai
system-design

Video Streaming

Design a VOD platform that ingests creator uploads, transcodes them into adaptive bitrate renditions, and delivers segments globally with sub-second start times at petabyte scale.

#streaming#cdn#media#scaling
tech-concepts

Xử lý lỗi (Error Handling)

Các idiom errors-as-values của Go — wrapping, sentinel vs typed vs opaque, errors.Is/As, và ranh giới panic.

#concept#golang#language
behavioral

Xung đột với đồng nghiệp

Thể hiện cách xử lý xung đột chín chắn — sự đồng cảm, khả năng giao tiếp, và đặt mục tiêu chung lên trên cái tôi.

#behavioral#collaboration