If you must lock your bike in a public, unsecure area, firstly make the environment as hard to work in for the thief as possible:
- ideally make sure it's well lit
- it shouldn't be hidden away in a dark alley
- it should be in a reasonably populated, busy area
That way, even if your bike looks attractive, the thief isn't going to be able to be particularly keen on working over your preventative measures.
It's a harsh tip, but make your bike look less attractive: muddy, tape, bad paint job, old. I know bikes are about self-image, but if your bike doesn't stack up well against the one next to you, then they'll go for that one.
Remove all bits that are easily removed. Replace your Quick Release seat stems and wheel skewers with lockable ones. On my commute bike I carry a spanner, not a QR wheel.