Understanding and Learning from Mistakes