When I'm not working, a lot of my time and energy is spent running. Last year, in preparation for the Berlin Marathon, I was running 4-5 times a week, and also doing strength training 1-2 times a week. Last year, in April, I also ran a PB on the 10K: 37:03. Compared to average runners, this is quite fast (however, in almost every race there are people who are a lot faster).
Sometimes when I tell people I run a lot, they ask me: how fast are you? And some of the beginning runners are amazed when I tell my numbers. A lot of people have a hard time running under 50 minutes, even when training twice a week.
The way I did it is very simple, but not easy: I trained diligently for 3 or 4 years. There have been phases where I was injured, and I couldn't train, but during any other time, I trained at least 3 times a week. Working towards my 10K PB, I almost never missed a training, unless I had a really good excuse. It's as simple as that.
There are a lot of good excuses not to run. However, for me, once I find a good excuse to skip one training, it's going to be even easier to skip the next one. So I made a point of not skipping trainings in preparation for my 10K race. This really helped me. It's not easy: sometimes, you're tired, or you just don't feel like running. You'll have to toughen up and still do it. You'll have to sometimes skip social stuff and go to bed at 10pm, instead of drinking beer until 1am.
Of course, unless you're a professional athlete, you can't keep a regime like that all through the year. I decide on key races, and be very strict about trainings in the months leading up to it, and loosen up afterwards. And during those months, training is my main priority. Of course I will work and socialize during those months, but I try to organize everything around training. Currently, my focus is on work, and hence I take my training a lot more easy.
So this is my secret: just put in the effort. If you want to become a fast runner, run a lot. If you want to become a great programmer, program a lot. Most of your motivation should come intrinsically, for the rest you need to set a schedule and stick to it.
To finish the article, here's a nice quote by Pirsig, which applies to running fast as well:
You’ve got to live right, too. It’s the way you live that predisposes you to avoid the traps and see the right facts. You want to know how to paint a perfect painting? It’s easy. Make yourself perfect and then just paint naturally.
Robert M. Pirsig