caduh

Posts tagged “ca-duh

Tiny explainers grouped by topic. Spend less time Googling, more time building.

CORS Explained Without Cargo Culting

A practical guide to CORS for builders: origins, preflights, credentials, common browser errors, and the server configs that actually fix them without opening your API to the world.

devsecurityweb

Secrets Management 101

A practical guide to env vars, secret managers, rotation, and least privilege — with delivery patterns for web apps, workers, CI/CD, and Kubernetes.

devsecuritysecrets

CSRF Still Matters

A practical guide to CSRF protection in modern apps: SameSite cookies, synchronizer tokens, custom headers, Fetch Metadata, and the CORS mistakes that quietly reopen old holes.

devsecuritycsrf

RBAC vs ABAC vs ReBAC

A practical guide to choosing role-based, attribute-based, or relationship-based authorization for real products, with examples for SaaS apps, internal tools, B2B org models, and shared resources.

devauthauthorization

Passkeys / WebAuthn in Practice

A practical guide to shipping passkeys with WebAuthn: registration, sign-in, recovery, account settings, and the RP ID/origin gotchas that usually break rollouts.

devauthpasskeys

Session Cookies vs JWTs vs PASETO

A practical guide to choosing session cookies, JWTs, or PASETO for web apps, SPAs, mobile apps, and APIs without cargo-culting stateless auth.

devauthsecurity

OAuth 2.1 & OpenID Connect, Explained for Builders

A practical guide to OAuth 2.1 and OpenID Connect for real apps: authorization code + PKCE, refresh tokens, ID tokens, and machine-to-machine flows without the usual auth confusion.

devauthoauth

OpenAPI Done Right — contracts, not just docs

Practical patterns for rock‑solid APIs: spec styleguide, reusable components, Problem Details errors, auth & versioning, pagination, idempotency, testing, and CI gates. Includes a copy‑paste 3.1 template.

devapiopenapi

JWTs — Expiration, Rotation, and Revocation

Design access + refresh flows that are safe: short-lived access tokens, rotating refresh tokens with reuse detection, device-scoped sessions, and practical revocation strategies.

devsecurityauth

Google Ads API — the essentials (tiny playbook)

Developer token + OAuth, account hierarchy (manager vs customer), GAQL for reporting, safe mutations with validate_only/partial_failure, quotas, and offline conversions.

devapiads

Web Accessibility Basics: 5 Easy Wins for Every Developer

Low‑effort, high‑impact a11y fixes: alt text, semantic HTML & landmarks, color contrast (and non‑color cues), keyboard navigation & focus, and form labels/errors—with copy‑paste examples.

devwebaccessibility

A Practical Guide to API Error Handling

Status codes you should actually use, consistent error shapes (Problem Details, JSend), and production‑ready logging/observability—so clients get clear signals and you get actionable telemetry.

devapihttp

What is an N+1 Query and How Do You Fix It?

A fundamental database performance problem: why N+1 happens, how to spot it, and fixes with eager loading/batching in popular ORMs (Django, Rails, Prisma/Sequelize, SQLAlchemy).

devdatabasesorm

Securely Managing Environment Variables (The Right Way)

Why you shouldn’t commit .env files, how to handle secrets differently in local, staging, and production, and the exact patterns to inject, validate, rotate, and audit configuration safely.

devsecuritysecrets

Common Design Patterns — The 5‑Minute Version

A whirlwind tour of widely used patterns—Singleton, Factory, Observer, Strategy, Adapter/Decorator—with tiny examples, when to use them, and common pitfalls.

devprogrammingdesign-patterns

UTF-8 vs ASCII — What Every Developer Should Know

A simple guide to character encoding: what ASCII is, how UTF‑8 works, why bytes ≠ characters, and the real-world gotchas (mojibake, emojis, normalization, MySQL utf8mb4).

devencodingunicode