# Programs and languages — Python, JavaScript, Node

> **What you will learn**
> What a programming language is and why there are many, why a "runtime" is a
> separate thing, and where Node.js and Python each sit in this manual.

## Languages exist for people

A computer only understands ones and zeros, and nobody can direct work in that.
So we write in sentences people can read, and add **a step that translates them
into machine instructions.** The grammar of those sentences is a programming
language.

```python
total = price * quantity
if total > 100000:
    print("free shipping")
```

**You can roughly read it.** That is the point.

## Why there are several

Like human languages, **they are good at different things.**

| Language | Mainly used for | Where you meet it here |
|---|---|---|
| **Python** | data analysis, AI, automation scripts | nearly every AI code sample |
| **JavaScript** | web pages, servers | everything running in a browser |
| SQL | querying databases | [Databases](/guide/it-database) |
| Shell (bash) | stringing commands together | lines you type in a terminal |

**AI samples being Python is a convention.** The data and AI tooling was built
in Python first, so examples followed. It is less "the only way" and more **the
lingua franca for showing something** — which is why the example in
[Your machine as a model server](/guide/ht-model-api) is Python.

## Runtime — the program that runs your program

This is the confusing part. Text written in a language **does not run by
itself.** Something has to read and execute it. That something is the runtime.

```mermaid
graph TD
  A["code someone wrote<br/>app.js · script.py"] --> B["runtime<br/>Node.js · Python"]
  B --> C["a running program"]
```

| Language | Runtime | Check with |
|---|---|---|
| JavaScript | **Node.js** | `node --version` |
| Python | **Python** | `python3 --version` |

> **JavaScript originally only ran inside browsers.** Node.js is what took it
> out of the browser and onto your machine. So "install Node" means **be able to
> run programs written in JavaScript.**

## Which is why HyperTeams asks for Node

That is all [Prerequisites](/guide/ht-prerequisites) is saying. HyperTeams is
written in JavaScript, so it needs the runtime that executes it.

```
✗ "HyperTeams is built on Node, so I need to learn JavaScript"
✓ It is like installing a document viewer to read a document — you need not write them
```

**LTS** (Long Term Support) means "a stable release we promise to maintain for a
while". The newest release is newer but less proven. **For work, take LTS.**

## Packages and versions

Programs are built from parts other people wrote. One part is a **package**, and
the tool that fetches them is a package manager.

| Language | Package manager | Where parts land |
|---|---|---|
| JavaScript | `npm` · `pnpm` | the `node_modules` folder |
| Python | `pip` | a virtual environment |

**Versions follow you everywhere** because when a part changes, programs using it
break quietly. They are written as three numbers (`v20.11.0`); a change in the
first one signals "this may not fit any more".

## Scripts and applications

The same code gets different names by usage.

| | Script | Application |
|---|---|---|
| Nature | runs once and ends | stays up |
| Example | tidying files, generating a report | HyperTeams, a web service |
| Where it belongs | something you put on a [schedule](/guide/ht-schedule) | something you keep running |

Ask an agent to "tidy this up every morning" and you usually get a **script.**
Putting it on a schedule is what [pipelines](/guide/ht-pipelines) are.

## Common misconceptions

### "Do I need to read code to follow this manual?"

**No.** Samples are there to show the shape, and when you need more you can ask
an agent to "explain what this code does in plain language" — one of the things
language models do best.

### "Do I need to install Python?"

**Not for HyperTeams.** Node.js is enough. Python turns up when you write code
yourself, as in the [model server](/guide/ht-model-api) chapter.

---

## Check yourself

**1. Is Node.js a programming language?**

<details>
<summary>Answer</summary>

**No.** The language is JavaScript; Node.js is the **runtime** that runs it
outside a browser.
</details>

**2. Why does HyperTeams require Node.js?**

<details>
<summary>Answer</summary>

**Because HyperTeams is written in JavaScript** and needs a runtime to execute
it. Users do not need to know JavaScript.
</details>

**3. Newest release or LTS for work use?**

<details>
<summary>Answer</summary>

**LTS** — a stable release maintained for a defined period.
</details>

---

That is your single machine. From here we go outside it →
[Networks and communication](/guide/it-network)
