I suspect that writing bug-free code and fixing bugs without the usual tools like print statements are skills that most programmers don’t practice (since they’re not typically necessary), but that you totally can practice and get better at.
It may be under-practised because debugging takes too much time. Writing near bugfree code is the only way to get something done in a short timeframe.
Yes, nothing comes for free, of course… but it seems to me that with careful coding one can massively decrease bug rate while spending only little extra time. Debuggers make bug finding much easier but not so much faster. Coding carefully also feels very difficult out of proportion how slower it is.
It may be under-practised because debugging takes too much time. Writing near bugfree code is the only way to get something done in a short timeframe.
My experience is that writing bug-free code typically takes up additional time in other ways.
Yes, nothing comes for free, of course… but it seems to me that with careful coding one can massively decrease bug rate while spending only little extra time. Debuggers make bug finding much easier but not so much faster. Coding carefully also feels very difficult out of proportion how slower it is.