Coding and Computations with Spiking Neural Networks