The Secret of Happy Cycling in Dublin
1- Have a good but rather shitty looking old bike
2- Have one meter of the heaviest chain you can find (if the width of the links is less than your index finger, it's not good)
3- Have a heavy duty padlock to go with the chain
It's worked for me since 1995.
I shouldn't brag, I'm going to jinx myself...