For the interested; the saying I believe you are referencing in regards to writing code / debugging is from Brian Kernighan, specifically:
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?
It's prescient.