@@ -208,7 +208,12 @@ Task B ──┴────┴── Task B
208208| ------| ------------|
209209| ** Serialization** | Converting object to byte stream for storage/transmission. |
210210| ** Deserialization** | Reconstructing object from byte stream. |
211+ | ** Pickling** | Python's native serialization. Converts objects to byte stream; security risk with untrusted data. |
212+ | ** Unpickling** | Python's deserialization. Reconstructs objects from pickled byte stream. |
211213| ** Marshalling** | Transforming data for transmission (includes serialization + metadata). |
214+ | ** Unmarshalling** | Reverse of marshalling; reconstruct data on receiving end. |
215+ | ** Hydration** | Populating an object with data (often from serialized form or database). |
216+ | ** Dehydration** | Extracting data from object for storage/transmission. Opposite of hydration. |
212217| ** Endianness** | Byte order: big-endian (MSB first) vs little-endian (LSB first). |
213218| ** Two's Complement** | Standard signed integer representation. Negation: invert bits + 1. |
214219| ** IEEE 754** | Floating-point standard. Sign bit + exponent + mantissa. |
@@ -418,6 +423,54 @@ Prefer composition: more flexible, avoids deep hierarchies
4184231. Physical Cables, signals
419424```
420425
426+ ## Programming Techniques
427+
428+ | Term | Definition |
429+ | ------| ------------|
430+ | ** Thunk** | Delayed computation wrapped in a zero-argument function. Enables lazy evaluation. |
431+ | ** Trampolining** | Convert deep recursion to iteration using thunks. Avoids stack overflow. |
432+ | ** Continuation** | Representation of "what to do next." Captures remaining computation. |
433+ | ** CPS** | Continuation-Passing Style. Pass continuation as argument instead of returning. |
434+ | ** Debouncing** | Delay execution until activity stops. Fire once after rapid events settle. |
435+ | ** Throttling** | Limit execution rate. Fire at most once per time interval. |
436+ | ** Polling** | Repeatedly check for condition/data at intervals. |
437+ | ** Long Polling** | Server holds request open until data available or timeout. |
438+ | ** Reflection** | Program inspects and modifies its own structure at runtime. |
439+ | ** Introspection** | Examine types and properties at runtime (subset of reflection). |
440+ | ** Metaprogramming** | Code that writes or manipulates other code. Macros, code generation. |
441+ | ** Monkey Patching** | Modify classes/methods at runtime. Powerful but risky. |
442+ | ** Boxing** | Wrap primitive in object. ` int ` → ` Integer ` . |
443+ | ** Unboxing** | Extract primitive from wrapper object. ` Integer ` → ` int ` . |
444+ | ** Autoboxing** | Automatic boxing/unboxing by compiler. |
445+ | ** Hoisting** | Moving declarations to top of scope (JavaScript var, function declarations). |
446+ | ** Coercion** | Implicit type conversion. ` "5" + 3 ` → ` "53" ` in JavaScript. |
447+ | ** Short-Circuit Evaluation** | Stop evaluating boolean expression when result is determined. ` false && x ` skips x. |
448+ | ** Interning** | Reuse immutable objects. String interning, integer caching. |
449+ | ** Memoization** | Cache function results to avoid redundant computation. |
450+ | ** Dependency Injection** | Pass dependencies to object rather than having it create them. |
451+ | ** Inversion of Control** | Framework calls your code, not vice versa. "Don't call us, we'll call you." |
452+ | ** Duck Punching** | Modify built-in types at runtime. More aggressive than monkey patching. |
453+ | ** Shim** | Code that intercepts API calls and provides compatibility layer. |
454+ | ** Polyfill** | Code that implements modern API in older environments. |
455+ | ** Coroutine** | Function that can pause and resume execution. Cooperative multitasking. |
456+ | ** Generator** | Function that yields multiple values over time. Lazy sequences. |
457+ | ** Yield** | Pause generator and return value; resume on next iteration. |
458+ | ** Async/Await** | Syntactic sugar for working with promises/futures. Looks synchronous, runs async. |
459+
460+ ### Debounce vs Throttle
461+
462+ ```
463+ User typing: k-e-y-k-e-y-k-e-y
464+
465+ Debounce (300ms):
466+ Events: k e y k e y k e y
467+ Fires: ↓ (once, after typing stops)
468+
469+ Throttle (300ms):
470+ Events: k e y k e y k e y
471+ Fires: ↓ ↓ ↓ (at regular intervals)
472+ ```
473+
421474## Related
422475
423476- [[ Big O Notation]]
0 commit comments