A friend of mine (he is not my friend anymore) decided to pull a practical prank on my new motorcycle. He pulled the wire of one of the spark plug (my bike has three of them in the cylinder) and let it hanging by the engine case. I cranked up the engine without noticing it and let it idle for a minute before noticing sparks coming out the side from the spark plug cable. It was sparking against the engine case. I reconnected it and rode away thinking it wasn't any harm. Another friend of mine said that this prank could have damaged my starter coil and that spark plug could not be sparking at all. Now I don't notice any change in the performance of the motorcycle but is he right? Could this have done damage to the bike?
No. The reason your other friend incorrectly said that is because if a charged plug was touching a ground (the frame or whatever) that's a short over a device designed to produce a high voltage, which, obviously, could ruin it. However, the plugs cable ends are "highly" female in that there is plenty of rubber to prevent them from accidentally touching a ground. You can't even touch the metal inside the cable with a finger.
From the coil's perspective, the electrical difference between sparking in a spark plug and sparking through the plug cap rubber and onto the engine isn't that much, except it has to go over a much larger air gap distance. The main point is that it isn't being shorted because of the design. Cars (where most of the engineering came from for your motorcycle) are > 100 years old. Engineers thought of this exact situation already and designed accordingly.
That said, you might have died had the loose cable had touched you while you were driving 50 mph. Unlikely you'd be doing that missing a cylinder of power, but that's a bigger concern in my book.