SMS dit: The variational theory of geodesics