I'm asking here because I know a lot of RP work out and /r/fitness is a little too crowded for me.

I've been to the gym but I did machines and cardio and now realize I was wasting energy. I'd like to do a free weights lifting program and need advice on how to develop it.

Background info: I weigh nearly 400 lbs and haven't been to the gym in months so I lost all previous gains and regained all my weight. (i.e. I'm starting from scratch). I primarily want to lose weight (obviously) but building muscle and endurance is on the list too. I can't afford a trainer, I have no idea on form other than watching YouTube videos, and can reliably work out three days a week.

Where can I find a weight program that 1) will help me reach my goals and 2) won't overwork my disgusting marshmallow body? I barely know what a deadlift is but I know that compound free weight exercises are my friend.

Any help is appreciated.

Edit: I've got diet/supplements down pat. I know the drill there. I also know most weight loss comes from proper eating habits. I just don't want to wait a year for my weightloss to be dramatic before starting exercise.

Update Edit: Started walking for an hour a day, five days a week. I'm dieting at a huge deficit. I've already lost about 20 lbs in two weeks.