3 ms·
"A week of coding saved me 30 minutes of planning." That's one of my favorite sayings. >I sweat the edge cases when I'm writing the code in the first place be
by pandler 12y ago
"A week of coding saved me 30 minutes of planning."
That's one of my favorite sayings.
>I sweat the edge cases when I'm writing the code in the first place because I'm incredibly lazy
I like to front-load any problem solving and make sure I understand what I am getting myself into. What that looks like in practice is that, when designing architecture, I will write up a list of every scenario I can think of (within reason of course, also including future plans), and verbally test each scenario against my ideas. Essentially I try to build up the largest image I can of all the moving parts, and then narrow the scope back down to the present problem. Initially expanding the scope to include edge cases and potentially fictitious scenarios not only helps me isolate concerns, but I consequently understand the limitations of my implementation (which of those scenarios failed my verbal testing) and I have my notes for when/if I return. It's how I sate my natural desire to be overly-comprehensive without actually over-engineering everything; I am confident that what I build today is flexible and extensible enough to grow as it needs to. Sometimes I open a file I haven't opened in ages and I read a comment saying, "You're welcome to my future self", and I can't help but be thankful.