"Code Hero" stems from many of Ernest Hemingway's novels, in which the term is often used to describe the protagonist and his values. Typically, the protagonist operates under a "code" of his choosing which dictates his decisions and conduct. Usually, these ideals are courage, honor, and resilience in the face of immense pain, tragedy, or stress.
Hemingway builds violent worlds for his characters and submits those individuals to the whims of such chaos. His "heroes" are the characters who behave honorably while suffering and, thus, proves his masculinity and his value as a man. He looks his greatest fears—particularly death—squarely in the eyes. He is free-willed, an individualist, adventuresome, and closely guards and masks his personal feelings and emotions. Unfortunately, death frequently claims the Code Hero—the ultimate defeat. These qualities are closely related to our understanding of stoicism.
Hemingway's specific definition of the Code Hero is: "a man who lives correctly, following the ideals of honor, courage and endurance in world that is sometimes chaotic, often stressful, and always painful."