Yes. I did it, and here's exactly how:<p>Right now you get a nice dopamine rush when you start something, but as soon as it gets a little tricky, you quit and go looking for the next thing that gives you a dopamine rush. Productivity has no value for you, because it doesn't make you happy - you're stuck in a local minima. So what do you do? You have to go through a period of suck to get to the much, much bigger reward.<p>This is exactly the same as dieting, exersise, learning to draw, learning a musical instrument, anything.<p>Here's how:<p>- Recognise that productivity and motivation are not related.<p>A lot of people will tell you that the way to be productive is to find something you're passionate about, or only work on things that motivate you, or that the only way to be productive is by working on something that makes you happy all the time. That's garbage. Every productive person has periods where they feel like what they're doing sucks. Motivation will get you started, it will point the way, but it will absolutely not keep you going.<p>- Recognise that discipline beats motivation.<p>Discipline boils down to accepting that something is going to suck, then doing it anyway. Don't try to convince yourself it doesn't suck, because it does. Don't try to convince yourself you love it, you don't. But you have to do it anyway. A lot of people think discipline is about willpower, as if you can will yourself to do something that sucks. You can't. Discipline is about submission to the task at hand. If you like, you can visualise this as submission to your past self as taskmaster. Present you thinks this blows, but past you said you had to get it done.<p>- Relentless focus.<p>Being disciplined is hard. You only have so much space in your head to keep track. You can't be disciplined about everything. That means you have to cut stuff out. Write down the tasks you are going to do today on an index card. Do only those tasks. You're going to get that wrong a bunch of times, so you can fix it up. Look at that card every hour, and ask yourself whether you did something on it in the last 60 minutes. Set an alarm in your phone to remind you to do it. You're going to notice when you're spending time on HN a lot more, trust me. It will make you feel bad, but it will make you submit to the task at hand.<p>- Pick an end.<p>'Learn C++' is not an end goal. Build a raytracer from scratch is. Don't put a time frame on it. Don't set about breaking it into little tasks, that will happen automatically day-to-day. That thing that motivated you at the start? Write that down. When things start to suck a bit much by going through the 'this sucks' loop day in, day out, you can look at it and remember past you.<p>Then do that loop, over and over and over until you get to the end. Now you are going to get a huge reward, very different to the one you get just by starting something new when you're motivated. In fact, you're going to get addicted to finishing stuff and being productive because the dopamine hit is so so much sweeter.<p>That's just what I did.