2 ms·
One of my favorite tricks (from CPU designers I worked with) was to "poison" requests or pieces of data and pass them on, instead of trying to return them immed
by notacoward 4y ago
One of my favorite tricks (from CPU designers I worked with) was to "poison" requests or pieces of data and pass them on, instead of trying to return them immediately after an error. At first it seems like it's just wasting cycles, but often "turning around" the control flow at a particular point can require all sorts of code contortions especially when locking is involved. Letting things flow to a point where it's easier to turn around - like turning around in a parking lot instead of in the middle of the street - has drastically simplified error handling in several codebases I've worked on. It's like soft deletes, but for data in flight instead of data at rest.