Just-in-time learning beats just-in-case learning