Art of Electronics 3rd ed. page 74.
Red: base voltage
Green: collector voltage
The resistor (10K) connecting the base and ground ensures that the base is at ground when the switch is open.
A diode in series with the collector is used to prevent collector-base conduction on negative swing.