What films always get wrong
Speed. On screen a cipher falls in seconds, usually while somebody stares at it and gasps. Real code-breaking is mostly patient checking: counting letters, trying a guess, being wrong, and starting again. Bletchley Park employed ten thousand people because that work does not fit in one clever head.
The lone genius. Films need a hero, so a room becomes a person. The Enigma machine was not broken by one man in a hut: Polish mathematicians got there first, before the war, and thousands of people carried it on, most of them women, almost none of whom told anybody for thirty years.
The typing. Nobody breaks a cipher by typing furiously while symbols scroll past. When a computer is involved it is doing something dull very fast, and the person is waiting.
What they get right is the feeling: that a page of nonsense might be hiding something, and that finding out is worth staying up for. That part is true.
Books worth more than any of the films
The Adventure of the Dancing Men by Arthur Conan Doyle. Stick figures on a wall, broken by counting which one appears most. It is a real cipher, really broken, in a short story a child can read in an afternoon. Every code-breaking scene ever filmed is a worse version of it.
The Gold-Bug by Edgar Allan Poe. A substitution cipher solved on the page, step by step, with the reasoning shown. It taught frequency analysis to a generation of Americans and it still works.
Codes, Ciphers and Secret Writing by Martin Gardner, which is where this site started.
Break one yourself What really happened