Idea Ripper // ArchiveCards: 1555 [Live] | Updated: 2026-10-14
Card #c866IR // #c866Synthesis

When a small piece of the picture changes, do not rebuild the whole picture. Subtract what left and add what arrived. Most 'rework' is really 'recompute everything,' and it is almost always avoidable.

— In our words · Source: Algorithms Every Programmer Should Know (Aniket Wattamwar)

[Use when]

You are recalculating a total, a forecast, or a status every time one thing changes.

[Why it matters]

Slide the window and adjust only what entered and left, instead of redoing the whole calculation.

More from Algorithms Every Programmer Should Know

#c858Before you chase "better," name what you are giving up to get it. Speed costs money. Thoroughness costs time. Reach costs attention.…You are deciding between two "better" options and keep assuming one is best in every way, or someone promises… #c859When you plan a system, a launch, or a budget, design for the worst realistic case, because that is exactly where things break. The average…You are sizing a plan, a budget, or a capacity and someone says "on average it will be fine." #c860Do the crude version first, the one that just works, then improve it once you can see the real bottleneck. Optimizing before you have a…You are stuck planning the perfect approach, or someone wants to optimize a process that does not work yet.