Several different topics related to the electronic structure of solids and surfaces are discussed in this thesis. With the quasi-Newton algorithm for relaxing crystal structures, and a new ab-initio method to compute nuclear magnetic resonance (NMR) chemical shifts, numerical methods are developed and implemented to efficiently compute properties related to the electronic structure. These techniques are then applied to a range of different materials. The quasi-Newton method is used to study the recently discovered high-pressure R8 phase of silicon, and the fcc-hcp high pressure structural phase transition of xenon. Using the pressure-induced magnetic phase transition of a model atomic hydrogen crystal as a test system, the accuracy of density functional theory in both the generalized gradient approximation (GGA) and the local spin density approximation (LSDA) is compared to variational quantum Monte Carlo (VQMC) calculations. Finally, for the first time, the NMR chemical shift of extended systems such as amorphous carbon and the hydrogenated diamond (111) surface are calculated from first principles.