Text this: The variational theory of geodesics