Setting up a development machine
The plan of a development machine: editor, language and its version, Git and its identity, SSH key, per-project isolated environments, virtual machine, WSL and container.
- 25 cards
- 4 topics
- Free
The outline, topic by topic
Each topic is weighted the way the exam weighs it.
- Concepts
- Questions
- Sort and link
- Scenarios
A few cards from the deck
Development environment: what is it?
Show the answer
The set of tools gathered on a machine to write, run and test a project: editor, language, version control, dependencies.
If two machines do not have the same tool versions, the same project can work on one and fail on the other. It is better to describe it in the repository.
In which order do you type these commands to work inside a brand-new Python virtual environment?
python3 -m venv .venv,source .venv/bin/activate,pip install -r requirements.txtsource .venv/bin/activate,python3 -m venv .venv,pip install -r requirements.txtpip install -r requirements.txt,python3 -m venv .venv,source .venv/bin/activatepython3 -m venv .venv,pip install -r requirements.txt,source .venv/bin/activate
Show the answer
python3 -m venv .venv,source .venv/bin/activate,pip install -r requirements.txtYou create the folder, activate it, and only then install: without activation,
pipwould install into the system (or be refused). Activating a folder that does not exist yet fails.Before the first commit, Git asks you to declare your identity with
git config --globalfollowed by … thenuser.email.Show the answer
Before the first commit, Git asks you to declare your identity with
git config --globalfollowed by user.name thenuser.email.These two values are written into every commit. With
--global, they go into~/.gitconfigand apply to every repository of the account.IDE: what is it?
Show the answer
Software that brings together, in one window, the code editor, assisted typing, running, the debugger and Git integration.
The acronym stands for integrated development environment. It does not replace the compiler or interpreter: it drives them.
After installation,
python script.pyanswers “bash: python: command not found” even though Python is installed. What do you do?- Run
python3 script.py, or install the python-is-python3 package - Reinstall the whole system, since the Python installation is broken
- Add /usr/lib to PATH, since that is where Python is stored
- Run chmod +x on the Python binary
Show the answer
Run
python3 script.py, or install the python-is-python3 packageOn many distributions only
python3is shipped: thepythoncommand does not exist until a package such aspython-is-python3is installed. The message says the shell finds no command of that name, not that Python is broken.- Run