Tom Ritchford
1 min readJun 6, 2020

--

I mean, I'm a little skeptical that Tim Dierks really doesn't know how to get the length of a Python string, but I agree completely.

The funny part is that I have a "trick memory" which isn't quite photographic but close to - and yet I look almost everything up all the time.

It's simple - if I look it up, I get it right very close to 100% of the time. If I don't, there's a much great chance I'll get it wrong - and maybe get it wrong in a subtle way where two months from now I'll be sitting at my terminal at 2AM cursing.

So what have I learned in 40 years of doing this? Well, I've learned to avoid mistakes like the COVID. I've learned it's worth a little extra time to rewrite my code to make it simpler and clearer now, because next month this little investment will pay off for me.

I've learned that the best debugging technique is to read the code and correctly comment it; and I've learned that correct commenting involves removing comments quite often too, replacing comments by better variable names or clearer structure.

--

--

No responses yet