# Setting up your Dev Environment
There are five primary tools you'll use during your time at DigitalCrafts:
- Your laptop and a Unix terminal (Terminal.app on Mac or WSL/Ubuntu on Windows)
- The Google Chrome web browser
- The Visual Studio Code text editor
- The Python development environment
- The Homebrew package manager on Mac/APT package manager on WSL/Ubuntu.
- The Node.js development environment
# Your Laptop and the terminal
Over the last decade, the Mac has become a first-class development machine. It has a top-notch user interface and supports all of the best tools for building and designing apps for web, mobile, and desktop. Recently, Windows has added the "Windows Subsystem for Linux" which gives you access to the Linux operating system (usually Ubuntu) directly via Windows.
Under the hood, MacOS operating system shares a lot in common with the servers that power the internet. In many instances, Ubuntu Linux literally IS the server operating system that powers the internet (there are many flavors of linux, Ubuntu being one of the most popular). During this bootcamp, you'll learn how to take advantage of this powerful blend of capabilities.
The terminal gives you a command line interface, allowing you to interact with your computer the same way you would a cloud server. There is no need to download anything on a Mac, it comes pre-installed with MacOS. Windows PCs will need to have the Windows Subsystem for Linux (WSL) and install Ubuntu.*
*You might also be able to run most things via "Git Bash," but using WSL will give you the closest experience to running Ubuntu proper.
# Installing Chrome
Download and install Google Chrome, or update Chrome if you have already installed it. Chrome is the browser of choice for web developers. It provides a fast browsing experience, support for the newest APIs, and cutting-edge developer tools. I'll walk you through a short demo of its capabilities.
# Installing Visual Studio Code
Download and install the Visual Studio Code text editor (also known as "VS Code" or just "Code"). VS Code is an open-source text editor created by Microsoft. It has some of the best features of many similar editors like Sublime Text and Atom, but with better support, bi-monthly updates, and a plethora of robust extensions. As with Chrome, I will show you some of the features today, and will continue to do so throughout the course.
# Bonus: install the Visual Studio Code command line tool
Open VS Code and then:
- Press
Command + Shift + pto open the Command Palette. In the Command Palette, type the text "shell command" The top result should be "Shell command: Install 'code' command in PATH - Make sure this result is highlighted and then press the
returnkey. - You should now see an info window saying that the shell command was successfully installed.
- With the command line tool install, you can open files and folders in VS Code directly from the Terminal.
WARNING
MacOS: be sure to move your executable file into the "applications" folder!
# Installing Python
Download and install Python 3.8.1. Be sure to grab the appropriate version for your operating system.
WARNING
Alternate Option: If you're using a MacBook, you can install Python via Homebrew...
# Installing Homebrew
There are some programs you'll only be able to install via the command line. While that sounds daunting, there's a free helper program you can use to do the heavy lifting for you. It gives you easy access to a whole world of open-source utilities.
Follow the installation step near the top of that page.
It's going to take a while, so get a cup of coffee -- or better yet! Help the person next to you if they've hit a rough patch.
Once it's finished, try using it by installing some handy documentation using this command:
brew install tldr
# Installing nvm and Node.js
JavaScript is the programming language that powers highly interactive websites, but up until a few years ago, it only worked in the browser. Node.js is a development environment that lets you use JavaScript for building everything from desktop applications to servers to robots (yes, robots!).
WARNING
There should be no previous version of Node installed on your computer. If you do, follow these instructions to uninstall it.
And then... In order to install Node.js, you'll need to first install nvm. nvm is a Node.js version manager, which is the way I recommend you install Node.js because it allows you to install 3rd party Node packages without having superuser privileges, which will protect you against unneeded harm. I know it seems more complicated than it needs to be, that's how it is is the software world. Don't worry, I'll walk you through it step by step.
Open your terminal: Command-Space to bring up Spotlight Search, type in "Terminal" and press the return key.
Install nvm by pasting in this code into your terminal:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
and then press the return key.
Close this terminal and open a new one. Type this command in your terminal: nvm install node
Press the return key to run the command.
You should see that nvm is downloading and installing the latest version of node!
# Bonuses
# Window Manager: Spectacle
Download and install Spectacle for your Mac. It's free and lets you position and rearrange windows via keyboard shortcuts.
# Terminal Emulator: iTerm2
Download and install iTerm2 for your Mac. It's like a supercharged Terminal program that allows you to split screen your terminal windows, easily load tabs, and loads of other cool stuff!