String Pattern Matching: Naive, KMP, and Rabin-Karp
A practical tour of substring search — the naive O(n·m) scan, the KMP algorithm with its LPS array, and the Rabin-Karp rolling hash. Worked examples, code, and intuition for when to use each.
1745 posts · page 34 of 37
A practical tour of substring search — the naive O(n·m) scan, the KMP algorithm with its LPS array, and the Rabin-Karp rolling hash. Worked examples, code, and intuition for when to use each.
Eight classic string problems with worked Python solutions — Valid Anagram, Group Anagrams, Longest Substring Without Repeating Characters, Longest Palindromic Substring, and more.
A practical guide to the two pointers technique — opposite-end and same-direction patterns, when to use each, and six classic interview problems with worked solutions.
A beginner-friendly introduction to data structures and algorithms — what they are, why they matter for interviews and real performance, and how to actually start learning DSA.
A practical guide to GraphQL schemas — SDL, scalar types, Query and Mutation roots, custom object types, resolver functions, and how to avoid the N+1 problem with DataLoader.
A clear introduction to GraphQL — a single endpoint, exact-fields queries, a typed schema, and how it compares to REST. Learn when GraphQL fits and when it doesn't.
A practical guide to CSS transitions and @keyframes animations — properties, timing functions, transform-based performance, the animation shorthand, and prefers-reduced-motion.
A practical guide to CSS custom properties — declaring them, using var() with fallbacks, scoping by the cascade, building a light/dark theme, and updating them dynamically from JavaScript.
A practical introduction to web accessibility — semantic landmarks, alt text, labels, focus management, keyboard navigation, contrast, and when to reach for ARIA.
A practical tour of the meta tags every page should ship — title, description, viewport, charset, Open Graph, Twitter cards, canonical, robots, and a gentle intro to JSON-LD.
How to externalize configuration and credentials in Kubernetes — ConfigMap YAML, Secret YAML, mounting as env vars vs files, and patterns for reloading config without rebuilding images.
How Ingress, IngressClass, and Ingress controllers route external HTTP and HTTPS traffic to your Kubernetes Services — with host and path rules, TLS termination, and notes on ingress-nginx vs Traefik.
Named exports, default exports, re-exports, dynamic import, and what actually makes a file a module — the modern JavaScript module system explained.
Why splitting matters, how to use train_test_split with stratification, and the metrics that actually matter — accuracy, precision, recall, F1, confusion matrices, and ROC-AUC.
Why vibes do not scale: building golden datasets, exact-match vs LLM-as-judge scoring, A/B comparing prompts and models, regression suites, and the observability you need to ship safely.
How LLMs call functions: defining tools with JSON schema, the request → tool-call → response loop, common patterns like search and database queries, and the failure modes that bite in production.
A practical guide to the Next.js App Router — file-based routing, nested layouts, dynamic segments, client-side navigation with Link and useRouter, and the special loading and error files.
A practical walkthrough for installing Next.js 15 with create-next-app, understanding every file in the generated project, running the dev server, and shipping a production build.
A practical guide to React Server Components in Next.js — what runs where, the use client boundary, how to fetch data inside components, and a first look at server actions.
A clear introduction to Next.js — what it is, why it exists on top of React, what the App Router and Server Components actually do, and where it fits compared to plain React, Astro, and Remix.
The handful of VS Code shortcuts and habits worth learning — Command Palette, multi-cursor, fuzzy file and symbol search, the integrated terminal, source control, and settings worth changing.
A practical guide to combining and summarising DataFrames — groupby with named aggregations, multi-column aggregates, the four merge styles, and stacking with concat.
How to turn prompts into reusable templates: variables, system messages as contracts, few-shot structure, JSON output schemas, role prompting, and when patterns help versus hurt.
A practical walkthrough of HTTP methods — semantics, safety, idempotency, body conventions, and the differences between POST, PUT, and PATCH. Plus OPTIONS and HEAD.
Field-tested REST API design — resource naming, versioning, pagination, filtering, sorting, idempotency, and consistent error envelopes. Conventions that age well in production.
A practical tour of HTTP status codes — 2xx success, 3xx redirects, 4xx client errors, 5xx server errors. Which to return when, and the common mistakes to avoid.
Install, pin, and publish — a practical tour of pip, PEP 621 pyproject.toml, and building a tiny library you can share on TestPyPI.
Isolate your Python projects the right way — using the built-in venv module, the new uv tool, and a clear mental model for when to use pipx instead.
A practical guide to React's Context API — createContext, Provider, and useContext — with the cases it solves cleanly and the cases where you should reach for a state library instead.
Extract stateful logic into reusable custom hooks. The use-prefix rule, three examples (useLocalStorage, useDebounce, useToggle), tuple vs object return values, and how to test them.
A practical guide to Rust functions — fn syntax, parameter types, return values, the difference between statements and expressions, the trailing-expression rule, and early returns.
A complete walkthrough of installing Rust with rustup on macOS, Linux, and Windows, then creating your first Cargo project and running it from the terminal.
A friendly tour of Rust's ownership system — the three rules, move semantics, Copy vs Clone, borrowing with & and &mut, the borrow checker, and the beginner errors you'll see first.
A practical tour of Rust variables and scalar types — let, mut, shadowing, integers, floats, booleans, chars, tuples, arrays, type inference, and constants. With runnable examples.
A practical introduction to Rust — where it came from, the three design goals that shape every decision, what it's the right tool for, and what it isn't. With your first Rust program.
How to work with Tailwind's color palette — opacity modifiers, arbitrary values, CSS variables for theming, the dark: variant, and configuring tokens with @theme in Tailwind v4.
Practical patterns for building reusable buttons, cards, and form controls in Tailwind — including variants, the @apply debate, and when to extract a component.
The test-double vocabulary cleared up — mocks vs stubs vs fakes vs spies, when to mock at boundaries, when over-mocking ruins tests, with Python and JavaScript examples.
A practical guide to TypeScript modules — ESM imports and exports, type-only imports, default vs named exports, barrel files, and how tsconfig moduleResolution decides what gets resolved.
A practical guide to narrowing in TypeScript — typeof, instanceof, in, discriminated unions, custom predicates with `x is T`, assertion functions, and exhaustive checks with never.
A hands-on tour of Amazon S3 — buckets vs objects, naming rules, regions, public vs private access, presigned URLs, and the everyday aws s3 CLI commands.
A no-fluff introduction to Amazon Web Services — the mental model of compute, storage, database, and networking, regions and AZs, the free tier, and an IAM-first mindset.
A practical, opinionated guide to writing a software engineer's resume — impact bullets, tech stack lists, side projects, and the common mistakes that get resumes skipped in ten seconds.
Write your first GitHub Actions workflow from scratch — set up .github/workflows/ci.yml, run tests on every push and pull request, and add a status badge to your README.
A clear introduction to CI/CD — what continuous integration and continuous delivery actually mean, why teams adopt them, and the tools that implement them in practice.
Use Docker multi-stage builds to ship tiny production images — build with full toolchains, copy only the artifacts. Examples for Node and Go, with .dockerignore and size comparisons.
A clear introduction to retrieval-augmented generation — why LLMs don't know your data, how embeddings and vector search solve it, and when RAG beats fine-tuning.
A clear introduction to FastAPI — ASGI and Starlette, Pydantic-driven validation, automatic OpenAPI docs, async support, and how it compares to Flask and Django.