Setting Up Your Coding Tools
Before you can start coding, you need to set up your coding tools.
Be sure to create or install all of the following listed below:
Setting Up Visual Studio Code
For this course, you will be working in a integrated development environment (IDE) called Visual Studio Code.
This is where you will write and run your code.
We have created a Visual Studio Code installation guide for you to follow.
Setting Up Your Terminal
We will be using the terminal to keep track of our code. You will need to make sure that your terminal is set up.
This tool is used for giving commands to your code to run or start. This tool is also used to help track the status of your code as you work on it. We will learn about it more in later chapters.
We have created a Terminal installation guide for you to follow.
Setting Up Node.js
Once your terminal has been installed, you will need to install
Node.js. This will install the NPM Command Line Interface (CLI), which will allow you to run specialized commands in your terminal.
We have created a
installation guide for you to follow.
Setting Up Git
In the terminal, we will be using Git. Git is a version control tool, or a way to track and manage changes in your code. We will explore it more later in this course. In the next section of this chapter, you will learn the basic git commands needed to work with the codebases in this course.
We have created a Git installation guide for you to follow.
Creating Your GitHub Account
GitHub is an online software development platform that can store your code and help you track changes in its development using Git. The majority of the code you will use in this course is stored on GitHub. As an online platform, GitHub makes it easy to share code between developers, development teams, and potential employers.
We use GitHub to hold all of the starter code for this course in ‘repositories’, or ‘repos’. A repository is just a place to keep code online, where multiple people can see and edit it. Starter code is usually code that is lacking functionality or a complete solution. We often provide stater code for examples, exercises, studios, and graded assignments. You will work on completing the code as you work through this course. You will use GitHub a lot in this course.
You will need to sign up for a free account using your email.
Your GitHub account username is something that you may share with other developers. This article can offer you some guidance with deciding on your username.
In order to work with the starter code for this course, you will need to take some extra authentication steps so your computer can securely communicate with GitHub. This will mean either creating a Personal Access Token or SSH key .
Github Personal Access Token will act as a password when you are sending requests to
Github. Should you decide to create a personal access token, you will need to enter in your username and password when pushing new code to your repositories.
Should you choose to create a new
ssh-key, you will not need to enter in your Github username or personal access token when sending requests to Github from your computer.
Only one of the above methods of authentication is required.
Creating Your GitHub Personal Access Token (PAT)
GitHub has more information on PAT and Managing your personal access tokens .
To create your PAT, we suggest following their walkthrough: Creating a personal access token (classic) .
A few tips when creating your PAT:
- Provide a note about this PAT. This will help you remember what you are using it for.
- You can set your PAT to never expire. This is not the best practice, but you are able to do it. We suggest using the Custom… option and setting it for a year.
- When you are asked to Select scopes the only checkbox you should need is the repo box. This is the only scope you will need for this class.
- Scroll down to the bottom of the page and click the green box to generate your new token.
- You will see your new token. Be sure to save your PAT somewhere secure, like a password manager and not a word document. You will need to enter it in your terminal in order to access course repositories. You will use it on the next page of this book, so keep it close.
Once you have created a new
Personal Access Token be sure to read information about
how to use a personal access token on the command line
Creating Your Github SSH Key
As an alternative to interacting with GitHub via HTTPS, developers can use the SSH protocol instead. A description of the differences between HTTPS and SSH is beyond the scope of this text. However, we don’t need to understand the nuts and bolts of SSH. We just need to be able to use it.
With an SSH key, you can connect to your GitHub repositories without needing to enter your username and PAT each time you push, pull, or perform some other action. This sounds great! The drawback is that it takes more work to set up.
As we mentioned before, this book assumes that you are using the HTTPS protocol. However, the GitHub developers make it easy to use either one. If you would like to explore how to create an SSH key, here are the relevant instructions:
- General info about GitHub and SSH
- Generate a new SSH key
- Add the SSH key to your GitHub account
- Protecting your SSH key
For each page, make sure you click on the tab that matches your operating system (Mac, Windows, Linux).
Sounds like you are ready to start coding your first program.