motor diode placement
As shown, the diode will not protect the transistor, because it doen't prevent the collector voltage becoming very high.

You can 'visualize' the problem this way: the motor is an inductor, the transistor a switch. When the switch is closed, current flows downthrough the inductor (motor) and the switch (transistor). When the switch is opened, current will continue to flow through the coil, in the same direction. This is a property of a coil. It will cause the voltage on the junction to rise (because current flows to that point, and there is now ay to leave it), untill something breaks (probably the transistor). The same thing happens (but longer) if inertial causes the motor to spin after it is switched off.

When correctly placed, the diode will allow the current a path back to the other side of the motor, effectively shorting that current. This sounfds bad but it is actually good, because the motor produces a current, not a voltage.

Somtimes a zener diode is used, placed where you placed the diode, with a zener voltage >> the supply voltage, but &lt;&lt; the transistor breakdown voltage. In that case the current will flow through the zener diode to earth. This dissipates the 'residial energy' faster than the diode over the motor.