Losing your bike to a low-life thief sucks; losing your bike parts comes pretty close. Personally, I recommend the New York U lock by Kryptonite, if you harbour any thoughts of hanging on to your bike in the big city. Lock it to something that can't be cut or easily broken; remove the front wheel and lock it to the back wheel and frame; old school. If you don't want to remove your front wheel, then use secure stays, like Pinheads, or get used to living without your front wheel. Use the smallest lock possible. The New York Standard (SD) is a good side, unless you're a messenger. Avoid cables or chains; even the best of them can be easily cut with the right bolt cutters; they're generally a waste of time and money. Carry an extra quick release stay in case someone takes the one from your front wheel. Replace quick release back stays with something less removable.
Anyhow, I didn't really want to write about how to lock a bike. What I'm interested in presupposes you already know how. What I'm interested in is securing your bike from thieves who know they can't take the whole bike (since you locked it as suggested above); so, they're willing to take whatever parts they can easily remove, but you're about to make things not easy for them.
Thieves will steal anything that has an allen key hole in it. You can spend big bucks and get the Pinhead headset, seatpost and wheel stay locking system, but, besides being expensive and a nuisance, that still leaves lots of parts to take, including your handle bars.
Lots of people recommend filling the allen keyholes with glue. The question is "what sort of glue". Some people say "wood glue". But forget it. That stuff will run all over the place, make a mess, and it's too easy to chip out. Avoid silicon, which is also easily removed with your bare fingers, if easier to apply.
What I suggest is that you get an epoxy that is meant for filling steel! There are a number of products around that do this. I used a Steel Reinforced Epoxy Putty. The brand I used was Tech Steel, but there are lots of other makers. You can find it in a well stocked hardware store. Nobody is going to steal your parts unless they have all day to do it, because this stuff isn't coming out easily. Make sure you don't put it on your brakes or anything you need to adjust regularly. Steel Reinforced Epoxy Putty is pretty cheap ($6-$7). It dries into a grey putty that looks a bit like a dental filling. Anyhow, it's a very cool solution that I wanted to pass on. Be safe!