4: Code Setup
Learning Targets
I can install and configure VS Code for web development
I can use Live Server to preview my websites locally
I can collaborate with others using Live Share
I can manage my code with GitHub Desktop and GitHub Classroom
I can follow a proper Git workflow (commit, push, pull)
I can use professional templates as starting points for projects
Why Do We Need All These Tools?
Think of web development like building a house. You wouldn't just show up with a hammer and start swinging – you'd need a complete toolkit, blueprints, and a way to work with others. Your development environment is your complete toolkit for building websites.
Here's what each tool does:
VS Code: Your code editor – like Microsoft Word, but designed specifically for writing code
Live Server: Instantly preview your website as you work – no need to constantly refresh
Live Share: Collaborate in real-time, like Google Docs but for code
GitHub Desktop: Manage versions of your code and sync your work across computers
GitHub Classroom: Submit assignments and receive starter code
Together, these tools create a professional workflow that real web developers use every day.
Installing VS Code
Visual Studio Code (VS Code) is a free, powerful code editor created by Microsoft. It's become the industry standard for web development.
Download and Install VS Code
Click the big Download button (it will automatically detect your operating system)
Once downloaded, run the installer
Follow the installation prompts (the default settings work great)
Launch VS Code when installation completes
First Launch Tips:
VS Code might ask if you want to install recommended extensions – say yes!
You can customize the theme (dark mode is popular) by going to File > Preferences > Color Theme
The interface might feel overwhelming at first – that's normal! You'll get comfortable with it quickly.
Essential Extensions: Live Server and Live Share
Extensions are like apps for VS Code – they add powerful features that make development easier.
Installing Live Server
Live Server automatically refreshes your webpage whenever you save changes. No more manually hitting refresh!
Installation Steps:
In VS Code, click the Extensions icon in the left sidebar (it looks like four squares)
In the search box, type
Live ServerLook for "Live Server" by Ritwick Dey (it should be the top result)
Click the Install button
Once installed, you'll see a "Go Live" button in the bottom-right corner of VS Code
Using Live Server:
Open any HTML file in VS Code
Click the Go Live button in the bottom-right corner
Your default browser will open with your website
Make changes to your code, save (Ctrl+S or Cmd+S), and watch the page automatically update!
Installing Live Share
Live Share lets you collaborate with others in real-time. It's like Google Docs for code – multiple people can work on the same files simultaneously.
Installation Steps:
In the Extensions panel, search for
Live ShareLook for "Live Share" by Microsoft
Click Install
You'll need to sign in with your Microsoft or GitHub account
Follow the prompts to complete the authentication
Why Live Share Matters: This is your primary way to get help! When you're stuck, you'll share a Live Share link with me via Google Chat, and I can join your workspace to help you debug or work through problems together. Later in the course, you'll use Live Share to collaborate on group projects.
Installing GitHub Desktop
GitHub Desktop makes version control visual and easy to understand. While professional developers often use command-line Git, GitHub Desktop provides a friendly interface that helps you learn the concepts.
Download and Install
Download GitHub Desktop for your operating system
Run the installer
Launch GitHub Desktop
Sign in with your GitHub account (create one if you don't have it yet)
Why GitHub? GitHub is where developers store and share code. Think of it as a combination of:
Save points: Like saving your game – you can always go back to previous versions
Cloud backup: Your code is safe even if your computer crashes
Collaboration: Work with others without emailing files back and forth
Setting Up GitHub Classroom
GitHub Classroom is how you'll receive and submit assignments in this class.
Accepting Your First Assignment
I'll share a GitHub Classroom link (it looks like:
https://classroom.github.com/a/...)Click the link and authorize GitHub Classroom to access your GitHub account
GitHub will create a repository (repo) for you – this is your personal copy of the assignment
Click the green Code button, then Open with GitHub Desktop
Choose a location on your computer to save the project
Click Clone
What Just Happened? You now have a copy of the assignment on your computer that's connected to GitHub. Any changes you make can be synced back to GitHub, where I can see your work.
Opening Your Project in VS Code
In GitHub Desktop, with your repository selected, click Repository > Open in Visual Studio Code
Alternatively, in VS Code, go to File > Open Folder and select your cloned repository folder
Now you're ready to start coding!
Collaboration and Getting Help: Using Live Share
When you need help, follow this process:
Starting a Live Share Session
In VS Code, click the Live Share button in the bottom status bar
Click Start collaboration session
VS Code will generate a unique link and copy it to your clipboard
Send this link to me via Google Chat
I'll click the link and join your workspace
What I Can Do in Your Session:
See your code and files
Edit alongside you (like Google Docs)
Help debug problems
Answer questions about your code
Important: Always start a Live Share session before asking for help. Don't just say "I'm stuck" – say "I'm stuck with [specific problem], here's my Live Share link: [link]"
Using Live Share for Group Projects
Later in the course, you'll work on group projects. Live Share makes this easy:
One person hosts the Live Share session
Team members join via the link
Everyone can edit simultaneously
Changes are saved on the host's computer
The host is responsible for committing and pushing changes (more on that next).
The Git Workflow: Commit, Push, and Pull
This is the most important section to understand. Proper Git workflow prevents lost work and merge conflicts.
The Golden Rules
At the END of every work session:
Commit your changes (save a snapshot)
Push to GitHub (sync to the cloud)
At the START of every work session:
Pull from GitHub (download any changes)
Why This Matters
Imagine you work on a project at school, then go home and work on it there. If you don't push at school, your home computer won't have your latest work. If you don't pull at home before starting, you might be working on an old version.
Step-by-Step Git Workflow
Committing Changes (Creating a Save Point)
After working, save all your files in VS Code (Ctrl+S or Cmd+S)
Switch to GitHub Desktop
You'll see a list of changed files on the left
In the bottom-left corner, write a commit message describing what you did:
Good: "Added hero section with background image"
Bad: "stuff" or "changes"
Click Commit to main
Think of commits like save points in a video game – you can always go back to any commit if something breaks.
Pushing to GitHub (Syncing to the Cloud)
After committing, click Push origin in GitHub Desktop (top-right area)
This uploads your changes to GitHub
Now your work is backed up and I can see your progress
Pulling from GitHub (Getting Latest Changes)
At the start of each work session, open GitHub Desktop
Click Fetch origin (top-right)
If there are changes, click Pull origin
Now you have the latest version of your code
When You'll Use Pull
Different computers: When you work at school then at home
Group projects: When a teammate makes changes
My feedback: When I make changes to your code during help sessions
Common Mistakes to Avoid
❌ Don't forget to push at the end of class – your work won't be backed up ❌ Don't start working without pulling first – you might create conflicts ❌ Don't write vague commit messages like "update" or "fixed stuff" ❌ Don't work directly in the GitHub website – always work locally and push
✅ Do commit frequently (every major change) ✅ Do write descriptive commit messages ✅ Do push at the end of every session ✅ Do pull at the start of every session
Using Templates to Build Faster
Just like Bootstrap helps us build responsive websites faster, templates give us professional starting points for our projects.
Why Use Templates?
Professional web developers don't reinvent the wheel for every project. Templates provide:
Professional design: Beautiful layouts created by experienced designers
Tested code: Proven structures that work across browsers
Time savings: Focus on customization instead of starting from scratch
Learning opportunities: Study how professionals organize and style their code
StartBootstrap.com (Free Templates)
For most projects this semester, we'll use templates from StartBootstrap.com.
How to Use a StartBootstrap Template:
Browse https://startbootstrap.com/
Find a template that fits your project
Click Download on the template's page
Unzip the downloaded file
In GitHub Desktop, copy the template files into your assignment repository
Commit and push the files
Open in VS Code and start customizing!
What You'll Customize:
Text content (replace placeholder text with your own)
Images (swap demo images for your own)
Colors (modify the CSS to match your design)
Layout adjustments (add or remove sections as needed)
ThemeForest.net (Premium Templates)
For final projects, we'll explore premium templates from ThemeForest.net. These offer more sophisticated designs and features.
The Template Philosophy: Templates aren't "cheating" – they're professional practice. The skill is in:
Choosing the right template for your needs
Understanding how the template works
Customizing it to make it your own
Adding unique content and features
Think of it like music: you learn to play by practicing songs others have written, then eventually you compose your own.
Putting It All Together: Your Daily Workflow
Here's what a typical work session looks like:
Starting Your Session
Open GitHub Desktop
Click Fetch origin, then Pull origin if there are changes
Click Repository > Open in Visual Studio Code
Start the Live Server (click "Go Live")
Begin coding!
During Your Session
Make changes in VS Code
Save frequently (Ctrl+S or Cmd+S)
Preview automatically updates in browser
If you get stuck, start a Live Share session and send me the link via Google Chat
Ending Your Session
Save all files in VS Code
Switch to GitHub Desktop
Review your changes
Write a descriptive commit message
Click Commit to main
Click Push origin
Verify the push completed (the button changes to "Fetch origin")
Never leave class without pushing! This is the #1 cause of lost work.
Key Takeaways
Remember these essential practices:
VS Code + Live Server = Your coding environment with instant preview
Live Share = Your collaboration and help tool (always include the link when asking for help!)
GitHub Desktop = Your version control and backup system
Commit + Push = Your end-of-session ritual
Pull = Your start-of-session ritual
Templates = Your professional starting points, not shortcuts
Last updated
Was this helpful?