7 ms·
Laziness is good though. If repetition requires less work for the same outcome, that's good. If abstraction or automation of some kind (like codegen) requires l
by sanderjd 3y ago
Laziness is good though. If repetition requires less work for the same outcome, that's good. If abstraction or automation of some kind (like codegen) requires less work, then that's good.
But the question is, "less work over what time scale?". Repetition usually requires less work over short time scales but often requires more work over longer ones. But not always! I see people abstracting and automating things in throwaway scripts, tools, and PoCs. That is a waste of time.
There is a series of xkcd comics about this, which are all spot on: https://xkcd.com/974/ https://xkcd.com/974/, https://xkcd.com/1319/ https://xkcd.com/1319/, https://xkcd.com/1205/ https://xkcd.com/1205/.
I refer back to that table in 1205 pretty often :)
- wizofaus 3y ago> Repetition usually requires less work over short time scales but often requires more work over longer ones Yes, that's been exactly my experience, and not by a small amount either.
- sanderjd 3y agoYes definitely. But the point is that you have to ask yourself what timescale matters. It isn't always "optimize for the long term" and it isn't always "optimize for the short term". It really depends on what you're up to.