Making life a little harder sounds deeply unfun, but it might be good for your cognitive function.