You've just spend a lot of money on a new bike, or you feel rather sentimentally attached to your old beater, either way you want to do everything you can to keep in in your possession.
Just a note, this won't work in an extremely high crime area, if you live in a place where people are willing to strip the parts off your bike, don't let it out of your sight. If your lucky enough to live in a city where you can just leave your bike unlocked, then you probably live in a city with more cows than people. For those moderate crime areas, this should work.
There seems to be a bit of a misunderstanding here. People keep on recommending better locks under the assumption that they are harder to break. Any lock can be broken, but if the thief has the time to take a car jack out and spend the ten minutes prying it open, its your fault for leaving your bike there.
People also suggest doing things like rounding off all the screws on your bike, or filling them with epoxy. Good idea until it breaks and you can't remove it.
The safest place for your bike is under your legs, short of that, by your side. At least within your sight. Locks, no matter how nice, will only help so much.
Step 1: Evaluate your bike
This is hard, take a step back and forget how much you love that hunk of steel or aluminum, and try to actually evaluate its worth.
If its not made out of steel or aluminum, its likely worth a lot.
triple butted anything, expensive
Carbon fiber anything, expensive
If it even thinks words like 'Campy' or Dura-Ace, its worth a lot.
Anything handmade (you don't count)
If your bike really is worth that much, and not just to you, the best and only way to ensure it doesn't get stolen is to never let it out of your site. Take it into your house with you at night and keep it next to your bed.
Otherwise you will probably be fine leaving it outside overnight.
Then again, if you couldn't bear to part with it, inside is always best.
Step 2: Protection
Buy yourself a lock or two. U-locks provide the best protection. One that can't be opened by a bic is nice, one that can fit in your pocket is damn cool, but its up to you.
In general, the more you pay, the better it is, a wonder that free market system of ours.
For the most part, a u-lock is enough, but if you want to be really safe, a separate cable lock provides the most protection when combined with a U-lock. Then again, if theft in your area is so high that you need to do this, consider taking your bike inside.
Step 3: Actually locking the bike
Even if you have the biggest, scariest most theft deterring u-lock its useless unless you use it properly. Ideally you want to lock the bike to something, as well as lock it to itself.
The easiest way to do this is to put the u-lock around the rear wheel inside of the rear triangle. This is effectively locking both the rear wheel and the frame. The wheel can not be removed from the frame, regardless of the amount of jumping up and down it can sustain.
If there are bike racks, use them, you can almost always lock more securely to a rack than to a street fixture. There is also the safety in numbers. As long as your bike is surrounded by bikes that are easier to steal, its somewhat safer.
Alternatively, bring it inside with you. Much more secure than any lock.
Step 4: What not to do
The heart of this instructable, how to not lock your bike. I realize this may be a bit unnecessary, but every day I see so many bike so poorly locked i feel the need to lash out against the owners on a non-larcenous method.
Warning: the following pages contain images of horrifically abused bikes that more sensitive viewers may find offensive.
Step 5: Do not do this: Not locking to something
Need I say, do not lock like this if you value your bike.
Always lock your bike to something immobile, otherwise there is nothing to stop a van full of marauding bike thieves from grabbing your bike, throwing it in the back of their mobile bike theft machine and having their way with it. If the idea of a hoard of ugly men having their way with your precious bike doesn't fill you with fear, well then I'm sorry, i just can't relate.
Step 6: Another do not do this: Not Locking at all
No lock, no matter how ugly your bike is there is someone with an uglier bike who wants yours. No excuse no matter how quick the errand will be or how cheap your bike is, there is still no reason to leave it unlocked.
Step 7: Do not do this
No matter how good of a unicyclist you are you want to lock the bike, not just the wheel. If only the front wheel is locked, all you have to do is flip the quick release and take the frame, if you really want it that badly.
Step 8: Don't Do This: Ignoring the first step
Remember the first thing you did, deciding whether or not your bike was really that valuable. It's important, and these people failed. They made the cardinal mistake of being the best bike locked up at a certain location, making them the focus of theft attempts.
Step 9: Trying to make your bike unridable
Many people advocate vindictive anti-theft measures, such as loosening your front quick release, opening the brakes and derailing the chain, in an attempt to punish anyone who tried to ride off with their unlocked bike. These may cause pain and anguish, but they too are not an effective anti-theft measure, for them to work, someone has to have already stolen your bike. Furthermore, chances are just once you'll forget to tighten the quick release and you'll be the one needing dental work.
Fixed gear riders advocate fixed gear bicycles as a method of this, that they are somehow more secure because they are harder to ride. They are forgetting that due to the unbearable popularity of fixed gear bikes, they have become incredibly attractive targets for theft.
Step 10: Camouflage
Some people seem to think that they can avoid theft by making their bike look to unique to sell, other think they can just make their bike look crappy. To some extent they are right, you can make a bike look crappy, or unique, but that doesn't help theft proof it if you don't lock it properly, it just makes it look ugly.
This myth is so prevalent that even major bike manufacturers have taken to making intensionally ugly bicycles. Please, a bicycle should be a thing of beauty, make the madness stop.
Step 11: Do not do this: Exotic locking mistakes
Sometimes people get really creative with their locking, and sometimes it works. More often though, it fails and makes the bike rather easy to steal.
Step 12: Subtle security
This bike may seem to be violating just about every one of the rules I have posted, but it has a secret form of security that may not be immediately visible. It's my bike, and if you so much as touch it, I will end you. If you try to take it, your getting your head bashed in with my U-lock. Remember, YOU are always the best security (Even better than those heavy chains that you get to wear as bandoleers).