好词典

code

UK //kəʊd//US //koʊd//

词源

源自拉丁语 'codex'(原意为木板书或手稿),14世纪通过古法语 'code' 进入英语,最初指法律条文汇编,后引申出密码、编程等现代含义。

noun

❶ 代码,指用编程语言编写的一系列指令,用于控制计算机执行特定任务。

“She spent hours debugging the Python code.”

(她花了几个小时调试Python代码。)

“The app crashed due to an error in the source code.”

(由于源代码中的错误导致应用程序崩溃。)

❶ 密码或编码系统,用于秘密传递信息或代表特定含义的符号规则。

“The spies communicated using a secret code.”

(间谍们使用密码进行交流。)

“Please enter your 4-digit access code to unlock the door.”

(请输入4位数的门禁密码开门。)

❶ 规范或准则,指特定领域或群体遵守的正式规则体系。

“All employees must follow the company's dress code.”

(所有员工必须遵守公司的着装规范。)

“The building violates several safety codes.”

(这栋建筑违反了几项安全规范。)

同义词:cipher, program, script, regulation, protocol

verb

❶ 编写程序,将算法或逻辑转化为计算机可执行的指令。

“He coded the entire website from scratch.”

(他从零开始编写了整个网站的代码。)

“We need to code this feature before the deadline.”

(我们需要在截止日期前编写这个功能的代码。)

❶ 将信息转化为密码或特定格式,通常用于保密或分类。

“The message was coded to prevent interception.”

(信息被加密以防止被截获。)

“Medical records are coded to protect patient privacy.”

(医疗记录被编码以保护患者隐私。)

同义词:program, encrypt, encode, classify

常见短语

source code — 源代码,指程序员编写的原始计算机指令文本,可被编译或解释执行。

“The open-source project makes its source code available to everyone.”

(这个开源项目向所有人公开其源代码。)

code of conduct — 行为准则,规定组织成员应遵守的道德规范和行为标准。

“All participants must agree to the conference's code of conduct.”

(所有参会者必须同意遵守会议的行为准则。)

break the code — 破解密码,或比喻理解复杂系统或难题的关键。

“Cryptographers worked for years to break the enemy's code.”

(密码学家花了多年时间破解敌人的密码。)