Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Dependencies, package managers and lockfiles
card 1 of 6
You asked for 1 package and got 69
builds on: How a code project is laid out
You run `npm install express`. npm replies `added 69 packages`. Next to `package.json`, a file you never wrote appears: `package-lock.json`, hundreds of lines long.
Why 69? And next month, when a teammate installs the project, which file decides the versions they get: `package.json`, or that new file?
If you use pip: does `requirements.txt` do the same job?
Terms on this card
- package
- A bundle of reusable code that someone published so other projects can use it, e.g. `express` or `requests`.
- npm
- The standard package manager for JavaScript projects. It reads `package.json` and installs packages into `node_modules/`.
- npm install
- The npm command that installs packages. With a name (`npm install <name>`), it adds that package and updates `package.json` and `package-lock.json`. Without a name, it installs everything the project lists.
- pip
- The standard package manager for Python. It installs packages from PyPI, often listed in `requirements.txt`.
- package.json
- The manifest of a JavaScript project. It lists the project's packages, their version ranges and commands like `start`.
Lesson goal: Explain that projects pull in external packages through a package manager (pip, npm, ...), listed in a manifest and pinned in a lockfile. Explain why installing a package runs someone else's code on your machine. ·
the whole lesson