liveBook · Manning

Rot13

ROT13 is a substitution cipher that rotates each letter of the Latin alphabet thirteen positions, making encryption and decryption identical.

How 3 Manning books explain it

Functional Programming in JavaScript

A simple substitution cipher that rotates alphabetic characters by 13 positions.

How it is used
Demonstrates memoization on a referentially transparent function with the same input-output result.
How deep it goes
Defines ROT13 briefly and stops short of the full cipher details, using it mainly as a performance example.
Examples
Uses a discount-code string and repeated calls to show encoded output and cache reuse.
What you can do after
Apply it via memoization and get faster repeated calls from cached results.

Read how Functional Programming in JavaScript explains rot13 →

Natural Language Processing in Action, Second Edition

A Caesar cipher is a substitution cipher that shifts each letter by a fixed position in an ordered alphabet.

How it is used
Uses ROT13 to recognize and decode an encoded secret message through letter shifts, frequency patterns, or Python utilities.
How deep it goes
Demonstrates the cipher’s intuition, frequency-based shift discovery, character-level implementation, and library-based decoding.
Examples
Uses the encoded Zen of Python, character-count tables, frequency histograms, and Python decoding commands.
What you can do after
Apply it via Python’s codecs package to decode ROT13 messages.

Read how Natural Language Processing in Action, Second Edition explains rot13 →

Learn Haskell by Example

ROT13 is a Caesar cipher that rotates letters by 13 positions in the basic Latin alphabet, making the same transformation serve as encryption and decryption.

How it is used
Uses reversible letter scrambling to introduce Caesar ciphers, character transformations, and Haskell's `map`.
How deep it goes
Explains the symmetry, implementation structure, digit handling, and frequency-analysis weakness, but stops short of secure cryptography.
Examples
Demonstrates ROT13 text scrambling, a letter-substitution wheel, and reversible ROT13-plus-ROT5 digit encoding.
What you can do after
Build it from scratch in Haskell using a parameterized Caesar function and `map`, then test reversibility.

Read how Learn Haskell by Example explains rot13 →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.