There's no foolproof lock. You need a combination of a good lock, good locking technique, good location, and good luck, and you're still at risk of eventually losing a bike. I commute on old cheap bikes, and if one is stolen I suck it up and replace it with another old cheap bike. My "good" bike, I don't lock, because I don't leave it anywhere.