Welcome to the Programming Fundamentals and Best Practices course. Before we dive deep into writing code, solving problems, and building projects, we must first establish a solid foundation. Just like a house needs a strong base before adding walls and roofs, your programming journey needs a strong setup.
In this section, we will:
- Understand why programming fundamentals matter.
- Install Git and learn the basics of version control.
- Install Visual Studio Code (VS Code), our main coding editor.
- Set up environments for both Python and JavaScript.
- Learn the best practices for keeping our workspace clean and productive.
By the end of this section, you’ll have a fully working environment and the right mindset to start coding confidently.
Before we set up tools, let’s answer a big question:
👉 Why should you learn programming fundamentals before jumping into frameworks or advanced tools?
Think about programming like building a skyscraper:
- Fundamentals = foundation (variables, loops, functions, data structures).
- Frameworks & libraries = floors & decorations (React, Django, etc.).
- Projects = the skyscraper itself.
Without fundamentals, everything you build will be shaky.
Programming fundamentals are the basic building blocks every programmer must understand, no matter the language. They include:
- Variables & data types (numbers, strings, booleans).
- Operators (math, logic).
- Control flow (if/else, loops).
- Functions & modular code.
- Problem-solving strategies.
- Language Transferability – If you learn fundamentals well in Python, you can switch to JavaScript, Java, or C++ easily.
- Debugging Skills – You’ll know how to track down errors logically.
- Job Interviews – Most coding interviews test your fundamentals with data structures and algorithms.
- Long-term Success – Frameworks change fast (today React, tomorrow something else), but fundamentals last forever.
📌 Instructor’s Note: Even senior engineers rely on fundamentals daily. Tools may change, but problem-solving remains constant.
Version control is an essential skill for every developer. Git is the most popular version control system, and GitHub is where your code will live.
Git is a tool that:
- Tracks changes in your code.
- Allows collaboration with others.
- Lets you roll back mistakes.
Think of Git as a time machine for your projects.
-
Download Git from git-scm.com.
-
Run the installer with default settings.
-
Verify installation:
git --version
Expected output (version may vary):
git version 2.44.0.windows.1
-
Open Terminal.
-
Install via Homebrew (recommended):
brew install git
-
Verify with
git --version.
sudo apt update
sudo apt install git -y
git --versionConfigure your identity:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"Check settings:
git config --list-
Initialize repo:
git init -
Stage changes:
git add file.py -
Commit:
git commit -m "Initial commit" -
Connect to GitHub:
git remote add origin https://github.com/username/repo.git git push -u origin main
📌 Instructor’s Note: Every project you’ll build in this course must be version-controlled with Git. This builds discipline and industry readiness.
VS Code is a lightweight, powerful code editor with tons of extensions for Python, JavaScript, Git, and more.
- Free and open source.
- Works on Windows, macOS, and Linux.
- Rich ecosystem of extensions.
- Built-in Git integration.
- Debugging support.
- Download from code.visualstudio.com.
- Install with defaults.
- Launch VS Code.
- Python – Microsoft’s official extension.
- ES7+ React/Redux snippets – For JavaScript.
- Prettier – Auto-formatting.
- GitLens – Enhanced Git tracking.
- Error Lens – Highlights errors inline.
📌 Instructor’s Note: Always format your code using Prettier/Black. Clean code = readable code = better teamwork.
Python is beginner-friendly, widely used in AI, web dev, automation, and more.
-
Download from python.org.
-
During installation, check “Add Python to PATH”.
-
Verify:
python --version
brew install python3 # macOS
sudo apt install python3 -y # Linux
python3 --versionWhy? To isolate dependencies per project.
python -m venv venv
source venv/bin/activate # macOS/Linux
venv\Scripts\activate # WindowsDeactivate:
deactivateUse pip:
pip install requests numpy pandasFreeze dependencies:
pip freeze > requirements.txtJavaScript is the backbone of web development.
-
Download from nodejs.org.
-
Verify:
node -v npm -v
npm init -y
npm install expressRun tools without installing globally:
npx create-react-app myapp- npm – Default with Node.js.
- yarn – Faster dependency resolution.
- pnpm – Efficient storage.
-
Always use version control (Git) from the start.
-
Use virtual environments (Python) or package.json (JS).
-
Keep dependencies minimal.
-
Organize files:
project/ src/ tests/ README.md requirements.txt / package.json -
Use README.md for documentation.
-
Enable auto-formatting in VS Code.
📌 Instructor’s Note: A disciplined setup makes you stand out as a professional developer.
- What command initializes a repository?
- How do you commit with a message?
- How do you check your Git version?
- Which extension helps auto-format code?
- How do you open a project folder in VS Code?
- How can you integrate Git inside VS Code?
- Command to create a virtual environment?
- How to install packages listed in
requirements.txt? - Command to deactivate a virtual environment?
- Command to check Node.js version?
- How do you initialize a JS project with
npm? - What is the difference between
npm installandnpx?
At this point, you should:
- Understand why programming fundamentals matter.
- Have Git installed and configured.
- Have VS Code ready with essential extensions.
- Be able to run Python and JavaScript code on your machine.
This setup is the launchpad for the rest of the course. From here, we’ll dive into programming fundamentals, data structures, algorithms, and problem-solving.