From chaos to code