Throw out this attitude. It's utterly useless.
Step 2:
Go bomb five technical interviews and learn from them.
Step 3:
Ace the sixth.
> but I’d probably utterly fail any type of formal interview where they asked me to write or explain code on the spot.
It seems to me that you lack comunication skills to explain what you know. I would be very difficult to somebody to hire you to do team work, maybe you should try freelancing or improve your understanding of what are you doing, commenting your code would be a good start.
Go take an undergrad algorithms class at a local university. Make sure it covers "big O" notation. Read a book or two on data structures.
You're now equipped to handle CS interview questions.