code (n.) Look up code at Dictionary.com
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.
code (v.) Look up code at Dictionary.com
1815, from code (n.). Specifically in the computer sense from 1947. Related: Coded; coding.