Shimano come in 3 lengths.
expensive roadbikes mechs come in short and medium, most folk need medium.
MTB mechs come in medium and long. Most folk need long
It can get a little more complicated, as MartinC described, but if you keep it to MTB need long, and roadbikes need medium, you won't go wrong.
Of course i run short on my roadbike and medium on my mtb, but i just like being differnet