#Programming Language
189 posts
Modern Python in Practice #3: Connecting a DB — SQLAlchemy 2.x + Alembic
SQLAlchemy 2.x's new style — Mapped/mapped_column, async sessions, integration with FastAPI's dependency injection, and Alembic migrations.
TypeScript Advanced #6: Modules and .d.ts
How to handle and extend the types of external libraries — declaration files (.d.ts), the declare keyword, module augmentation, and adding global types.
Modern Python in Practice #2: Routing, Pydantic Models, and Dependency Injection
Splitting routes with APIRouter, defining input/output schemas with Pydantic v2, and unraveling shared logic cleanly with Depends.
TypeScript Advanced #5: Discriminated unions and type guards in depth
Modeling for safely handling data of multiple shapes — discriminated unions, user-defined type guards, assertion functions, and branded types.
Modern Python FastAPI #1 Getting Started and Setup
Why FastAPI, first project setup with uv, Hello FastAPI, automatic OpenAPI/Swagger UI generation — all in one place.
TypeScript Advanced #4: Template literal types
Tools that compose strings at the type level — the `${...}` pattern, Capitalize/Uppercase built-ins, and real-world patterns for modeling route/event names as types.
Modern Python Advanced #7 Performance — cProfile, py-spy, Memory Profiling
A toolbox for finding and fixing slow Python code — timeit, cProfile, py-spy, line_profiler, memray, and common optimization patterns.
TypeScript Advanced #3: Conditional types and infer
The if statement of the type level — the distributive behavior of T extends U ? X : Y and the patterns that pull values out of a type with infer. Build ReturnType and Awaited yourself.
Modern Python Advanced #6: Advanced typing — Variance, ParamSpec, Self, overload
Next step from intermediate typing — covariance/contravariance, ParamSpec and Concatenate, Self, TypeGuard/TypeIs, and @overload.
TypeScript Advanced #2: Mapped types
Mapped types that transform an entire object type — how Partial/Required/Readonly are built, plus key remapping (as) and modifiers (+/-).
Modern Python Advanced #5: GIL and concurrency — threading vs multiprocessing vs asyncio
What the GIL is, the role of threading/multiprocessing/asyncio, and the free-threaded build of Python 3.13–3.14 (PEP 703/779) — all in one place.
TypeScript Advanced #1: keyof and typeof
The two most fundamental tools for building types — using keyof to gather keys, typeof to derive types from values, and the patterns that become possible when they meet.