I'm not against cannabis (though I don't use it myself), but people have to keep in mind that it is a drug. Using almost every day is not good for you, there will be some damage. If you can't use it responsibly, quit doing it altogether, today.
And cannabis makes you unmotivated. It has an effect on you even on the next day (at least with a bit of bad luck), which can kill even then any motivation. It is one of the worst things you could do if you have problems to motivate yourself to do stuff.
Edit: Maybe I should tell a bit about that.
Take that one guy who lived with me. He lived in the USA for years, had to leave not too soon ago because of visa stuff. Had aspirations of becoming a fashion designer, music producer, had a good paying job as a photograph - never fully graped how much of his high reaching goals were hot air, but at least he could show some stuff he tried to do, he met people for it, and so on. Quite successful with woman, by the way, being a cool and good lucking guy from america.
He had a bit of waiting time before his next step, a design study course on a university, which sounded not too bad. But he started to smoke weed every day. That was a slow process - first, it was occasionally, which was fine and helped with the music, then it got more and more.
He got one small job (starbucks) to fill the time. Before, his day was being at home doing stuff. Now, it was either working, smoking weed and doing nothing, or if not working that day, smoking weed and doing nothing. Nothing got done, the deadline for the university came and went (not quite - a small effort a few days before based on old stuff, didn't work though). If he did catch himself after that, he at least lost a year.
Another guy I knew started with weed, became fully apathic, didn't visit the university anymore, started dealing, taking more drugs - and well, more I don't know, as the contact by then was nonexistent. But before it was sad to see as well, how one quite nice guy became an apathic being not able to buy toilet paper when it's about to go out.
I for sure stay away from that stuff since seeing that.
Why spend time learning and then having some fun with playing around with software development when you can simply light one up and reach nirvana?
Dear OP, I've been in your shoes. Seriously, smoke less, or smoke as a reward. Cannabis is awesome if you want to draw something or play music. It's not so awesome when you must use your logical mind.
Yes, it makes you feel good. That's the point, and that's why you should avoid it. Let's say it boosts your happiness by 50 happiness points. Learning something simply increase your happiness by 10 happiness points... and only when the learning it done! Of course you are not going to want to spend time learning stuff!
Long term marijuana users have been shown to have lower dopamine levels [1] which can (does?) affect motivation.
Daily exercise is what has helped me mentally more than anything else - at this point I can't imagine ever going without it.
1. http://www.psychologytoday.com/blog/the-athletes-way/201307/...
The latter activities are often more enjoyable while high so by introducing the option of smoking weed into the mix you are effectively increasing the appeal that the short-term rewards have, making it less likely overall that you will choose the long-term ones.
I suppose you can always use it as a reward ("if I work hard Monday -> Thursday evenings then I'll get high and chill out on Friday"). I'm sure that a lot of people who are successful do something like that (replace weed with any other vice or enjoyable activity).