Lab 1 - Development Environment Setup
This first lab is really just a chance for you to get your programming tools installed and running with me in the room acting as technological and emotional support. Programming typically requires several tools working together, and getting everything setup can sometimes (often) takes a bit or work. It’s just a part of the game, and you need to have a bit of patience with it. I’ll walk everyone through things as a group and individually as needed. Don’t get stressed. This is your first time working these tools. It’ll be messy. You’ll get it with practice. Do not hesitate to ask questions as you/we go.
The Tools
When you’re not working with RuneStone, you’ll be using powerful, professional level program development tools. This is a blessing and a curse. Once you learn how to work with them, they will make your lives a lot easier. Until then, they might feel overwhelming because they do much, much, much more than you need them to for this class.
It’s very important to understand what the individual tools are and what role they play. The main tools you’ll be using are:
- Python A programming language, but also the name of the program that reads and executes code written in the Python programming language. Such programs are called interpreters.
- Git A program that manages versions of code. Think file saves on steroids. We’ll use it to manage assignment distribution and collection. A git repository, repo for short, is the collection of files for a program along with hidden files that track and maintain your version history.
- GitHub A website/service that hosts git repositories and provides extra tools for managing software projects.
- VS Code A highly customizable program that integrates all the tools programmers need. Once everything is setup, this is pretty much the only thing you use directly; it will interface with everything else.
- GitHub Classroom A service within Github targeted at education. It’s where labs and assignments that are not done through RuneStone are managed.
Getting the Tools
First you’ll need to download and install the core tools: VS Code, Python, and Git. Once that’s done, you should make a github account. At that point, you can move on to installing VS Code extensions that will let VS Code interface with Python, Git, and Github. When installing the software, default settings are fine.
Your ToDo List
- Download VS Code
- Download Python
- Download Git
- Create an account on Github
- Install Python
- Install Git
- Install VS Code
- Install Python Extension for VS Code
- Install Github Extension for VS Code
Once you believe everything is installed correctly, we’ll test it by going through what will be our regular workflow for programming assignments. Expect to lots of extra setup and configuration stuff to pop-up as we use the tools for the first time.
Our Typical Workflow
For this class, when working outside of RuneStone, you’ll typically do the following:
- (Email/Web-browser) Accept the initial assignment from Github Classroom via a link provided by instructor
- (VS Code) Use VS Code to Clone your Assignment
- (VS Code) Work!
- (VS Code) When it makes sense, commit your work to your local repository.
- (VS Code/Web-browser) When you want to backup your work, get feedback from assignment autograding, get feedback from the instructor, or submit your work, then sync your local work with github.
For today’s lab, you’ll receive a completed program that plays a number guessing game with the user. You’ll run and make a simple modification to this program and thereby learn how to interact with python through VS Code. You’ll then submit your changed program using Git and Github, again through VS Code. Finally, you can check on your submission via GitHub in the browser.
Your ToDo List
- Accept Lab 1 Assignment (click this!)
- Clone the Assignment from Github
- Run the program. Play the guessing game.
- Replace my name with yours in the python file. Save file.
- Change the max guess from 3 to 10. Verify the change. Save file.
- Commit the changes to the code.
- Sync the commit to GitHub.
- On Github, view Actions to see AutoGrader Results. If all tests passed, you’re done! If not, fix code, save, commit, and sync until they pass.
Now Breathe
You’ve now completed the assignment acceptance and submission process! Congrats! It may have gone smoothly or may have been real rough. All that matters is that you got it working and you now know you have the tools you need to navigate this course and learn to program. With practice, you’ll get comfortable with the tools and the workflow that you went through today will become second nature.
Learning Resources
Here are several sites worth bookmarking. While it’s tempting to google all your problems, it’s important to work with the official documentation for all your languages and tools. For now, just check these out, see if something interests you, and generally take not of what kind of information is provided by these resources.
- Official Python Documentation - All the gory details about Python.
- Pro Git - Free Book on Git
- Github Guides - Even More about Git and Version Control
- VS Code Docs - All the things about VS Code
- VS Code + Git - Docs on Git Integration
- VS Code + Python - Docs on Python Integration