📚 Basic Computer Course – Fundamentals
🔧 Topic: Tools & Setup
Goal of this topic – Learn the essential tools you need to write, run, and manage code, and the steps to set up a healthy, reproducible development environment.
1. Simple Explanation
| Concept | What it is | Why it matters |
|---|---|---|
| Text Editor | Lightweight program to edit plain text files (e.g., VS Code, Sublime, Vim). | Opens code quickly and lets you see syntax. |
| Integrated Development Environment (IDE) | All‑in‑one tool with editor, debugger, and build tools (e.g., IntelliJ, PyCharm). | Offers advanced debugging, auto‑completion, and project management. |
| Command Line / Terminal | Text interface to run commands, scripts, and manage files. | Gives you power, speed, and automation. |
| Version Control (Git) | System that tracks changes and stores code in a repository. | Enables collaboration, backup, and history. |
| Package Manager | Tool to install, upgrade, and manage libraries (e.g., pip, npm, apt). | Keeps dependencies organized and reproducible. |
| Virtual Environment | Isolated container for project‑specific dependencies. | Prevents “works on my machine” problems. |
| Operating System (OS) Setup | Choosing between Windows, macOS, or Linux and configuring essential settings. | Determines what tools you can install and how you interact with the system. |
2. Key Points
| Topic | Key Take‑aways |
|---|---|
| Choosing a Text Editor / IDE | VS Code is a great all‑rounder; keep it minimal at first. |
| Installing an OS | Windows 11 / macOS 14 / Ubuntu 24.04 – install the latest stable release. |
| Primer on the Terminal | pwd, ls, cd, mkdir, rm, cp, mv, cat, nano/vim. |
| Setting PATH | Add program directories to $PATH so you can run them from anywhere. |
| Getting Git | git --version, git config --global user.name, git config --global user.email. |
| Creating a Virtual Environment | python -m venv .venv → source .venv/bin/activate (Linux/macOS) or .venv\Scripts\activate (Windows). |
| Dependency Management | pip install <pkg>, pip freeze > requirements.txt, pip install -r requirements.txt. |
| Basic Git Workflow | git init, git add, git commit, git remote add, git push. |
| Debugging Basics | Use print() or IDE breakpoints; run python -m pdb script.py for console debugging. |
3. Worked Example
Set up a simple “Hello World” project in Python on Windows 11.
Assumptions – You have a fresh Windows 11 PC with no developer tools installed.
3.1 Install Python
- Download the latest Python installer from the official site: https://www.python.org/downloads/.
- Run the installer, check Add Python to PATH, and click Install Now.
- Verify installation:
python --version
3.2 Install Git
- Download Git for Windows: https://git-scm.com/download/win.
- Run installer, keep default settings.
- Verify:
git --version
3.3 Install Visual Studio Code
- Download VS Code: https://code.visualstudio.com/download.
- Run installer, keep defaults.
- Launch VS Code → Extensions → install “Python” and “GitLens”.
3.4 Create Project Folder
mkdir HelloWorld
cd HelloWorld
3.5 Initialise Git Repository
git init
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
3.6 Create Virtual Environment
python -m venv .venv
.\.venv\Scripts\activate # activates the environment
3.7 Create a Python Script
# hello.py
print("Hello, world!")
3.8 Run the Script
python hello.py
# Output: Hello, world!
3.9 Commit and Push
git add hello.py
git commit -m "Initial commit – hello world"
# Optional: create a GitHub repo, then:
git remote add origin https://github.com/yourusername/HelloWorld.git
git push -u origin master
4. Quick Revision Summary
| Concept | Cheat‑Sheet |
|---|---|
| Terminal Basics | cd, ls, mkdir, rm -r, cat file.txt, nano file.txt |
| Activate Virtual Env | .\.venv\Scripts\activate (Windows) |
| Deactivate | deactivate |
| Install Package | pip install <pkg> |
| Freeze Requirements | pip freeze > requirements.txt |
| Commit Flow | git add ., git commit -m "msg", git push |
| Common VS Code Commands | Ctrl+Shift+P → Command Palette; Ctrl+Space → IntelliSense |
| Set PATH on Windows | setx PATH "%PATH%;C:\Python311\Scripts" |
| Git Configuration | git config --global user.name "Name", git config --global user.email "email" |
Final Thought
Mastering *tools & setup