System Design
Observer Pattern Explained With a Real Python Example
The observer pattern lets one object announce that something happened, and lets any number of other objects react to it. The announcer kee...
Tip: press / anywhere to search.
Builds, code and explainers from the letsBug workshop.
Posts
The observer pattern lets one object announce that something happened, and lets any number of other objects react to it. The announcer kee...
Python's list.append is fast because a list is a dynamic array: one block of memory with spare slots. Most appends fill a spare slot. ...
Momentum is mass times velocity (speed in a set direction): p = mv, in kilogram metres per second (kg m/s). When no outside force acts, th...
The strategy pattern hands one changeable step to a separate object. The code around it keeps the steps that never change, and calls one s...