Your Developer Toolkit
The terminal, git and GitHub, virtual environments, Jupyter and VS Code, project structure and tests: what every intern uses on day one.
Why the tools matter
In this course everything runs in the browser. At work, day one looks different: you get access to a repository on GitHub or GitLab, clone it to your laptop with git, create a virtual environment, install the dependencies, run the tests, make a small change on a branch and open a pull request for review. None of that is machine learning, and all of it is expected of an intern.
The good news: you need a small core of each tool, and it is the same everywhere. This topic gives you that core and a safe place to practise git.
The terminal
The terminal (also called the shell or command line) is a text interface to your computer. On macOS and Linux open Terminal; on Windows install Git Bash or use WSL so the commands match. You type a command, press Enter, and it prints a result. You are always in a folder, the working directory.
Paths can be absolute (/Users/alisha/projects) or relative to where you are (data/raw.csv). Most "file not found" errors are a script run from a different folder than you think: check with pwd.
Environments, packages and editors
Each project should have its own virtual environment: a private folder of packages, so one project's versions never break another's.
Conda (or the faster uv) are popular alternatives; the idea is the same. Editors: Jupyter notebooks (or Google Colab) are best for exploring data and showing results step by step; VS Code is best for code that will be reused, tested and deployed. A common path is to explore in a notebook, then move the working code into .py files with functions and tests.
A typical ML project layout:
git and GitHub
git records the history of your project as a series of commits (snapshots with a message). You choose what goes into the next commit by staging files. Branches let you work on a change without disturbing the main version. GitHub hosts a copy of the repository (the remote) so a team can share it, review changes and run automated checks.
Good habits: small commits with clear messages; never commit secrets (passwords, API keys) or patient data, and list such files in .gitignore; pull before starting work; read the diff before committing. If a merge conflict happens, git marks both versions in the file; you edit it to the correct result, then add and commit.
Try it: a safe git practice terminal
A simulated terminal: nothing here touches a real computer. Work through the missions on the right; type help to see the commands it understands.
Interactive: this part runs in your browser.
Tests and code quality
A test is code that checks other code. With pytest, any function named test_... in a file named test_....py is a test, and assert states what must be true. Run all tests with pytest in the terminal.
In ML code, the most valuable tests check data and feature logic: no future information in features, expected columns and ranges, no duplicated rows after joins, and that the training pipeline runs end to end on a tiny sample. Teams also run a formatter and linter (such as black and ruff) automatically, and CI (continuous integration, e.g. GitHub Actions) runs the tests on every pull request.
Code example: write tests that catch bugs
A worked example: read it step by step (every part is explained), then run it and experiment.
Interactive: this part runs in your browser.
Using AI assistants and documentation well
AI coding assistants are now part of most engineers' workflow, and employers expect you to use them, responsibly. They are excellent for explaining an error, suggesting how to use an unfamiliar library, and drafting boilerplate. They are risky when you paste code you don't understand: it may be subtly wrong, use an outdated API, or leak data. A good rule: you own every line you commit. Read it, run it, test it.
Never paste confidential data (patient records, company secrets, API keys) into external tools unless your organisation has approved them for that data. And learn to read official documentation: every topic in this course ends with links to it. Being able to answer your own question from the docs is one of the skills that most distinguishes a strong junior.
Cheat sheet: Terminal & git
The commands you will use most, on one screen. Come back to it while you work.
Interactive: this part runs in your browser.
Quiz
1. You run python train.py and get "No such file or directory: data/raw.csv", but the file exists. The most likely cause isβ¦
2. What is the correct order to save a change in git?
3. Which files should go in .gitignore?
4. What does pip install -r requirements.txt do?
5. Where do you propose your change for review on GitHub?
π Further reading
Trusted, mostly free sources: official documentation, well-known textbooks and courses. When you want to confirm or go deeper on anything here, start with these.
- The Missing Semester of Your CS Education (MIT) β Shell, git, editors and tools
- Pro Git (free book) β The official git book
- GitHub Docs: Get started β Accounts, repositories, pull requests
- venv: virtual environments β Python standard library docs
- pytest: Get started β Official pytest documentation