How can I use a toggle switch with Arduino ?

Connect one side of the switch to ground, connect the other to the pin,
change the code to:

int switch_pin = 2;  
pinMode(switch_pin, INPUT_PULLUP);

Then calling digitalRead (switch_pin) will return HIGH if the switch is open-circuit
and LOW if its short-circuit.

Next task will be learning to solder and performing debouncing in software I think.