debouncing on the code

why is it long wires affects the system? I am making a prototype and later will implement it and may use long wires. how will i deal with long wires then?