X-ray absorption spectroscopy for beginners