Hemingway’s “Code Hero” followed a specific code of behavior that was inherently masculine. Hemingway’s heroes usually appear very indifferent, due largely to the generational disillusionment felt during and after the years of the first world war. These characters drink heavily, do their jobs dutifully, exhibit traits of loyalty and perseverance, and are usually anti-religious or at least very nihilistic. There is no afterlife for rewards or punishments, and death is approached solemnly as both a duty and a test of manhood.
It is an exception to have a female code hero in Catherine Barkley, but she certainly fits the bill. Catherine appears indifferent to her environment and her trials. She mentions the death of a fiancee casually on her first meeting with Lt. Frederic Henry, though she will go on to be fiercely loyal to him later on. Though she doesn’t match Henry, she does her fair share of heavy drinking. She has no religion and doesn’t seem bothered at all by society’s moral concerns about her unplanned pregnancy in her unwed state. Instead, she handles the event as all code heroes: with efficiency and competence. She faces death on a regular basis, working as a nurse in the first world war, and when she faces her own, she accepts it as a “dirty trick” of a random universe, governed not by God or man’s choices, but by sheer chance or bad luck.
This is an interesting question for two reasons: Traditionally, Hemingway's heroes are male, and many reviewers interpret Catherine as an undeveloped character in the novel, merely an idealized projection of male desire. Upon closer examination, however, Catherine does share characteristics of the code hero.
Hemingway's code hero is a skilled professional; Catherine is a nurse who is skilled in her profession. The code hero lives with courage in a dangerous world; Catherine demonstrates courage when she and Frederic row across the lake to escape into Switzerland, a very dangerous feat, and especially when she tries to deliver their baby, finally realizing that she will die. The code hero lives in a random universe, but chooses to control himself and endure; Catherine cannot control events when she goes into labor, but she endures the pain with dignity until her death.
Catherine endures in other ways, as well. She experiences the death of a fiance, faces great fear as an unmarried nurse when she learns she is pregnant, and suffers enormously when Frederic leaves her to return to the war. Throughout all of these trials, however, Catherine does not feel sorry for herself, and she does not break. Like a code hero, she endures.