Bikes are great things. Unfortunately, no bike lock is going to stop someone from stealing your bike. Locks are only deterrents that make it more of a hassle for someone to steal your bike. This article from Slate magazine will show you how much you need to spend to protect your bike from hand tools. The only ones which stood up to those tools were at least 90 dollars and can still be broken in under a minute by inexpensive power tools that real thieves know how to use.
With that said, you can save some cash by making your own deterrent out of some chain, a padlock, and (optional, but very nice to have) some cloth. It will provide similar security to many cheaper bike locks and could save you 10 to 20 dollars in the process.
Step 1: Materials
Obtain some chain (0 to 10 dollars):
A friend had some extra chain laying around - it was 5mm thick and about 3 meters long (.2 inches and 9.8 feet long). You can use chain of any thickness - the thicker it is, the more hassle it will be to cut and the less . However it will also become more and more of a hassle to carry around with you.
You can pick up chain for 1-4 dollars/foot at most hardware stores. Decide how much you need for the lock - I used about .8m (2.5 feet) for my lock.
Get a padlock (0 to 10 dollars):
I spent about 10 dollars on a Master D-1 padlock. It is pretty hefty, but don't let that fool you. It can be cut by a 10 year old with a bolt-cutter if they know what they're doing. You can get a dial-based padlock, but I chose one operated by a key for no real substantive reason.
Get some fabric (really? you must have something lying around...):
Anything will do here. Make sure you can cut it into a long strip which can be wrapped around the chain so that it doesn't pinch skin or scratch paint as it swings around.
Step 2: Cut the Chain to Desired Length
You can cut chain with a bolt cutter. Most hardware stores will let you do this for free with theirs.
I had 3 meters of chain and cut it down to be just under a meter in length. This would allow me to wrap it around the frame, and front wheel of a bike and then have room for wrapping it around a thick object like a sign post.
Step 3: Wrap the Chain in Cloth
Cut the cloth into a strip that is wide enough to wrap the chain with and just a few centimeters/inches shorter than the chain's length.
Then sew or staple the strip around the chain.
This will allow you to protect your chain from damaging painted surfaces and also protect your skin from the film that develops on your hands from dealing with bare metal.
Step 4: Additional Info...
You can now use this chain and padlock system to deter the theft of your bike.
1. Another things that deters theft is making your bike less attractive. Real bike thieves can break any locks they want, but will only do so if they think the bike is worth it. Making your bike look less expensive than the one next to it will almost always prevent its theft. Cover your Pinarello's frame with reflective tape or your Moots with dirty-looking paint. Boom! A $3000 bike looks like it is worth $300!!
2. You can wear your bike chain as a belt or wrap it around your torso and shoulder like ammunition. This helps you achieve that "hardcore bike messenger" look.