"Programming on and off" sounds like you haven't approached the field in a structured way. You can learn and accomplish a great deal that way, but it also means you have some gaps. Ever implemented a linked list? Compared sorting algorithm efficiency? Doing a course in computer science will probably give you a better grounding. Also, people have niches. I'm guessing you're knowledgeable in your particular niche, and…
I was in this phase about a decade ago, which was just a few years into my professional life. I knew nothing back then and I know very little now.