Link Search Menu Expand Document

Course Setup

  1. Git - Version control to help us collaborate and submit work
  2. Visual Studio Code - Extensible programming text editor with built-in terminal
  3. Python 3.9 - Interpreter for the Python programming language
  4. MySQL - Database engine

NOTE: The leading dollar signs ($) for all commands indicate that they are run from the terminal. You should exclude leading $ from all commands shown.

Git

Windows Installation

You can download the installer for the latest version of Git from https://git-scm.com/.

You can follow this gif for help with the installation, but accepting the defaults is completely acceptable. Note during the install that there is a list of possible text editors you can use to edit your commit messages. The default is a command line text editor (vim) which can be a bit confusing to use, but efficient once you get the hang of it. If you find it too cumbersome, you can change this at anytime.

Windows Git Install Gif

macOS Installation

On macOS, Git comes with the Xcode command line tools package. This package must be installed separately from Xcode itself. To see if you already have it installed, open up the Terminal application. When you open up Terminal, you will be presented with a black window with some text that will probably have your username in it and possibly the name of your computer in a format like this before a cursor:

Computer-Name:~ Username$

The appearance of your terminal could be different, but you should still be able to run commands using this prompt.

When describing commands in the following steps, I will prefix them with a $ character to indicate that this is a command line instruction. You do not need to type in the first $ character.

First try running Git by typing the following command and hit enter:

$ git

If Git is already installed you will see a usage message. If not, a window will pop up asking if you want to install the Xcode command line tools. Install them now if this happens.

After installing the command line tools, you may get the following message:

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

If so, run this command:

$ sudo xcodebuild -license

You will be prompted for a password, enter the password for your computer. You can scroll through the license by pressing the spacebar, and press q to stop reading the license. You will then need to type agree and press the enter key. Once you have completed this, try running git again.

Configuring Git (One Time Only)

After you install Git on your computer, you have to run a few quick commands to setup your profile. This will help git store your name and email address you want associated with the commits (checkpoints that save your work) you make. The following

Commands:

$ git config --global user.name "YOUR NAME"
$ git config --global user.email scot@wooster.edu

Visual Studio Code

You can download and install Visual Code by downloading the installer here: https://code.visualstudio.com/. If you are using Windows, you should change the default terminal in Visual Studio Code to CMD.

Python 3.9

Python 3.9 is currently the best supported version of python for the tools we will be using in class.

Windows Installation

Visit the Python download page and make sure to scroll down to the section that says “Looking for a specific release?” and click download for the Python 3.9 version. Scroll to the bottom of the download page and click the “Windows installer (64-bit)” link. When running the installer make sure to add Python to your path. The Python installer might also offer you the option to “Disable path length limit” which you should also do.

What if I have multiple versions of Python installed?

macOS Installation

The best way to install python (and some of our other tools) is via Homebrew. Homebrew is a very convenient packagmanger for MacOS that will let you easily install and update programs and development libraries/tools. You can find out more about Homebrew and how to install it from the homebrew website.

Once you have homebrew installed, you can open a terminal and run the following command to install Python 3.9.

$ brew install python@3.9

NOTE: The command to use this version of Python on your mac is python3. Running python will run Python 2.7 which is the old default version and it will not work with the code we are writing.

MySQL

MySQL can be installed directly or via Docker

Docker

Docker can be downloaded from Docker

Running MySQL

After installing Docker you can start MySQL in the terminal as follows:

  • Download MySQL image
docker pull mysql:latest
  • Start MySQL instance
docker run --name cs232-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=cs232-pw -d mysql:latest

More details here

Connecting to MySQL

We will be using DataGrip to interact with the database. The simplest way to install it is by using JetBrain Toolbox

Install DataGrip

  1. Install JetBrain Toolbox
  2. Create a JetBrain account using your .edu email. This way you will have access to all their tools for free.
  3. In JetBrain Toolox select and install DataGrip
  4. In DataGrip create a new project File> New > Project and choose your name (ex. cs232)
  5. Add a new data source: File > New > DataSource> MySQL
  6. Fill in:
    1. username = root
    2. password = password set above when running Docker (ex. cs232-pw)
    3. Name of the connection: cs232
    4. Tap Test Connection
    5. Tap save

Adding Data Source