I'm 52. I messed around with computers in my 20s and 30s but didn't start my programming career until I was 40. My degree is in anthropology. I've been very successful as a programmer. You have to learn to write the code. However you learn that, there are going to be a gazillion folks out there who can write the same code. What's going to make the difference is how well you can translate what people want into code and translate code into what people want (unless all you aspire to is a line programming job). Do a CS degree, it'll give you some kind of credentials. But, if you can't write and speak well, can't get along with people, can't understand at least part of the big picture you're working in you're going to be stuck doing boring, repititious programming tasks that ultimately won't justify the time and effort that went into your degree.
I'm usually mentoring a new programmer who I hope will eventually take over the code I'm writing. I write with that in mind. Explaining along the way makes the code better. Structure helps newbies. I do get lots of nice comments about my code. And it generally works and lasts. Teach someone to write code and your own code will get lots better. Pet peeve about other folks code - saving a few letters makes functions, variables, etc absolutely mystifying. Classic... "OPhone". We spent days working on this thinking it was "Office Phone", turns out it was "Old Phone", but the previous programmer didn't waste the "l" or the "d" so we haven't run out yet.