Threading vs Multiprocessing in Python
Understand the Python GIL and pick the right concurrency tool: when threads help with I/O, when processes help with CPU, and how to use concurrent.futures.
442 posts · page 8 of 10
Understand the Python GIL and pick the right concurrency tool: when threads help with I/O, when processes help with CPU, and how to use concurrent.futures.
Learn how TanStack Query replaces useEffect-based data fetching with caching, background refetching, and request deduplication that scales to real apps.
Learn React Router's modern data APIs. Install, create a browser router, define routes, navigate with Link and useNavigate, and use loaders and actions for data.
A clear, practical explanation of React Server Components: the runtime model, the boundary between server and client, data fetching, and the tradeoffs.
Use React.lazy and Suspense to code-split a React app, design fallback UI, place boundaries thoughtfully, and understand how Suspense extends to data fetching.
A practical guide to React's useMemo and useCallback hooks, covering referential equality, when memoization helps performance, when it backfires, and how to profile first.
Understand React's useReducer hook, its signature, action shape, when to migrate from useState, and how to build a small state machine pattern for predictable UI logic.
Skip the reducer boilerplate. Zustand gives React apps a tiny global store with hooks, selectors, and middleware in fewer than 100 lines of API.
A practical tour of Cargo — creating projects, managing dependencies and features, running tests, building release binaries, and using workspaces.
A hands-on tour of Rust's core collections — Vec, HashMap, and HashSet — with common operations, iteration patterns, and ownership gotchas.
A practical guide to error handling in Rust covering Result, the ? operator, unwrap and expect, custom error types, and the thiserror and anyhow crates.
Learn how to model domain data in Rust with structs and enums, use pattern matching exhaustively, and lean on Option and Result for safety.
Understand how Rust traits define shared behavior, with default methods, trait bounds, derive, and a clear take on dyn Trait versus impl Trait.
Learn how to read Postgres EXPLAIN and EXPLAIN ANALYZE output, spot expensive operations, and apply practical indexing and rewrite techniques to speed up queries.
A practical guide to database normalization with real customer and order examples. Covers 1NF, 2NF, 3NF, when to denormalize, and tradeoffs.
Learn SQL window functions with practical examples. Covers ROW_NUMBER, RANK, DENSE_RANK, LAG, LEAD, running totals, and the OVER clause in depth.
Set up dark mode in Tailwind with the class strategy, persist the choice in localStorage, and avoid the flash of wrong theme on first paint.
Design a distributed in-memory cache like Redis or Memcached. Covers consistent hashing, replication, eviction, persistence, and surviving node failures cleanly.
Design a layer 4 and layer 7 load balancer. Covers algorithms, health checks, sticky sessions, TLS termination, and surviving traffic spikes without dropping connections.
Design a durable message queue like Kafka or Pulsar. Covers partitions, replication, consumer groups, ordering guarantees, and exactly-once semantics in practice.
Design a URL shortener like TinyURL or Bit.ly. Covers ID generation, storage, read-heavy scaling, caching, analytics, and tradeoffs you should defend in an interview.
A practical introduction to PWAs: manifests, service workers, offline caching, install prompts, and when a PWA is the right choice versus a native app.
A practical guide to the WCAG fundamentals: semantic HTML, keyboard support, contrast, focus management, and ARIA used responsibly.
What Largest Contentful Paint, Interaction to Next Paint, and Cumulative Layout Shift measure, how to read them, and the practical fixes that move each one.
A practical look at integration testing alongside unit tests, covering fixtures, real databases in tests, and the right balance with examples in pytest and vitest.
Add nominal typing to TypeScript using branded types so you cannot accidentally mix UserId, OrderId, raw strings, or money values.
Understand TypeScript's modern standard decorators: how they differ from the legacy proposal, the context API, and practical class and method examples.
A practical guide to Astro content collections — defining a zod schema in src/content/config.ts, using the glob loader, fetching entries with getCollection, and building a dynamic [...slug].astro route.
A practical guide to production deploys with GitHub Actions — environments, secrets, OIDC, deploy-on-tag vs deploy-on-main, and pushing images to AWS, Vercel, or Fly.
A practical tour of Django's ORM — defining models, common field types, makemigrations and migrate, QuerySet filtering, foreign keys, and simple aggregations.
Wire Django models to web pages — function-based views, render(), URL routing with path(), template tags like {% for %} and {% if %}, and template inheritance with {% extends %}.
How to feed configuration into Docker containers without baking it into the image — ENV vs ARG, --env-file, Compose env, BuildKit secret mounts, and Docker Swarm secrets, with safe defaults.
What an embedding is, why cosine similarity works, how dimensionality and chunking choices affect retrieval, and a tiny numpy example you can run in your head.
Why a normal database struggles with vector search, how ANN indexes like HNSW and IVF work, and a clear comparison of pgvector, Qdrant, Pinecone, Chroma, and Weaviate so you can pick one.
A practical guide to async path operations and Depends() in FastAPI — when async actually helps, per-request DB sessions, auth dependencies, and how sub-dependencies compose.
A practical guide to FastAPI with SQLAlchemy 2.0 — typed models with Mapped and mapped_column, sessionmaker, get_db dependency, CRUD endpoints, and where Alembic fits.
A practical guide to FastAPI routing and Pydantic v2 — path operations, path/query/body parameters, model validation, response_model, and response_model_exclude_unset.
A deeper look at git rebase — the mechanics, interactive rebase with squash/fixup/edit/drop, the golden rule of published branches, conflict resolution, and rerere for repeated conflicts.
The everyday array patterns every DSA learner should know — traversal, linear search, insertion, deletion, reversal, rotation, prefix sums, Kadane's preview, and the one-pass habit.
Ten classic array interview problems with examples, approach, complexity, and clean Python solutions — Two Sum, Best Time to Buy/Sell Stock, Kadane's, Rotate Array, Product Except Self, and more.
A practical guide to the four canonical binary tree traversals — recursive and iterative versions, when to use each, and the patterns that make them click.
Eight classic binary tree interview problems with examples, approach notes, and clean Python solutions — max depth, same tree, invert, symmetric, path sum, LCA, validate BST, and serialize/deserialize.
Six classic bit manipulation problems — Single Number, Number of 1 Bits, Power of Two, Counting Bits, Missing Number, Reverse Bits — plus the tricks that make them tick: n & (n-1), n & -n, and XOR cancellation.
Eight classic dynamic programming problems — Climbing Stairs, House Robber, Coin Change, LIS, Word Break, 0/1 Knapsack, Edit Distance, and LCS — each with Python solutions and DP tables.
An introduction to dynamic programming — overlapping subproblems, optimal substructure, top-down memoization, and bottom-up tabulation, with worked examples in Python.
A practical guide to BFS and DFS on graphs — recursive and iterative DFS, BFS with a deque, shortest paths on unweighted graphs, connected components, cycle detection, and five classic practice problems.
An introduction to greedy algorithms — when the locally best choice gives a globally optimal answer, when it doesn't, the exchange argument, and six classic problems.
How hash functions, hash maps, and hash sets work — the intuition behind buckets and collisions, chaining vs open addressing, average and worst-case complexity, and the Python containers built on them.