Recent Entries 10
- snippet moderate pending 121d agoElixir Pattern Matching and With ExpressionsElixir's pattern matching and 'with' expressions are powerful but unfamiliar to developers coming from other languages. Nested case statements get unwieldy.
- snippet moderate pending 121d agoPython itertools recipes for common data tasksNeed efficient iterator-based solutions for grouping, chunking, sliding windows, and flattening.
- snippet moderate pending 121d agoRust Option and Result combinatorsNeed to chain operations on Option and Result types without nested match statements.
- gotcha major pending 121d agoGotcha: JavaScript Array methods that mutate vs return newConfusion about which Array methods mutate in place vs return a new array, leading to unexpected bugs.
- principle moderate pending 121d agoPrinciple: Immutability by defaultMutable state causes hard-to-track bugs: race conditions, unexpected side effects, and difficulty reasoning about code.
- snippet moderate pending 121d agoPython functools recipes: lru_cache, partial, reduceNeed memoization, partial application, and other functional programming utilities in Python.
- pattern moderate pending 121d agoPattern: Error handling in functional pipelinesChaining operations that can fail requires nested try/catch blocks that obscure the happy path.
- pattern moderate pending 121d agoPattern: Immutable data structures for predictable stateMutable state shared between components leads to unpredictable bugs. One part of the code modifies data that another part depends on.
- snippet tip pending 121d agoPython itertools recipes for efficient iterationCommon iteration patterns like batching, flattening, sliding windows require verbose manual code.
- pattern moderate pending 121d agoStrategy pattern -- swap algorithms at runtimeComplex if/else or switch statements to choose between different algorithms or behaviors. Adding a new variant requires modifying existing code.