Featured
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.
The letsBug blog
How things work, explained plainly: code and algorithms, the tech in your pocket, and Class 9–12 science and maths. Written alongside the letsBug YouTube channel, with worked examples and checked facts. Let's figure out how it works.
Featured
The observer pattern lets one object announce that something happened, and lets any number of other objects react to it. The announcer kee...
Read the postFresh from the workbench
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...