I suppose this is part of why people pay way too much for formal education.
When I learned my first programming language, the only formal part was an introduction (a couple of hour-long class sessions) to the APL language given to freshmen Calculus students (most public high schools in my area didn't teach calculus at the time) and it was only fascination that drove me to learn more on my own and eventually change majors from physics to computer science.
If your dedication wanders off after a week or so, I'd say that's boredom. If you could find a way to spend more time at something that bores you, would you really want to go down that road? The money you'll make as a so-so developer probably won't be worth the sacrifice; and few who aren't just fascinated by the process will put in the thousands of hours it takes to get really good at it.
I understand that not everyone can find a career that is both interesting and monetarily rewarding. I hope find yours. My recommendation is to not let salary alone dictate your choice. (Yes, I'm leaping to a conclusion here, but there is a myth that programming will lead to a life of luxury. If that's what's driving you, take back the wheel.)