From Fundamentals to Spectroscopic Applications of Density Functional Theory