Rattlesnake Code (Rattlesnake’s Code)

The “cowboy code” was an unwritten code of conduct for the cowboy, a way to treat everyone fairly and honestly. For gunslingers, there was also a “rattlesnake’s code.” The rattlesnake rattles before it strikes; the gunslinger must never shoot an unarmed or unwarned enemy.
 
The term “rattlesnake’s code” is first cited in the 1950s. Many doubt that this unwritten code ever applied to the Old West.
 
 
The Code of the West
First chronicled by the famous western writer, Zane Grey, in his 1934 novel The Code of the West, no “written” code ever actually existed. However, the hardy pioneers who lived in the west were bound by these unwritten rules that centered on hospitality, fair play, loyalty, and respect for the land.
 
Ramon Adams, a Western historian, explained it best in his 1969 book, The Cowman and His Code of Ethics, saying, in part:
“Back in the days when the cowman with his herds made a new frontier, there was no law on the range. Lack of written law made it necessary for him to frame some of his own, thus developing a rule of behavior which became known as the “Code of the West.” These homespun laws, being merely a gentleman’s agreement to certain rules of conduct for survival, were never written into statutes, but were respected everywhere on the range.”
(...)
Never shoot an unarmed or unwarned enemy. This was also known as “the rattlesnake code”: always warn before you strike. However, if a man was being stalked, this could be ignored.
 
Google Books
Out West: An Anthology of Stories
by Jack Schaefer
Boston, MA: Houghton Mifflin
1955
Pg. 235:
The rattlesnake’s code, to warn before he strikes, no better: a queer, lop-sided, topsy-turvy, jumbled and senseless code — but a code for all that. ...
 
Google Books
The Old-Time Cowhand
by Ramon F. Adams
New York, NY: Macmillan
1961
Pg. 55:
Gene Rhodes spoke the sentiment of the whole range when he said:
“To rise up from a man’s table and war upon that man while the taste of his bread is still sweet in your mouth—such dealings would have been unspeakable infamy. ... You must not smile and shoot. You must not shoot an unarmed man, and you must not shoot an unwarned man. Here is a nice distinction, but a clear one; you might not ambush an enemy; but, when you fled and your enemy followed, you might then waylay and surprise without question to your honor, for they were presumed to be on their guard and sufficiently warned. The rattlesnake’s code, to warn before he strikes, no better; a queer, lopsided, topsy-turvy, jumbled and senseless code—but a code for all that. And it’s worthy to not that no better standard has ever been kept with such faith as this barbarous code of the fighting man.”
 
14 February 1975, Long Beach (CA) Press-Telegram, pg. A2, col. 1:
According to the Time-Life history of the Old West, “The code of the gunslingers was what Westerners called a rattlesnake’s code. The fact is, it lacked even the rattlesnake’s fair warning. In rare cases when real cowboys did exchange gunfire, honor and rules were conspicuously missing…the intent was simply to shoot a man in the front, back, side or wherever the shot would take effect.”
 
Google Books
Blazing Six-Guns
by Kit Dalton
New York, NY: Leisure Books
1996
Pg. 44:
He lives by the rattlesnake code. Strike first without warning, strike again and again as long as your target is standing. Never give your enemies an even ...