For some of these big-name personalities, spying taught them the skills that made them famous; for others, being famous made them the perfect spies.

1. Roald Dahl: The Ladies’ Man Who Fell in Love with Writing

Long before he wrote Charlie and the Chocolate Factory and James and the Giant Peach, Roald Dahl was a fighter pilot for the British Royal Air Force during World War II. But after sustaining several injuries in a horrific crash in 1940—including a fractured skull and temporary blindness—Dahl was rendered unable to fly. In 1942, he was transferred to a desk job at the British Embassy in Washington, D.C. Dahl quickly charmed his way into high society and became so popular among D.C. ladies that British intelligence came up with a whole new role for him: seducing powerful women and using them to promote Britain’s interests in America.

It wasn’t all fun and games, though. Clare Booth Luce, a prominent U.S. Representative and isolationist who was married to Time magazine founder Henry Luce, was so frisky in the bedroom that Dahl begged to be let off the assignment. In the end, however, his work with the ladies paid off. Dahl managed to not only rally support for Britain at a time when many prominent Americans didn’t want the country to enter the war, but he also managed to pass valuable stolen documents to the British government. Dahl’s stint in D.C. also helped him realize his talent for writing; it was a skill he discovered while penning propaganda for American newspapers.

2. Ian Fleming: The Armchair Spy

Getty Images

By trade, author Ian Fleming was a journalist with a sharp memory and a keen eye for detail. In fact, he created James Bond, his famed international man of mystery, by plundering his own experiences as a spy.

During World War II, Fleming put his writing talents to use as part of British Naval Intelligence. Although he looked the part of Bond—tall, blue-eyed, and dapper—Fleming worked a desk job. He managed communications between the British Admiralty and the branch of intelligence tasked with sabotage behind enemy lines. Fleming was good at what he did. Not surprisingly, he proved particularly adept at conceiving outlandish spy schemes familiar to Bond fans.

Fleming’s work eventually extended to the United States. He was responsible for helping to create an American organization focused on international intelligence gathering. In 1941, he drew up a detailed chart for the chief of the OSS, showing how the new organization should be run. For his efforts, he was awarded an engraved .38 Colt Police Positive revolver.

Despite being a desk jockey, Fleming did get to witness one active operation—a break-in at the Japanese Consul General’s office at Rockefeller Center. As Fleming watched, British operatives sneaked into the office, cracked a safe, and made copies of the Japanese codebooks. Fleming later used the incident for Bond’s assignment in his first 007 book, Casino Royale.

3. Lucky Luciano: The Mobster with the Heart of a Patriot

Getty Images

As head of the Genovese crime family, Charles “Lucky” Luciano did more for organized crime than any other mobster of his generation. Luciano smoothed out the Mafia’s rough edges and turned families of thugs into well-oiled, organized-crime machines. Not only that, but Lucky also embodied the gangster image—palling around with Frank Sinatra and giving girls $100 bills just for smiling. With a track record like that, it’s no wonder he ended up working for U.S. intelligence.

The story goes like this: In 1936, Luciano was convicted on 62 counts of “compulsory prostitution” and sentenced to 30 to 50 years in prison. But while he was incarcerated, the government discovered that it needed his help. In 1942, a French ocean liner, the Normandie, was being converted into a troop transport ship when it suddenly caught fire and sank. American officials suspected sabotage. But the dockworkers, who were under the Mafia’s thumb, refused to spill any information. The government needed an in, and Luciano was the key.

In many ways, Luciano felt an intense loyalty to America; after all, it’s where he’d earned his fortune. So, he used his influence to urge the dockworkers to cooperate with authorities. In exchange, the mobster enjoyed unsupervised visits from friends and associates for the rest of his time in prison. It was a sweet deal for the U.S. government, too; in a matter of weeks, eight German spies were caught and arrested for the destruction of the Normandie.

Luciano continued to help American forces for the remainder of World War II, using his contacts on the docks to feed information to the Office of Naval Intelligence. Later, as the Allies were planning their invasion of Italy, Luciano, who also had strong ties to the Sicilian mob, offered invaluable information on where to counterattack.

As a reward for his help, Luciano was released in 1946 after serving only 10 years in prison. However, the terms of his release required that he be deported to his birthplace of Italy and never allowed back into the United States. Luciano died in exile in 1962. Before he passed away, he told two biographers that he’d had his own men set fire to the Normandie as part of a creative plot to pressure the government to release him. But as The New York Times noted, Luciano was “known to exaggerate his own cleverness.”

4. Julia Child: The Chef with a Taste for Adventure

Getty Images

Julia Child wasn’t always into French cooking. As she famously recounted in her posthumous autobiography, My Life in France, it wasn’t until she was living in Paris in her mid-30s that she learned what good food tasted like.

How did Child keep busy before that? By performing equally inventive work as an employee at the Office of Strategic Services (OSS), the U.S. government’s precursor to the CIA. Child joined the spy outfit in 1942 after discovering that the Women’s Army Corps had a height limit; at 6’2”, she was too tall for military service. Luckily, the OSS ended up being a perfect fit. One of Child’s earliest assignments was to cook up a shark repellant that would protect underwater explosives from being set off by curious underwater creatures. By all accounts, she excelled at her work. Following a stint in the OSS lab, Child was sent to Ceylon (now Sri Lanka) and then to China, where she worked as Chief of the OSS Registry. As such, she enjoyed top security clearance and even a little danger. (The CIA remains mum about exactly what she did.)

Working at the OSS also turned out to be a recipe for love. In Ceylon, Julia met and fell for another OSS officer, Paul Cushing Child. After the two got hitched in 1946, Julia quit her job while Paul continued to work for the government. Within two years, he was transferred to the U.S. State Department in Paris, where Julia took up cooking to occupy her time. The rest is culinary history.

5. Noël Coward: The Playwright Who Knew How to Play Dumb

Getty Images

By the start of World War II, Noël Coward was already a massive success in the world of theater. The flamboyant playwright had struck box office gold with his productions of Hay Fever (1925), Easy Virtue (1926), and Private Lives (1930).

But when the war broke out, Coward abandoned his theatrical work and set up a propaganda bureau for the British Secret Intelligence Service. Before long, he was sent to the United States to drum up support for the Allied cause. Coward used his celebrity to gain access to America’s elite and to deliver top-secret information to the most influential people in the country, including President Franklin Roosevelt. He also made the most of his vapid playboy image. As Coward explained in his diary, “I was to go on as an entertainer with an accompanist and sing my songs and on the side doing something rather hush-hush … My disguise would be my own reputation as a bit of an idiot.”

Coward actually possessed a formidable memory, and he did his job so well that he reportedly earned a place on the Nazi Black List—individuals Hitler wanted executed once Germany invaded Britain.

6. Robert Baden-Powell: The Boy Scout with a Merit Badge in Sneakiness

Getty Images

“Be Prepared” figures into the codes of both spies and Boy Scouts, so you may not be surprised to learn that the Scouts were founded by an illustrious British agent, Lord Robert Baden-Powell.

The story begins in South Africa in 1899, when Baden-Powell made a name for himself during the Second Boer War. Stationed there with a poorly-armed outfit of only 500 soldiers, Baden-Powell faced a 217-day siege by a Boer army of 8,000 men. To defend the territory, he used everything at his disposal, including props, cunning, and deception. He ordered his men to plant fake mines on the edge of town and had them pretend to avoid barbed wire to throw off the enemy. And because he was short on troops, he enlisted all of the young boys in town to act as guards. Somehow, he managed to protect the territory until British reinforcements finally arrived.

The story made Baden-Powell a war hero in England, and after returning home in 1903, he used his newfound fame to kick-start the scouting movement. Soon, he was helping people across the globe set up Boy Scout troops. All the while, Baden-Powell remained active in the military, working as a spy in the countries he toured.

In 1915, after he retired from duty, Baden-Powell wrote My Adventures as a Spy. In it, he relayed stories about his love for the craft—reveling in the time he pretended to be an American in order to probe German sources, and proudly discussing how he once caught three spies on his own. All told, Baden-Powell painted a rather rosy image of the profession: “A good spy—no matter which country he serves—is of necessity a brave and valuable fellow.”

7. James Hart Dyke: The Artist Who Framed MI6

Getty Images

James Hart Dyke wasn’t a spy, exactly, but he did spend a year living like one as part of MI6, Britain’s elite Secret Intelligence Service. During the 1990s, Hart Dyke was a successful landscape painter who followed Prince Charles on royal tours and later painted the wars in Iraq and Afghanistan. Then, in 2009, the head of MI6, Sir John Scarlett, decided to bring Hart Dyke into the organization as an artist-in-residence. He was looking for someone to accurately portray MI6’s mythic inner workings without revealing too many details.

At first, Hart Dyke thought the assignment was an elaborate joke. He received a mysterious phone call, followed by an equally mysterious meeting in which he was asked to infiltrate MI6 as an artist. Still, he took the job. Hart Dyke was given complete access to MI6 and the lives of its employees, on the condition that he wouldn’t reveal any identifying characteristics about them. “As far as possible, I was ‘one of them,’” he told The Guardian. “Of course, I often saw people wondering what I was really up to … I saw officers looking at me as I sketched away and they seemed to be thinking, oh yes, an artist, are you? A likely story.”

One of the things Hart Dyke tried to convey through his paintings was the thick fog of suspicion and claustrophobia that permeates a spy’s life. As a result, his works possess a dreamy, half-realized quality. And while the subject matter is seemingly everyday—a street corner, a hotel room, a woman carrying a big purse—it always leaves the viewer wondering if something more nefarious is going on.

Hart Dyke also wanted his paintings to expose the boredom and the strain of the work—the in-between times of waiting and doing nothing that strip the job of its glamour. As a member of MI6, the painter experienced both the tedium and anxiety of traveling to shadowy locations and the strain of keeping the gig secret from everyone but his wife. While the artist-turned-spy no doubt enjoyed the experience, he felt pure relief at the end of his stint. As he told reporters in 2011, “I’ll be glad to get back to ordinary life … though I doubt I’ll ever do anything quite as fascinating as this again.”

8. Harry Houdini: The Magician Who Spied His Way to Stardom

Getty Images

If you’re looking to become a spy, “escape artist extraordinaire” is a pretty good thing to have on your resume. So it’s no great surprise that, when he wasn’t suspended upside down in a water tank, Harry Houdini moonlighted in espionage.

At the start of his career in the late 19th century, Harry Houdini gained notoriety by waltzing into police stations and demanding that officers lock him up. It was a great publicity stunt. Every time he ditched the cuffs, he bolstered his reputation. But the stunts didn’t just make headlines—they also caught the eye of several influential people at the American and British intelligence agencies. According to a biography released in 2006, both the American Secret Service and Scotland Yard hired Houdini to sneak into police stations across Europe and Russia and gather information for them.

In return for his services, Houdini knew exactly what he wanted. The magician reportedly would only help the intelligence agencies if they agreed to further his career. William Melville, head of Scotland Yard, had to get Houdini auditions with London theater managers before he’d consent to a little spy work.

9. Marcel Petiot: The Serial Killer Who Was a Little Too Good at Keeping Secrets

Getty Images

During World War II, the United States operated a second spy agency known as the Pond. Unlike the OSS, the Pond made contact with all sorts of dark characters—including serial killers, apparently.

One of the organization’s most prolific sources for Nazi intelligence was a Parisian doctor named Marcel Petiot, who used his position to gather information and gossip about German military operations. But Petiot wasn’t who he claimed to be. A former mental patient, Petiot used his doctor’s office as a kind of fake Underground Railroad. In exchange for 25,000 francs, he promised patients safe passage to Argentina. Petiot’s victims would come to the basement of his Paris townhouse, where he would give them an injection, ostensibly of vaccines. Instead, Petiot dosed his victims with cyanide. He would then incinerate the bodies in an old water-boiler or let them decompose in a pit of quicklime.

Ironically, Petiot’s killing spree ended in 1943, when the Gestapo picked him up on suspicion that he was running an actual escape route. He was held for seven months before being released without charges. Two months later, Paris police got wind of the bodies in Petiot’s basement and arrested him again. The remains of 26 victims were found in his apartment, although he’s suspected of murdering as many as 63. When the war ended, Petiot was convicted and guillotined.

10. Moe Berg: The Player Who Covered a Lot of Bases

Getty Images

Baseball great Moe Berg wasn’t called the “brainiest man in baseball” for nothing. In 1923, Berg graduated from Princeton University with a degree in modern languages (he spoke 12). The all-star also had offers to play baseball just about anywhere he wanted. Berg was quickly snapped up by the Brooklyn Dodgers, but he still wasn’t content to focus on just one career. He pursued graduate degrees in French and philosophy, and then decided to add in a law degree from Columbia University.

By 1926, Berg had been traded to the Chicago White Sox, but that didn’t stop him from keeping up with his studies. Three years later, he passed the New York State bar and then accepted a position with the law firm Satterlee and Canfield—all while still playing ball.

Berg was eventually traded to the Washington Senators, where he was a hit both in the bleachers and on the social scene. Good-looking and witty, a lawyer and a pro ballplayer, Berg was quickly integrated into the D.C. dinner-party circuit, where he soon caught the eye of the U.S. government. Berg did his first spy work while touring Japan in 1934 as part of the American All-Star team. While overseas, he took home movies of Tokyo Harbor, military installations, and industrial areas.

By some accounts, however, the ballplayer wasn’t exactly a natural-born spy. One biographer claimed that Berg made some laughable mistakes early on, including getting caught by his foreign handler while he was trying to break into an aircraft factory. Even so, he was sent on relatively dangerous missions, including one in 1944 to collect intelligence on Germany’s efforts to build an atom bomb. If Berg believed the Germans were close to developing nuclear weapons, he had orders to shoot the lead physicist, Werner Heisenberg. Fortunately, Berg concluded that the Germans were years away from a breakthrough.

This article originally appeared in mental_floss magazine. Consider giving someone special a gift subscription or treat yourself!