Alan Turing: Code Breaker, Computer Visionary, WW2 Hero, and Persecuted Gay Man That Died A Criminal
- Danny Dutch
- Jun 7, 2023
- 16 min read

It’s strange to think that a shy, awkward mathematician who loved long-distance running and chemical experiments would end up cracking Nazi codes, dreaming up the modern computer and, heartbreakingly, dying as a criminal in the eyes of his own country. Yet this is the story of Alan Turing, the brain behind so many things we take for granted today, from laptops to artificial intelligence, who was driven to the brink by the very society he helped to save.
A Head Full of Numbers
Alan Mathison Turing was born in London on 23 June 1912, into a family that split its time between the British Empire’s far reaches and England’s green schoolyards. His parents spent long stretches in India, so young Alan and his brother were raised mostly by the British Public School system. In 1926, at the age of 13, he went to Sherborne School, an independent boarding school in the market town of Sherborne in Dorset, where he boarded at Westcott House. The first day of term coincided with the 1926 General Strike, in Britain, but Turing was so determined to attend that he rode his bicycle unaccompanied 60 miles from Southampton to Sherborne, stopping overnight at an inn.

At Sherborne School, Latin and Greek were all the rage, but Alan was more interested in figuring out how things worked, clocks, numbers, the curious rules of nature. His headmaster wasn’t impressed: “If he is to be solely a scientific specialist, he is wasting his time at a public school,” he sniffed. Luckily, Alan paid little heed.
At Sherborne, Alan Turing developed a deeply significant bond with his schoolmate Christopher Collan Morcom, who is often regarded as Turing’s first love. This friendship shaped much of Turing’s intellectual motivation and emotional life, yet it came to an abrupt end when Morcom died in February 1930 from complications caused by bovine tuberculosis, which he had contracted years earlier from contaminated milk.
Morcom’s death was a profound blow for Turing, who channelled his grief into an even greater dedication to the scientific and mathematical interests they had nurtured together. In a letter to Frances Isobel Morcom, Christopher’s mother, Turing expressed his feelings candidly:
"I am sure I could not have found anywhere another companion so brilliant and yet so charming and unconceited. I regarded my interest in my work, and in such things as astronomy (to which he introduced me) as something to be shared with him and I think he felt a little the same about me ... I know I must put as much energy if not as much interest into my work as if he were alive, because that is what he would like me to do."
Turing maintained a warm and respectful correspondence with Mrs Morcom long after Christopher’s passing. She would send him gifts, and he would write to her, particularly to mark Morcom’s birthday. On the eve of the third anniversary of Morcom’s death, Turing wrote tenderly to her:
"I expect you will be thinking of Chris when this reaches you. I shall too, and this letter is just to tell you that I shall be thinking of Chris and of you tomorrow. I am sure that he is as happy now as he was when he was here. Your affectionate Alan."

It has often been suggested that the impact of losing Morcom shaped Turing’s evolving views on faith and material reality. At that stage of his life, he seemed to maintain a belief in the survival of a spirit beyond bodily death. In another letter to Mrs Morcom, Turing outlined these thoughts in his own words:
"Personally, I believe that spirit is really eternally connected with matter but certainly not by the same kind of body ... as regards the actual connection between spirit and body I consider that the body can hold on to a 'spirit', whilst the body is alive and awake the two are firmly connected. When the body is asleep I cannot guess what happens but when the body dies, the 'mechanism' of the body, holding the spirit is gone and the spirit finds a new body sooner or later, perhaps immediately."
For Turing, Morcom remained a quietly powerful presence, both as a lost companion and as an enduring influence on how he wrestled with ideas of consciousness, life, and the nature of existence.
By 1931, he was at King’s College, Cambridge, devouring mathematics at a pace that left his peers reeling. He was made a fellow of the college just four years later, and soon produced his landmark paper On Computable Numbers, where he imagined a single machine that could solve any problem if fed the right instructions, the seed of what we now call a computer.

Saving the Allies, One Cipher at a Time
When war thundered across Europe in 1939, Alan Turing’s peculiar gift for unravelling puzzles that seemed beyond human grasp became one of Britain’s secret weapons. He found himself drafted not into the trenches or the skies, but into Bletchley Park, a sprawling Victorian mansion and its huddle of wooden huts tucked away in the Buckinghamshire countryside.
At first glance, Bletchley looked more like a minor aristocrat’s weekend retreat than the nerve centre of the Allies’ codebreaking efforts. But behind its ivy-draped walls, an unlikely band of minds had assembled: cryptographers, chess champions, classicists fluent in dead languages, crossword wizards recruited straight from the pages of The Times, and mathematicians like Turing who were better with machines than with small talk.

Their common enemy? The Enigma machine. This clever German invention looked like a beefy typewriter but concealed a secret: inside, a tangle of rotors, plugboards and wiring re-scrambled each letter with every keystroke. By the time a message reached a U-boat prowling the icy Atlantic, it had been twisted through mind-boggling permutations, nearly 159 quintillion possible settings, by some estimates. The Nazis were so confident in its power that they routinely ignored the possibility that anyone could break it.

But at Bletchley, Turing and his colleagues refused to be daunted. Building on groundwork laid by brilliant Polish mathematicians who had got hold of an Enigma machine before the war, Turing reimagined how to cut through the code’s endless churn. He designed the Bombe, an electro-mechanical marvel that clanked and whirred day and night, each unit a cabinet-sized fortress of rotating drums, wires and switches. The Bombe effectively ran through possible Enigma settings at unprecedented speed, homing in on the one that would unscramble a day’s worth of intercepted enemy signals.
To outsiders, the machine looked chaotic — to Turing and his team, it was poetry in motion. By 1941, thanks to the relentless grind of the Bombes and the dogged brilliance of the codebreakers, Bletchley was reading vast swathes of the German military’s top-secret chatter. This intelligence had a codename: Ultra.
Ultra wasn’t just a bonus for generals, it was a lifeline. With Enigma unlocked, the Royal Navy could track wolfpacks of U-boats skulking beneath the waves, ready to torpedo vital supply ships bringing American arms, food and fuel to British shores. Convoys could be rerouted in the nick of time, saving countless lives and keeping Britain from starvation and defeat. Later, when the Allies planned the D-Day landings, Ultra provided a critical edge, feeding commanders fresh, reliable insights into German troop movements and fortifications.

Yet, for all their heroics, Bletchley’s boffins faced constant headaches. Their workload ballooned daily, but government bean-counters dragged their feet when asked for more staff and equipment. Exasperated, Turing and a handful of colleagues bypassed the sluggish chain of command altogether. In October 1941, they drafted a letter straight to the top — Prime Minister Winston Churchill himself.
In characteristically polite but firm prose, they begged him to intervene: “We despair of any early improvement without your intervention... still more precious months will have been wasted.”
Churchill didn’t mince words. His famous note scrawled back to his Chief of Staff read simply:
“ACTION THIS DAY: Make sure they have all they want on extreme priority and report to me that this has been done.”
And so, overnight, Bletchley Park was showered with the people and resources it so desperately needed. More Bombes were built. More bright young recruits arrived, from linguists to secretaries to Wrens (members of the Women’s Royal Naval Service) who operated the machines around the clock. The atmosphere was a curious blend of academic eccentricity and high-stakes urgency.

Through cold winters and long nights, they kept at it — and in doing so, they shaved years off the war and turned the tide in the Atlantic. For decades, their triumph remained top secret. But today, we know: without Turing’s fierce logic and refusal to accept the word “impossible”, the world might have turned out very differently indeed.

Inside Bletchley Park: Eccentricity, Genius and Wartime Secrets
For anyone expecting a regimented military camp, Bletchley Park was a surprise. It was a curious blend of country manor and makeshift village, with its big main house and a sprawl of draughty huts and brick blocks hastily built on the lawns as the operation grew. Each hut had its own atmosphere, some buzzing like beehives, others quiet except for the scratching of pencils and the rattle of typewriters.
Inside, the codebreakers, known as “the Boffins”, and hundreds of support staff worked in shifts around the clock, seven days a week. People called it the “Golf Club” or the “Country House” to keep up appearances when asked by nosy friends what they were doing for the war effort. In truth, Bletchley was one of the most secretive and intense workplaces in Britain.
Tea, Cigarettes and Ciphers
It was not exactly glamorous. The huts were freezing in winter, stifling in summer and often smelled of stale tobacco and damp coats. Yet the atmosphere was electric with ideas. Young women from the Women’s Royal Naval Service, the Wrens, operated the Bombes, fed punched paper tapes into clattering machines, and took down streams of decrypted messages for senior officers to analyse.
In break rooms, people fuelled themselves on endless mugs of tea, jam sandwiches, chocolate and cigarettes. Social lives were strange and spontaneous. If you fancied a dance, you might find a piano in the main house or join a staff dance in the dining hall. Romance did blossom among the huts, though everyone knew loose talk could sink ships, or, more likely, ruin months of delicate work.
A Cast of Brilliant Characters
While Alan Turing remains the poster boy for Bletchley Park today, he was surrounded by a cast of remarkable minds:



Then there were the so-called “Debs of Bletchley”, bright young debutantes who had been roped in for their linguistic skills or quick minds. Many of them never dreamed they’d be trusted with secrets that could decide battles and save thousands of lives.
Small Wonders: The Quirks and Daily Life of Bletchley Park
While Bletchley Park was serious work, it was also a place full of odd habits, eccentric genius and the occasional outright silliness, necessary antidotes to the mental strain of fighting a secret war armed with pencils and machinery.
Turing’s Chained Mug
Alan Turing was notoriously absent-minded about some things but quite practical about others. He hated it when people “borrowed” his tea mug, so he drilled a hole in the handle and attached it to a radiator pipe in Hut 8 with a length of chain. If you wanted to use Turing’s mug, you’d have to steal the radiator too.
Cycling with a Gas Mask
Another Turing quirk was his daily cycle commute. He pedalled from his lodgings to Bletchley, cutting a solitary figure on country lanes. He suffered terribly from hay fever but refused to let it slow him down, so he wore a World War I gas mask while cycling, turning heads and no doubt giving the local milkmen something to talk about.
Cryptic Christmas Cards
Every Christmas, the Bletchley Park staff looked forward to special cards: cryptic puzzles and riddles slipped into festive envelopes by the senior cryptanalysts. Solving them became an unofficial contest that spread from hut to hut. It was a gentle reminder that, in this world, cracking codes wasn’t just deadly serious, it was a sport and a passion.
The Piano in the Mansion
At the heart of the old main house, there stood a well-used piano. After a long shift hunched over the Bombes or poring over ciphertexts, people would gather around it. Some nights it was cheerful singalongs; other times, after news of a torpedoed convoy, it was sombre tunes to soothe frayed nerves.
A Bit of Cross-Dressing
Bletchley Park was surprisingly tolerant of eccentricities that might have raised eyebrows elsewhere. It was whispered that one staff member sometimes showed up to night shifts in women’s clothing, and no one particularly minded. Results mattered more than appearance.
Spies on the Inside
Security was strict, but leaks still happened. German spies did manage to get scraps of information about Bletchley’s activities, though ironically, the Nazis were so convinced Enigma was unbreakable that they often ignored their own agents’ warnings.
The Wrens’ Tales
The young women of the Women’s Royal Naval Service (the Wrens) did a huge share of the shift work, keeping the Bombes running through the small hours. Many later described it as an odd mix of boredom and adrenaline: long stretches listening to the machines hum and click, broken by sudden moments when a decrypted message came through, a real glimpse into the enemy’s mind.
A Legacy in Oddities and Triumph
When Alan Turing chained his mug to a radiator, wore a gas mask on his bike or puzzled through the night while munching an apple, no one realised history was being rewritten in these small, peculiar scenes. Today, visitors to Bletchley Park can still see reconstructed huts, old Bombes whirring in demonstration, and even Turing’s mug — a gentle reminder that sometimes, world-changing ideas start with a few brilliant misfits, endless tea, and a willingness to think differently.
Secrets Carried for Decades
One of the strangest aspects of Bletchley Park is how invisible it remained after the war. Most staff simply packed up, signed the Official Secrets Act and went back to ordinary jobs — teachers, librarians, civil servants. Some didn’t even tell their families for fifty years that they’d helped win the Battle of the Atlantic or lay the groundwork for D-Day.
Alan Turing, of course, never got to tell his full story. His breakthroughs in computing and artificial intelligence were overshadowed by how Britain betrayed him. It wasn’t until the 1970s that historians began to piece together just how crucial the codebreakers had been, and how much we all owe to that little cluster of huts hidden in the Buckinghamshire countryside.

A Secret War, A Private Life
Even as Alan Turing was helping crack the ciphers that sped up Hitler’s downfall, he was fighting a more personal battle that Britain was nowhere near ready to win. By the conservative standards of mid-twentieth-century Britain, being gay was a crime, not just frowned upon but actually illegal under Victorian-era laws that hadn’t evolved with the times.
Turing knew exactly what he risked by being open about his true self. To the outside world, he was a mild-mannered, slightly oddball bachelor whose mind was always off somewhere in the clouds of mathematics and machinery. Behind closed doors, though, he was a man longing for the same simple companionship that his heterosexual peers could enjoy without fear.
One of the more touching chapters in this hidden side of Turing’s life is the story of Joan Clarke. Joan wasn’t just a talented cryptanalyst at Bletchley Park, she was Turing’s intellectual equal in many ways, a rare female mathematician at a time when women were largely funnelled into clerical roles. The pair grew close, sharing jokes, chess puzzles and long hours bent over cipher sheets.
In 1941, in an attempt to conform to the social expectations he could never truly inhabit, Turing proposed marriage to Joan. She accepted, perhaps out of affection and perhaps because, in that cloistered world of secrecy, companionship was precious. But honesty got the better of him. Turing gently told her about his sexuality and broke off the engagement before they could walk down the aisle. Remarkably, Joan didn’t turn away from him, she remained his loyal friend for the rest of his life, a rare ally when others looked the other way.
After the war, when the secrets of Bletchley Park were packed away and everyone went back to “normal life”, Turing turned his restless mind to a new frontier — building machines that could mimic thought itself. At the University of Manchester, he helped construct the Mark I and Mark II computers — primitive by our standards but astonishing for their day.
He took things further in 1950 when he published Computing Machinery and Intelligence in the journal Mind. There, in a few brisk pages, he posed a question that still fuels debates about artificial intelligence today: if a machine can answer our questions in a way that’s indistinguishable from a human, can we say it “thinks”? This elegant thought experiment became known as the Turing Test, an idea so ahead of its time that it still shapes how we talk about chatbots and algorithms today.
Criminalised and Broken
But Britain in the 1950s had little patience for a man who defied its moral code, no matter how many lives he had saved.
In 1952, a small domestic drama upended his world. A young man named Arnold Murray, with whom Turing had formed a romantic relationship, let slip the name of a petty thief who had burgled Turing’s house. When police arrived to investigate, their interest veered quickly from the burglary to Turing’s private life.
It didn’t take much for the authorities to bring charges of “gross indecency”, the same archaic law that had destroyed Oscar Wilde half a century earlier. Turing could have tried to lie or mount a legal fight, but he refused. In the same blunt honesty that had cost him his engagement to Joan Clarke, he admitted the truth in court.

The consequences were cruel. Rather than jail, the court ordered Turing to undergo chemical castration, a grim experiment in forced “treatment” for homosexuality. He was given oestrogen injections that sapped his libido, altered his body chemistry and, humiliatingly, caused him to grow breast tissue.
It was a catastrophic blow to his well-being. Turing, once an avid long-distance runner who had competed against Olympic-level athletes, found his strength fading and his body changing in ways he neither wanted nor understood. The British government also stripped him of his security clearance. The man who had once been trusted with the country’s most sensitive secrets was now deemed unfit to serve, all because of who he loved.
By June 1954, his isolation was near complete. He kept himself busy with experiments in his home lab in Wilmslow, playing with chemicals and electronics, distractions from the ruin of a career and the public shame.
On 7 June, he was found dead in his bed. A coroner declared it suicide by cyanide poisoning, pointing to a half-eaten apple on his bedside table. Legend has it he dipped the apple in cyanide to mask the taste, a quiet nod, some say, to his favourite fairy tale: Snow White and the Seven Dwarfs.
Yet, as with so much in Turing’s life, even this ending is clouded by ambiguity. His mother, Ethel, and several friends believed it was accidental, he often handled cyanide carelessly in his home lab and had been in good spirits, with a to-do list waiting on his desk. Some have gone further, spinning conspiracies that the government silenced him to protect Cold War secrets.
Whatever the truth, one fact remains: Alan Turing, the brilliant, eccentric mind who reshaped our technological age and helped win the Second World War, died condemned by the very country he had so loyally served. His quiet private battles only came to light years later, a tragic lesson in how genius and difference were too easily betrayed by prejudice.
A Long Overdue Apology — and a Legacy That Refuses to Fade
For decades after his death, Alan Turing’s name was known only to a select few in academia and the intelligence community. His wartime contributions remained buried under the Official Secrets Act until the 1970s, when historians finally began to piece together how decisive his codebreaking work had been in defeating the Nazi U-boat menace and clearing the way for D-Day.
By the time the general public learned what Bletchley Park had achieved, and what Turing had sacrificed, it was too late to apologise to the man himself. But a slow, collective sense of shame grew in Britain as people came to understand the cruelty he had suffered simply for loving who he loved.
It wasn’t until 2009, fifty-five years after Turing’s lonely death, that a formal apology finally came. Gordon Brown, then Prime Minister, issued a statement:
“Alan and the many thousands of other gay men who were convicted, as he was, under homophobic laws were treated terribly. On behalf of the British government, and all those who live freely thanks to Alan’s work, I am very proud to say: we’re sorry — you deserved so much better.”
Four years later, in 2013, Queen Elizabeth II granted Turing a posthumous royal pardon, symbolically erasing the “crime” for which he had been punished. Campaigners didn’t stop there. They fought to ensure that other men who had suffered under the same law were also acknowledged. The result was what’s now known as “Turing’s Law,” which came into effect in 2017 and retroactively pardoned thousands of men convicted of consensual same-sex relationships before homosexuality was decriminalised in 1967.
A Name Etched Into Our Digital Age
Today, Alan Turing’s story is no longer hidden in dusty files. Bletchley Park has become a museum and memorial to all the quiet heroes of that secret war, visitors can see the reconstructed Bombe machines, step inside the same draughty huts, and sense how close the world came to a very different outcome.
Turing himself has been celebrated in statues, stamps, biographies and film. The Imitation Game (2014), starring Benedict Cumberbatch and Keira Knightley, dramatised his life for millions who might never have heard his name otherwise. While the film took some liberties, it cemented Turing in the public imagination as a tragic genius who deserved far more kindness in his own time.
In the scientific world, his legacy is even stronger. Computer science students the world over learn about Turing machines and the Turing Test. His name adorns the most prestigious prize in computing, the A.M. Turing Award — the tech world’s equivalent of a Nobel Prize. His ideas about artificial intelligence continue to shape debates about how far machines can — or should — mimic the human mind.
For the LGBTQ+ community, Turing’s story stands as a reminder of how brilliance and courage can be crushed by bigotry, but also how public attitudes can change, however slowly. His life is a cautionary tale and a point of pride: a way to honour those who paid the price for being themselves long before it was safe to do so.
More Than a Codebreaker
In the end, Alan Turing was so much more than the codebreaker who outwitted Enigma. He was a visionary who glimpsed a future where machines could reason, learn and even converse with us, and a man who, despite being let down by the country he helped to save, remained defiantly true to himself.
He left behind no children, no memoirs, no grand speeches — just pages of dense, elegant mathematics and stories of a quiet oddball who chained his mug to a radiator, cycled with a gas mask and, with a handful of colleagues in a cold hut, cracked the code that changed the course of history.
Today, every computer, every AI assistant, every algorithm owes something to the ideas Alan Turing set in motion. Long after the last secrets of Bletchley Park faded into peacetime, his greatest legacy lives on every time we ask a machine to think.