Talking about stuff like this is bound to sound esoteric, I think. So
I want to put this disclaimer upfront that I detest esotericism.

I can only assume that your problems are similar to mine, so I can
only suggest what works for me. And that might not completely work out
for you in the end, but it's worth a try for sure.

Concentration: The problem of not being able to keep distracting
thoughts away can be lessened with meditation. I came across this
suggestion in the book Pragmatic Thinking and Learning [1] and have
found an excellent CD to listen to called Guided Mindfulness
Meditation [2] by Jon Kabat-Zinn.

I tend to try to avoid meditation because for a while I seem to do
fine and so long as I do fine it just feels like a waste of time for
me. Time that I could invest reading a book. But eventually I always
end up having an extreme amount of distracting thoughts to the point
that I cannot learn anymore. I've now had this problem crop up often
enough with meditation always helping that I'm now a lot more willing
to spend the time and meditate. I want to emphasize that for *me* it
was necessary to get to the dead end and suffer from it to become
willing to change something. Maybe you can relate.

Structure: Well well, the way you write it sounds a little bit rigid
to me. I tightened up imagining all that structure you strive for and
I'm thinking you should relax a little bit. Or at least I should (and
do). So maybe we are different in this regard.

I do think you should lay back a bit and think about what really
interests you deep down in your heart. I assume you've been working
too much on hopelessly boring stuff, because with that I can relate
again. I've been working a little bit on a little server in erlang but
somehow at some point I couldn't bring myself to working further on
it. Well I could, but all the time I felt something was wrong.

As I'm happy to learn interesting programming languages and have heard
all the hype about lisp for so long (I'm looking at you, pg) I finally
gave in and started reading Practical Common Lisp [3] and now
Paradigms of Artificial Intelligence Programming [4] and what can I
say. I see now that what disappoints me in erlang but also in other
languages is having forced upon me one paradigm and/or a rigid set of
rules. In the case of erlang that might be perfectly fine as the
language can make certain guarantees that way. I've realized though
that I would much rather enjoy the lisp-ish freedom while molding a
solution. So this is my story of disappointment and fresh wind.

One quick addition in the end: In an xkcd comic [5] there is a
description of a solution (see the alt-text of the image) that delays
access to certain websites (like reddit, hn for me) but does not block
them completely. It just delays the access (-- more discussion on the
xkcd blog [6]). This serves the purpose of destroying the notion of
instant reward these stupid little bits of new information might give
you, however irrelevant they may be. I've found this to be helpful for
me because sometimes in the past I've procrastinated the hell out of
the day. I got fed up with repeatedly spending hours with unproductive
stuff and feeling sorry for the time in the end. See the pattern? I
needed to run into this problem several times before I decided that I
have to change something. I don't want to make some point here. I just
find this pattern interesting.

What I have done is I have taken an existing little chrome extension
called delaybot which by default only delays for rand(1.5) seconds and
changed the delay to 30 secs. This has worked wonders in the
beginning. I say in the beginning because I've now disabled the
extension as it is getting in my way now. No, this is not the
procrastinator disabling a helpful little tool. :-) I've found that
since I've picked up meditation again I didn't run into this problem
anymore anyways. I also tend to just bookmark away a lot of actually
interesting discussions to read them later, which of course I never
do. I do this bookmarking and closing of tabs because I tend to
accumulate too many tabs easily otherwise.

Not all is great though, the article made me realise that I'm a little
bit too hard with myself when I'm excerting will-power. I try to go
through the mentioned lisp books fast (as there are more to come
still) and at some point I notice that I can't bring myself to read a
lot more at that point. To me this looks similar to the cookie
experiment where a group of people is less productive after excerting
will power in a previous task.

So, to conclude: Even if not all is roses I can say with certainty
that meditation is the single most helpful tool to increase my
productivity. It changes me from being helpless to being more in
control of what I'd like to do with my time.

Regarding your lack of passion: Man, search your feelings. If you find
something that really interests you, you probably wouldn't think much
about what other people could do better than you. That AI book [4] I'm
reading? It features ancient techniques at the point where I am right
now but it's still a great read and I'm learning a heck of a
lot. That's what keeps me going. Also, lisp.

Phew, that was long.
I would love to hear feedback. :-)

[1] http://www.amazon.com/Pragmatic-Thinking-Learning-Refactor-P...

[2] http://www.amazon.com/Guided-Mindfulness-Meditation-Jon-Kaba...

[3] http://www.gigamonkeys.com/book/

[4] http://www.amazon.com/Paradigms-Artificial-Intelligence-Prog...

[5] http://xkcd.com/862/

[6] http://blog.xkcd.com/2011/02/18/distraction-affliction-corre...

EDIT: I've changed the formatting because it renders with long lines otherwise.