To be honest, I do struggle with procrastination, and it hurts me to think that by now, I could have finished that miniproject that I've been working on or that other one, etc, and I use some of that as motivation to push me back into the act. I'm an introvert (which has it's own downsides), and I leverage that to spend my free time on my projects and learning. I do however try to minimize the "souless fun" time and maximize doing things that I find fun but I see as productive. The reason I even try is I believe I can overcome my procrastinating personality and become much more productive.
If I believe you, then I give up on that desire to better myself. should I? Perhaps it is different for different people?
EDIT: My final statement sounds challenging, but if you think it is healthier for me to not fight that part of me, then that's fine. I welcome your point of view; I want a discussion, not validation or an apology.
I had a rather romantic and gifted English teacher in my first year of college who claimed that procrastination is a part of the creative process, likening it hatching an egg, she claimed that procrastinating helped mature ideas before you put pen to paper, similar to the idea to use procrastination time to fully develop a solution to a problem, as you said. Yes, there is a correlation of my hearing of her doctrine and my increased procrastination, but I can't blame her for it.
After a decade of roller-coaster productivity, I finally went to see a therapist to discuss these issues. That was the best decision of my professional life. I was able to talk through my issues, but after a few months of behavioral changes (light box therapy, exercise, mindfulness, etc.), the issue, while better, was not fixed. So I was referred to a psychiatrist, who diagnosed me with ADHD. I got a prescription for Adderall, which I've been on for the past 4-5 years now. It has turned my productivity and career around. I'm making twice what I was making 5 years ago and finally am seeing a lot of the potential that I and others saw in me finally being realized.
ADD (ADHD is the technical diagnosis, but I have no "HD" symptoms at all) isn't really about "having the attention span of a gnat"; it's about inability to sustain focused attention long term, about not being as excited by the last 20% of the project as you are about the first 80%, about not being able to get started--but once you did, it's usually interesting enough to keep your attention for the rest of the day. That definition certainly fit me.
The OP said a couple of comments above: "If you're depressed or socially anxious, you wouldn't just accept these as the way you are, would you?" Chances are that if you are depressed or socially anxious to a point that it affects your life in negative ways, you'd see a professional about the issue and may end up with medication to help with the issue. You don't just wish those conditions away; nor do you wish ADD symptoms away. I'd recommend considering talking to someone about your issues with productivity.
I'm not saying that it's for everybody, nor do I believe in overmedication, but from my experience, which sounds exactly like the OP's, it was the right choice for both me and my career.
I also agree with jeletonskelly here: to a certain extent, embrace your "laziness"... laziness leads to working smarter, not harder. Know your strengths and flaws and come up with a way to use both of them to your advantage.
I'm a little older than you, so I'll give some advice about how to deal with our personality "flaw." Embrace it. Be aware of it, be OK with it, and learn how to make it a positive thing. A few years ago I stopped worrying about being better than some programming idol. You're probably a pretty creative, innovative type if you're anything like me. You can't teach that, in my opinion, and that's a big advantage. You have this skill, programming, and you enjoy it, mostly. You also enjoy some down time. Use your down time how you wish, but always be thinking about the next big idea be it a business, a technology, or a new library. When you find the right idea, it will give you a jolt. "Holy sh#t, no one else has done that yet?" These moments are the ones that catapult me back into that driven, ambitious mode that makes me so productive.
Just remember that no one expects more of you than you. Don't be so hard on yourself. Know yourself and learn how to take advantage of your natural traits.