Featured
Strategy Pattern Explained With a Real Python Example
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...
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 strategy pattern hands one changeable step to a separate object. The code around it keeps the steps that never change, and calls one s...
Read the postFresh from the workbench
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...
Cyclones spin because the Earth spins. Air rushes in towards the low pressure at the centre of the storm, and the Coriolis effect bends it...
The section formula gives the point P between A(x₁, y₁) and B(x₂, y₂) with AP : PB = m : n. It is x = (mx₂ + nx₁) ÷ (m + n), and likewise ...
The factory pattern puts the job of making objects in one place. Instead of every part of your code deciding which class to build, it asks...