Limitations of magic 0 ▲ Unsung 12 hours ago · Tech · hide · 0 comments There is this lesson every programmer learns when building or debugging something, and it’s “reduce your blast radius.” Let’s say I want to draw some stylized text showing current time in some code I haven’t touched in a while. Instead of doing all that in one fell swoop, I should: use a non-changing test string, instead of the current time (so I reduce the surface area of things that could fail) start with unstyled text, instead of immediately stylizing it (same as above) or, even, begin by modifying the text or color of something that’s already drawn, to make sure I’m touching the right file, that the compilation succeeds, that auto-refresh works, etc. (perhaps using the venerable border: 10px solid hotpink, as mentioned recently by Roel Nieskens) Coders intuitively develop a sense of how big of a leap to take in what situation. You can theoretically noscope a complex regular expression in one go and it will feel fantastic, but if you fail, you might end up going slower than someone… No comments yet. Log in to reply on the Fediverse. Comments will appear here.