3 ms·
"higher probability" doesn't mean "always". Of course I test my code thoroughly before committing it. But the fact is that my code tends to be really close to d
by DougWebb 9y ago
"higher probability" doesn't mean "always". Of course I test my code thoroughly before committing it. But the fact is that my code tends to be really close to done before I've even run it.
I'll admit that's sort of a technicality, though. I've been programming for a long time, most of my career without anything more sophisticated than a text editor. I've taught myself to be pretty good at running code in my head, even fairly complex code. So what I'm really doing while I'm writing code is running it in my head as I write it, and finding the unhandled edge cases and other bugs while I'm doing it. I'm also compiling the code (if applicable) which finds other bugs. So, by the time I run the code for real, most of the bugs are gone. This is all a natural part of the act of coding for me, so I see it as coding rather than running/debugging. (I often debug in my head too; handy when you know roughly where a problem is but can't reproduce it.)
I agree completely with your last paragraph; that all helps to be able to hold the execution state in your mind while you're reading through the code.