Programming languages, translators and IDEs
| English | Chinese | Pinyin |
|---|---|---|
| translator | 翻译程序 | fān yì chéng xù |
| programming language | 编程语言 | biān chéng yǔ yán |
| machine code | 机器码 | jī qì mǎ |
| high-level language | 高级语言 | gāo jí yǔ yán |
| low-level language | 低级语言 | dī jí yǔ yán |
| assembly language | 汇编语言 | huì biān yǔ yán |
| compiler | 编译器 | biān yì qì |
| interpreter | 解释器 | jiě shì qì |
| integrated development environment | 集成开发环境 | jí chéng kāi fā huán jìng |
Languages and translators 翻译程序
- People write programs in a programming language 编程语言; the CPU runs machine code 机器码.
- Languages are high-level or low-level.
- A translator converts a program to machine code — and an IDE helps you write it.
Computing concept lab
Classify concrete examples by the computing idea they demonstrate.
High-level vs low-level
- A high-level language 高级语言 (e.g. Python) reads like English — easy to write/fix and portable (runs on different computers).
- A low-level language 低级语言 is close to the hardware: machine code (binary, run directly by the CPU) and assembly language 汇编语言 (mnemonics for machine code).
- Low-level code is CPU-specific — used when you need full hardware control or very fast, small code.

High-level languages are close to human language and portable; low-level languages (assembly and machine code) are close to the hardware and tied to one CPU

A compiler 编译器 translates the whole program once into machine code; an interpreter 解释器 translates and runs one line at a time.
A high-level language (like Python):
High-level languages are easy to read/write and portable; low-level languages are CPU-specific.
Compiler vs interpreter
| Compiler | Interpreter | |
|---|---|---|
| Translates | the whole program at once | one line at a time |
| Errors | all reported at the end | stops at the first error |
| Finished program | runs fast, no translator needed | slower, needs the interpreter |
- Use a compiler to share a fast finished program; an interpreter while writing and testing.

An operating system is software — the programs that tell the hardware what to do.
Match each term to what it is.
High-level → readable; machine code → binary; a compiler translates once, an interpreter goes line by line.
A compiler:
A compiler translates everything once into a fast stand-alone program; an interpreter goes line by line.
A compiler translates the whole program once so it then runs fast without the compiler, whereas an interpreter translates and runs line by line, stopping at the first error — handy while testing.
Compiled code is faster and stand-alone; interpreted code is easier to debug because it stops where the error is.
Integrated development environment 集成开发环境 (IDE)
- An IDE puts the tools to write programs in one place:
- a code editor, a run-time environment, a translator, error diagnostics, auto-completion/correction, and prettyprinting (neat colour + indentation).

Hardware is the physical parts; software is the programs
Which is a feature of an IDE?
An IDE bundles an editor, translator, run-time, diagnostics, auto-complete and prettyprinting.
You've got it
- high-level = English-like, portable; low-level = machine code (binary) / assembly, CPU-specific
- a translator turns code into machine code; compiler (whole program at once) vs interpreter (line by line)
- compiler → fast finished program; interpreter → easy testing
- an IDE bundles editor, translator, diagnostics, auto-complete and prettyprinting