Business logic in a controller is reachable from exactly one place: an HTTP request. The first time the same operation is needed from a console command, a queue…
Fitting a user-uploaded image of unknown aspect ratio into a fixed box has always meant a wrapper with overflow: hidden, the image absolutely positioned, and a centring translate.…
Object.assign() copies enumerable own properties from one object onto another, which reads like a deep clone and is not one. Nested objects are copied by reference, so mutating…
Applying a transformation to every scalar in a nested array — trimming decoded JSON, casting numeric strings — usually produces a small recursive function that gets copied between…
Changing a price by filtering woocommerce_get_price alters it everywhere at once, including the catalogue and the order confirmation email — and it fires often enough to be a…
INSERT IGNORE is reached for to skip rows that already exist. What it actually does is downgrade every error in the statement to a warning, which is a…