Before creating the world's most famous fictional spy, Ian Fleming served as personal assistant to the Director of Naval Intelligence, Admiral John Godfrey. In this role, Fleming was involved in planning and coordinating numerous intelligence operations and wrote a famous memo known as the "Trout Memo," which outlined dozens of deception ideas using fishing metaphors.
One suggestion in the Trout Memo—planting misleading documents on a dead body—is widely credited as the inspiration for Operation Mincemeat. Fleming also played a role in creating 30 Assault Unit, a commando intelligence-gathering unit that raced ahead of advancing forces to capture enemy documents and equipment.
Fleming drew heavily on his wartime experiences for the Bond novels. Admiral Godfrey was reportedly the model for "M." Various operations, gadgets, and characters were inspired by real wartime intelligence work. The famous Casino Royale gambling scene was inspired by Fleming's own experience at a Portuguese casino where he lost badly to a group he imagined were enemy agents—though they were likely just ordinary gamblers.