Tools of the Trade
Everything in this book was possible with a plain text editor and a terminal, and that was deliberate: you now know what every tool is doing for you, because you did it by hand first. Real work adds a few more tools that catch mistakes early and save typing. This is the one page in the chapter that names products, because tools change much faster than the language, so treat the names as "current in 2026" and the ideas as the part that lasts.
Think of moving from hand tools to power tools. They are faster, and they are safe in your hands because you already know what the job looks like when it is done by hand.
A Code Editor
A code editor is a text editor built for programs. It colours the syntax, completes names as you type, shows errors before you run anything, and can run and debug your program without switching to the terminal. Visual Studio Code, usually called VS Code, is a common free choice, with an official Python extension that adds all of the above for Python. Other good editors exist, including PyCharm, which is built for Python, and Zed; the choice matters far less than using one.
Two settings are worth checking in any editor: that it inserts four spaces when you press Tab, and that it saves files as UTF-8. Both are usually the default for Python files.
A Formatter and a Linter
A formatter rewrites your code's layout automatically, spacing, line breaks and quotes, to one consistent style, so you never argue about layout again. A linter reads your code without running it and points out likely mistakes: a name that is never used, an import that is missing, a comparison that is always true. Ruff does both. Installed into the project's environment with python -m pip install ruff, it formats with ruff format and checks with ruff check. Most editors can run it every time you save.
uv
uv is a fast, all-in-one tool for the jobs Chapter 9 did with separate built-in tools. It can install Python versions, create virtual environments, install packages, and run a project with the right versions in one step. Its own documentation lists pip, virtualenv and pyenv among the tools it replaces. This book taught venv and pip first because they come with Python, are documented alongside it, and are what uv does for you underneath. Once they make sense, uv is a comfortable next step; its installation page at docs.astral.sh has the current commands for each system.
Learning with an AI Assistant
AI assistants are very good at explaining an error message, describing what an unfamiliar piece of code does, or suggesting why a program gives a wrong answer. Used that way, they speed up learning a great deal. Used to write code you cannot yet read, they slow it down: the program works until it does not, and then nobody in the room understands it.
A simple rule keeps you on the right side. Ask the assistant to explain; do not paste in code you could not have explained yourself. And check what it tells you by running it, exactly as this book checked every output. Assistants state wrong things confidently. The skills in this book, reading tracebacks, reading code, testing with small examples, are precisely what makes an assistant safe to use.
The Names Will Change
In a few years some of these tools will have been replaced by others. The categories will not: an editor that understands your language, a formatter and a linter, a tool that manages environments and packages, and a way to get explanations. When a new tool appears, ask which of these jobs it does, and you will know where it fits.
| Kind of tool | Its job | Example, as of 2026 |
|---|---|---|
| Code editor | write, run and debug with help | VS Code with the Python extension |
| Formatter | one consistent layout, automatically | ruff format |
| Linter | likely mistakes, before running | ruff check |
| Environment manager | Python versions, environments, packages | uv |
| Assistant | explanations of errors and code | any AI assistant, used to explain |
- "I need all these tools before I can start." This book proves otherwise. The tools speed up work you can already do; they do not replace understanding it.
- "An AI assistant can do the learning for me." It can explain. The understanding still has to happen in your own head, or the code becomes something you cannot maintain.
- "uv replaces Python." It manages Python versions, environments and packages. The language, and everything in this book, stays the same.
- Good tools catch many small mistakes before they reach a test, a user or a customer.
- Knowing what kind of job each tool does means you can adopt whichever one is current, whatever it is called by then.
Knowledge Check
What is the difference between a formatter and a linter?
- A formatter fixes layout; a linter points out likely mistakes
- A formatter runs the program; a linter only reads it
- A formatter is for Python; a linter is for other languages
- They are two names for exactly the same tool
What does uv manage?
- Only the colours and fonts of your code editor
- The text of your program, which it rewrites
- Python versions, virtual environments and packages
- Your tests, which it runs in place of pytest
What is the book's rule for learning with an AI assistant?
- Let it write the code, and read only the final result
- Never use one while you are still learning
- Ask it to explain, and never paste code you could not explain
- Trust its answers, because they are usually right
Why did the book teach venv and pip before naming uv?
- Because uv does not work with Python 3.15 or anything newer
- Because uv is only available for Windows, not for macOS
- Because venv and pip are noticeably faster than uv is
- They come with Python, and uv does the same jobs underneath
You got correct