Do you know ghouls from goblins and ghosts?
c.1300, "systematic compilation of laws," from Old French code "system of laws, law-book" (13c.), from Latin codex, earlier caudex "book, book of laws," literally "tree trunk," hence, book made up of wooden tablets covered with wax for writing. Meaning "cipher" (the sense in secret code) is from 1808.
1815, from code (n.). Specifically in the computer sense from 1947. Related: Coded; coding.
A series of instructions designed to be fed into a computer.