Knowing when to quit is a skill that can be learned.