Just thought I'd post this, as I've made this mistake in the past.. when using TO-220 cased components, don't assume the tab is electrically isolated. In the case of LM317T, it's connected to the output. If you are like me, you may forget this, and decide to screw an old heatsink directly to the tab of a component. In many cases, that's fine.
There's a couple of reasons this is important. Heat sinks are often exposed to the user, to allow airflow. Because the case is output, if your heatsink is electrically in contact with it, your heatsink will be output also. This is bad for a number of reasons, the not the least of which being the heatsink may also be connected to ground.. creating a short circuit. Output voltage of LM317's are still fairly low, but leaving anything energized exposed can just lead to too many problems.
In addition- this is what I did- it's easy to say to yourself "Hey, I've got a big old heatsink and I need to cool four regulators. I'll just screw them all in to the sucker, it can take the heat...", but what's really going to happen is that you've connected the outputs together through the heatsink. This ends badly.. and takes a lot of head scratching to figure out, until you remember that's not just a heat sinking tab....
While on the subject of LM317- when using voltage regulators, be sure you are connecting it properly. When looking at a schematic, the symbol used for a regulator usually shows the connections as INPUT, ADJUST, OUTPUT if you are going from left to right. However, if you have the TO-220 (most common) version, the actual pins are ADJUST, OUTPUT, INPUT from left to right. The schematic symbol is not necessarily going to agree with the packaging, make sure you look up the correct pinout for your device before you hook it up....
If there's a stupid mistake that can be made, I will make it. If there's not, I'll make a mistake anyway just to prove my point. One of the nice things about hobby electronics these days is that components are cheap most of the time, and if cooking a dollar component teaches you a lesson, that's pretty cheap education..