20 Terrible Ways to Reverse a String
summary
Twenty distinct Python ways to reverse a string, each progressively worse: pure slicing replaced by 20 intentionally awful methods including a neural net trained to predict character order (low accuracy, slow to train), a bogosort approach that needs bogosort requiring n! shuffles for correctness, binary/bit-shift encodings, and a physical pipeline using Blender + printer + scissors to render and reassemble letters — all demonstrably working but impractically slow, memory-heavy, or fragile, with concrete complexity and failure modes shown.
AI-written summary · about
chapters (8)
- 0:00Reversing strings in Python
- 5:53Flawed string reversal methods
- 11:11Performance of basic approaches
- 17:15Binary trees and grammars
- 24:44Server and client implementations
- 30:06Network operations and artifacts
- 35:06Language-based costs
- 39:06Q&A
related talks
08mTen Ways To Fizz Buzz
25mDecoding the Frustrations and Vulnerabilities of Modern Text Processing
52mPython Tips, Tricks, and Idioms
24mString Comparison in Real Life
22m"20 GOTO 10: How to Make Scrolling ASCII Art"
59mFun with Python's newer tools
40mSolving the web most popular code shortening competition in Python.
12mMojibake! What the h—ck happened to these strings?
