Lot's of good answers here, I'll just add one short addition. I think aside from experience and the other points that have been brought up; what I've really gained over time is a love of unknown and difficult problems. As a beginner I was afraid of unknown problems, because I was unsure if I could solve them; and that brought on impostor syndrome and all sorts of self doubt. As I gained confidence in my ability to solve problems, not knowing the solution to a problem became an exciting and wonderful thing. Difficult problems, while you struggle with them, are an opportunity to learn and discover new aspects of programming. I even quit a job I had because I found that I wasn't challenged with enough new problems. I find that I even miss being a beginner, when so many things were new and exciting. I'll end with a quote from Suzuki Roshi that really sums that up:
In the beginner's mind there are many possibilities, but in the expert's there are few.
So embrace being a beginner, and try and find the excitement in difficulty early on. It's what keeps me doing what I do, and what makes me happy.