#Programming Language
189 posts
Modern Python Intermediate #5: Decorator patterns
Every form of decorators that wrap functions — basic form, parameterized decorators, functools.wraps, class decorators, and ParamSpec.
TypeScript Basics #7: Utility Types and tsconfig
Standard utility types you will use every day (Partial/Pick/Omit/ReturnType, etc.) and the key tsconfig.json options that control compile behavior — wrapping up the series.
Modern Python Intermediate #4: Iterables/generators/yield from
How for works — the iterable protocol, generator functions and expressions, delegation with yield from, and send/throw — all in one place.
TypeScript Basics #6: Generics in Depth
Tools that draw out the real expressive power of generics — constraints, multiple type parameters, generic interfaces/classes, keyof, and indexed access types.
Modern Python Intermediate #3: Context managers (with, contextlib)
How with collapses try/finally, building your own context manager with __enter__/__exit__, the concise @contextmanager form, and practical tools like ExitStack and suppress.
TypeScript Basics #5: Function Types
How to express function types precisely — optional/default/rest parameters, function signatures, overloads, and a first encounter with generics.
Modern Python Intermediate #2: typing in earnest — Generic, Protocol, TypedDict, Literal
The next step from basics type hints — Generic for parameterizing types, Protocol for precise duck typing, TypedDict for dict shapes, and Literal for narrow unions.
TypeScript Basics #4: Union / Literal / Narrowing
Union types and literal types for expressing values that are one of several possibilities, plus narrowing patterns to refine the type inside branches — all in one place.
Modern Python Intermediate #1: dataclass and __slots__
Every option of @dataclass for short, safe data classes — frozen, kw_only, field() — and __slots__ for memory savings.
TypeScript Basics #3: interface and type alias
Two tools for naming and reusing object types — interface and type alias — how to use them, the differences, and when to pick which.
Modern Python Basics #7: Modules/packages and pyproject.toml
The import system, the difference between modules and packages, __init__.py and __main__, and pyproject.toml for dependencies, tool config, and distribution — all in one place.
TypeScript Basics #2: Basic Types
The basic types you will use every day — string, number, boolean, array, tuple, object, enum, any/unknown — all in one place.