The Professional Developer Workflow
Knowing HTML, CSS, and JavaScript is only half the job. Every professional developer uses a set of tools and practices to collaborate, ship safely, and keep their code maintainable. This module covers all of them.
Git & Version Control
Git is the time machine for your code. It tracks every change you make so you can always go back, collaborate without overwriting each other, and understand the history of a project.
The Daily Git Workflow
# 1. Start a new project
git init
# 2. Check what has changed
git status
# 3. Stage all changes for commit
git add .
# 4. Save a snapshot of your staged changes
git commit -m "feat: add dark mode toggle"
# 5. Push your changes to GitHub
git push origin main
Branching — The Professional Way to Work
Never work directly on main. Create a feature branch, do your work, then merge it in.
# Create and switch to a new branch
git checkout -b feature/login-page
# Do your work, then commit...
# Switch back to main and merge
git checkout main
git merge feature/login-page
# Push to GitHub
git push origin main
Conventional Commits
Use a consistent commit message format. Senior developers and team leads care a lot about a clean Git history.
| Prefix | When to use it |
|---|---|
feat: | A new feature was added |
fix: | A bug was fixed |
docs: | Documentation updated |
style: | Formatting changes (no logic change) |
refactor: | Code restructured without changing behavior |
chore: | Dependency updates, configs, build scripts |
The .gitignore File
This file tells Git which files/folders to ignore. You must have one in every project.
# Dependencies
node_modules/
# Build output
dist/
build/
# Environment variables (NEVER commit secrets)
.env
.env.local
.env.production
# OS files
.DS_Store
Thumbs.db
# IDE files
.vscode/
.idea/
# Log files
*.log
npm-debug.log*
GitHub Pull Requests
In a team, you don't merge directly. You open a Pull Request (PR) and another developer reviews your code before it's merged.
# 1. Create a feature branch
git checkout -b feature/search-bar
# 2. Make changes, commit them
git add .
git commit -m "feat: add search bar with debounce"
# 3. Push the branch to GitHub
git push origin feature/search-bar
# 4. On GitHub: click "Compare & Pull Request"
# 5. Write a description of your changes
# 6. Request a review from a teammate
# 7. After approval: merge the PR
# 8. Delete the branch (keep repos clean)
Undoing Mistakes in Git
| Situation | Command |
|---|---|
| Undo last commit (keep changes) | git reset --soft HEAD~1 |
| Undo last commit (discard changes) | git reset --hard HEAD~1 |
| Unstage a file | git restore --staged filename |
| Discard all local changes | git checkout -- . |
| See commit history | git log --oneline -10 |
| See who changed a line | git blame filename |
NPM & Tooling
NPM (Node Package Manager) is the world's largest library of open-source code. It lets you use tools and packages that others have built, so you don't reinvent the wheel.
# Initialize a new project (creates package.json)
npm init -y
# Install a package (saved as a dependency)
npm install date-fns
# Install a dev tool (only needed during development)
npm install --save-dev vite
# Run a script defined in package.json
npm run dev
npm run build
The package.json File
{
"name": "my-portfolio",
"version": "1.0.0",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"dependencies": {
"date-fns": "^3.0.0"
},
"devDependencies": {
"vite": "^5.0.0"
}
}
.gitignore file and add node_modules/ to it. This folder can contain thousands of files that should never be pushed to GitHub — they can be restored with npm install.Deployment & Performance
A project only exists when it's live on the internet. Deploying your project is non-negotiable for a developer portfolio.
Free Hosting Platforms
username.github.io/repo..dev domain (~$10/year) and connect it to Vercel or Netlify.Core Web Vitals (Google's Speed Score)
Google uses these three metrics to rank pages. A slow site ranks lower in search results.
| Metric | Measures | How to improve |
|---|---|---|
| LCP (Largest Contentful Paint) | Loading speed | Compress images, use WebP format, lazy-load below-fold content |
| CLS (Cumulative Layout Shift) | Visual stability | Set explicit width/height on images and iframes |
| INP (Interaction to Next Paint) | Responsiveness | Minimize heavy JS, use debounce on scroll events |
Career Roadmap — Getting Hired
Your 90-Day Action Plan
| Days | Focus | Deliverable |
|---|---|---|
| 1–30 | Build your 3 projects from Module 4 | 3 live URLs on your portfolio |
| 31–60 | Polish GitHub & LinkedIn profiles | Active GitHub, strong LinkedIn bio |
| 61–90 | Apply & practice interviews | 5–10 applications per week |
What to Learn Next
After completing this course, here is the recommended path to increase your job-readiness:
- React — The #1 requested front-end skill on job boards. Build on your JS foundation.
- TypeScript — Adds type safety to JavaScript. Required at most mid-size and large companies.
- Node.js + Express — Build your own APIs and backend logic.
- Databases — Learn SQL basics and a service like Supabase or Firebase.
- Next.js — Full-stack React framework. The current industry standard.
Chrome DevTools — Your Debugging Superpower
Chrome DevTools is the single most important tool for debugging. Open it with F12 or Ctrl + Shift + I.
| Tab | What It Does | Use It When |
|---|---|---|
| Elements | Inspect and edit HTML/CSS live | Fixing layout issues, testing colors |
| Console | Run JS, view errors & logs | Debugging logic, checking API responses |
| Network | See all HTTP requests | API calls failing, slow page loads |
| Application | View localStorage, cookies, cache | Checking stored data, clearing cache |
| Lighthouse | Performance & accessibility audit | Before deploying — aim for 90+ score |
| Sources | Set breakpoints, step through code | Finding exactly where a bug happens |
Console Power Commands
// Basic logging
console.log('Value:', myVar);
// Table format (perfect for arrays of objects)
console.table(products);
// Grouped logs
console.group('User Data');
console.log('Name:', user.name);
console.log('Role:', user.role);
console.groupEnd();
// Timing code execution
console.time('fetch');
await fetch('/api/data');
console.timeEnd('fetch'); // "fetch: 142ms"
// Warning and error styling
console.warn('Deprecated function used');
console.error('Failed to load user data');
Interview Preparation
Here are the most commonly asked questions in junior web developer interviews. Study these — they come up constantly.
HTML Interview Questions
| Question | Key Answer Points |
|---|---|
| What is semantic HTML? | Using tags that describe their purpose (<nav>, <main>, <article>) instead of generic <div>s. Helps SEO and accessibility. |
What does DOCTYPE do? | Tells the browser to use HTML5 standards mode instead of "quirks mode" (legacy rendering). |
Difference between id and class? | id is unique (one per page), class can be reused on many elements. |
CSS Interview Questions
| Question | Key Answer Points |
|---|---|
| Explain the Box Model | Every element = Content + Padding + Border + Margin. Use box-sizing: border-box to include padding in width. |
| Flexbox vs Grid? | Flexbox = 1D (row OR column). Grid = 2D (rows AND columns). Use Flexbox for navbars, Grid for page layouts. |
| What is specificity? | The browser's priority system: Element (0-0-1) < Class (0-1-0) < ID (1-0-0) < Inline < !important. |
What is position: sticky? | Behaves like relative until a scroll threshold, then becomes fixed. Great for sticky headers. |
JavaScript Interview Questions
| Question | Key Answer Points |
|---|---|
let vs const vs var? | const = can't reassign. let = can reassign, block-scoped. var = function-scoped, hoisted (avoid it). |
| What is a closure? | A function that "remembers" variables from its outer scope even after the outer function has returned. |
| What is the event loop? | JS is single-threaded. The event loop processes the call stack, then microtasks (Promises), then macrotasks (setTimeout). |
== vs ===? | == converts types before comparing ("5" == 5 is true). === checks type AND value ("5" === 5 is false). Always use ===. |
What is async/await? | Syntactic sugar over Promises. async marks a function, await pauses until a Promise resolves. Always wrap in try/catch. |
var."