Skip to content

Latest commit

 

History

History
323 lines (210 loc) · 7.78 KB

File metadata and controls

323 lines (210 loc) · 7.78 KB

TechOps Hub: Introduction & Setup

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:

  1. Understand why programming fundamentals matter.
  2. Install Git and learn the basics of version control.
  3. Install Visual Studio Code (VS Code), our main coding editor.
  4. Set up environments for both Python and JavaScript.
  5. 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.


1. Why Programming Fundamentals Matter 💡

Before we set up tools, let’s answer a big question:

👉 Why should you learn programming fundamentals before jumping into frameworks or advanced tools?

🔹 1.1 The Foundation Analogy

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.

🔹 1.2 What Are Programming Fundamentals?

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.

🔹 1.3 Why They Matter in Real Life

  1. Language Transferability – If you learn fundamentals well in Python, you can switch to JavaScript, Java, or C++ easily.
  2. Debugging Skills – You’ll know how to track down errors logically.
  3. Job Interviews – Most coding interviews test your fundamentals with data structures and algorithms.
  4. 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.


2. Installing Git 🛠

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.

🔹 2.1 What is Git?

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.

🔹 2.2 Installing Git

🖥 On Windows

  1. Download Git from git-scm.com.

  2. Run the installer with default settings.

  3. Verify installation:

    git --version

    Expected output (version may vary):

    git version 2.44.0.windows.1
    

🖥 On macOS

  1. Open Terminal.

  2. Install via Homebrew (recommended):

    brew install git
  3. Verify with git --version.

🖥 On Linux (Ubuntu/Debian)

sudo apt update
sudo apt install git -y
git --version

🔹 2.3 Git First-Time Setup

Configure your identity:

git config --global user.name "Your Name"
git config --global user.email "your@email.com"

Check settings:

git config --list

🔹 2.4 Quick Git Workflow

  1. Initialize repo: git init

  2. Stage changes: git add file.py

  3. Commit: git commit -m "Initial commit"

  4. 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.


3. Installing Visual Studio Code (VS Code) ✨

VS Code is a lightweight, powerful code editor with tons of extensions for Python, JavaScript, Git, and more.

🔹 3.1 Why VS Code?

  • Free and open source.
  • Works on Windows, macOS, and Linux.
  • Rich ecosystem of extensions.
  • Built-in Git integration.
  • Debugging support.

🔹 3.2 Installation

🖥 Windows / macOS / Linux

  1. Download from code.visualstudio.com.
  2. Install with defaults.
  3. Launch VS Code.

🔹 3.3 Must-Have Extensions

  • 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.


4. Setting Up Python Environment 🐍

Python is beginner-friendly, widely used in AI, web dev, automation, and more.

🔹 4.1 Install Python

Windows

  1. Download from python.org.

  2. During installation, check “Add Python to PATH”.

  3. Verify:

    python --version

macOS/Linux

brew install python3   # macOS
sudo apt install python3 -y   # Linux
python3 --version

🔹 4.2 Virtual Environments

Why? To isolate dependencies per project.

python -m venv venv
source venv/bin/activate   # macOS/Linux
venv\Scripts\activate      # Windows

Deactivate:

deactivate

🔹 4.3 Installing Packages

Use pip:

pip install requests numpy pandas

Freeze dependencies:

pip freeze > requirements.txt

5. Setting Up JavaScript Environment 🌐

JavaScript is the backbone of web development.

🔹 5.1 Installing Node.js & npm

  1. Download from nodejs.org.

  2. Verify:

    node -v
    npm -v

🔹 5.2 Using npm

npm init -y
npm install express

🔹 5.3 Using npx

Run tools without installing globally:

npx create-react-app myapp

🔹 5.4 Package Managers (npm vs yarn vs pnpm)

  • npm – Default with Node.js.
  • yarn – Faster dependency resolution.
  • pnpm – Efficient storage.

6. Best Practices for Setup 🧭

  • 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.


7. Mini Tests & Checkpoints ✅

Test 1: Git Basics

  1. What command initializes a repository?
  2. How do you commit with a message?
  3. How do you check your Git version?

Test 2: VS Code

  1. Which extension helps auto-format code?
  2. How do you open a project folder in VS Code?
  3. How can you integrate Git inside VS Code?

Test 3: Python Environment

  1. Command to create a virtual environment?
  2. How to install packages listed in requirements.txt?
  3. Command to deactivate a virtual environment?

Test 4: JavaScript Environment

  1. Command to check Node.js version?
  2. How do you initialize a JS project with npm?
  3. What is the difference between npm install and npx?

8. Conclusion 🎯

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.