It's hard to do, but if you really want to have a body that you aren't ashamed of then you have to work for it. I never went to the gym prior to this year. I ended up getting twelve sessions with a personal trainer who helped me get the form right. Once I got some level of fitness acquired from that, we made a routine for every other day and a nutrition plan for bulking up.
You have to go to the gym with a plan in mind as to what you want. For me, i've always been tall and skinny. The ultimate curse. For me to over come my powerful metabolism, I had to go against conventional strength training advice because my body isn't like everyone else. I eat roughly 3500+ calories a day. I get up at 6 or 6:30am, shower, take the bus to work, and am fortunate enough to have a gym in the basement of my office building. I work out for an hour which really helps make the day better, shower again, and go to work. I eat 5 meals a day.
The gains are slow, but the immediate effect of feeling 100% better is noticeable. I live in the shittiest city in the world (Boston) and between the lack of sunlight and bitter cold, the gym helped pull me out of some winter sadness. Seriously, it's not hard to start a 3 day routine. Getting the will power to go is all it takes, but once you start going you will eventually start feeling guilty about not going to the gym.
As with anything, moderation is key. As I remember from my college days there are a few times where I got so out of it I was couched locked and did not want to do anything.
The typical drug war debate aside, I personally wouldn't toke up every time I had to program. I know how it affects me and sometimes being sober for work is a good thing. Just keep it simple and enjoy it as a treat when your work is done. Just like one would treat alcohol.
The body compensates to anything one throws at it to make up for the temporary gains. It's a zero sum gain sadly. Just enjoy it as a treat or treatment if you really need it for a disease/disability.