Once I pick something to work on I have no problem staying motivated or sticking with it. I've also never felt bad about myself running into roadblocks. My problem is that there are too many interesting things to work on, I have a hard time picking from them, leading to FOMA for all the other things I can't pick. What I'm looking for is not so much a way to stick with a task, but rather a system to help me "manage" my life, deciding which of 1,000 potential thing has the highest payoff, and how to balance them.
Circle of competence (read about it on wiki as well):
Short-term
What job can you be hired for an hold for a year and make the most money? If you forced yourself to make money doing one job and holding onto that job for at least one year, what would you do? What skills does that entail? If you're not sure, go network and interview. What gigs can you get right now and get folks to pay you - whether you advertise on Quora, Facebook, call your friends, family, neighbors, etc.? What skills does that entail? What do people ask you to do more than they ask others to do? That's what they think your circle of competence is. They're part of the market. The market will value your competence whether you like it or not.
Long-term
What do you like doing that is a marketable skill? What do you spend your time doing? You'll get better at something you like doing and keep doing, especially if that skill is in demand and others are not as devoted to it or as interested in it. The things you do which you like doing and spend a lot of time doing - as long as you make sure you keep improving - will become part of your circle of competence.
Journaling helps document progress and provides notes that you can transcribe to a spaced repetition system (i.e. flashcards) for long term retention.
Self-compassion is key for picking yourself up after you feel overwhelmed by a topic and quit for the day, which will happen. You have to not be so hard on yourself and understand that there will be good days and bad so that you can build the long term stamina needed to see the project through.
Having something to prove (i.e. I'm a business guy but I can learn coding too; I know I'm smart enough to score high on the GMAT/LSAT whatever and get into the school of my dreams, etc etc) is often what motivates me the most. It gives you that "why" that you need to keep yourself focused on finishing in the face of so many distractions until the project is done.