I only have the one bike (with the best will in the world, I just don't have space to keep one nice bike and one beat-up bike). As far as possible the way I keep it secured is by having some part of my anatomy in contact with it at all times. If it absolutely, positively, is not possible to do that then I put a D-lock through the frame and rear wheel and then through something solid that it can't be lifted over. Make sure you've positioned the D-lock so it can't be wiggled to get it onto the ground (once it's resting on the ground it can be easily broken with a sledgehammer). Then I use a heavy steel cable looped through the front wheel, fed through the front fork and locked to the D-lock. I use a padlock to lock the cable to the saddle rail and then remove everything like lights, computer, pump etc and take them with me.
It's a royal PITA to do all that, hence the reason I never leave it out of my sight unless it's absolutely unavoidable.