Week 1 - Introduction to C++ Programming
Learning Objectives
Upon finishing this learning module, you should be able to:
- Describe how a C++ program goes from source code to working program
- Identify the functions of basic components of a C++ program
- Use assignment and use the basic math operators
Recommended Schedule
You have a lot of freedom to choose when you get the work done each week.
There is a recommended schedule below to help you break up the work into manageable chunks. Trying to do all of your learning in one monster day of studying tends to be much less effective than working on smaller chunks of the material more often.
Although the major assignments are always due at the start of next week, there are often mid-week deadlines for other work (check Canvas for all due dates), so you can't wait until the weekend to get everything done.
If your schedule requires you to do most of your work for this class on the weekend, you should try to work ahead on the next week each weekend rather than playing catchup from the previous week. That way you have plenty of time to ask questions and get any needed help before your assignments are due.
Day 1
- Course Intro and Policy Quiz
- Access Book
- GenAI and You
- Start C++ & Development Basics (Ch 2.1-2.4)
Day 2
- Complete C++ & Development Basics (Ch 2.5-2.11)
- Do Ch2 exercises
- Set up a codespace
Day 3
- Variables and Operators (Ch 3.1-3.12)
- Work on Ch 3 exercises
Day 4
- Development Intro (Ch 3.13-3.15)
- Do assignment 1
Course Intro
If you have not already watched the course intro video, do so now:
In Canvas, review the syllabus and take the class policies quiz. You can take it as many times as you like before the deadline. So make sure to get 100% on it!
Access Book
Watch this video to see how to use the book and complete the book based assignments.
Videos with the notice "Important Video" contain information that is NOT covered in the book. You should make sure to watch these videos.
Videos that do not have that notice are optional supplements to the book material.
Not all assignments will be completed in the book. Canvas (Elearn) should be your primary source for assignments and due dates.
GenAI and You
Generative AI is a powerful tool for programmers. It can also be a helpful tool for learning computer science. However, in both contexts, there are downsides and risks to be aware of.
There are many ethical and practical considerations in regard to Generative AI. Was the training data obtained ethically? Are there biases in the training data? Is the output correct? Is it secure? Who benefits from automating labor that a human might otherwise do?
But from a very immediate perspective, you should be concerned about what your goals are in a CS course and how using Generative AI might hinder your ability to meet those goals.
This video discusses some of these issues and provides guidance on how to use (and not use) Generative AI effectively as part of your learning process.
C++ & Development Basics
Work through Ch2.1-2.10.
This video talks through the Hello World example on 2.4 and demonstrates using the ActiveCode widget in the book:
Set Up a Codespace
To start with, we will be using GitHub Codespaces as our development environment. Eventually, you will learn how to set up a C++ development environment on your own computer, but Codespaces provide a simple way to get started programming in C++. They also have the advantage of allowing you to access your work from any computer with a web browser.
See the Codespaces guide for instructions on how to set up and use a Codespace.
I recommend setting up a Codespace that you use for testing. Any time you just want to test out a code sample or do an experiment, use your test Codespace. By reusing that same Codespace, you avoid having to spin up a new Codespace each time you want to test something.
When you are working on an assignment you will submit, create a separate Codespace for that assignment.
Using VS Code
Whether you are using a Codespace or, later on, a local installation, we will be using VS Code as our primary programming environment. This video introduces how to use it to write and run code:
Variables and Operators
Work through Ch 3.1-12.
The Debugger
The debugger is a CRITICAL tool for learning programming. This video shows how to use the debugger in a Codespace.
Development Intro
Read Ch 3.13-3.15.
Do Assignment 1
Start working on the first submitted assignment. It is listed as "Assignment 1" in Canvas.
Most weeks will include an assignment you will complete outside of the book and submit in Canvas. As part of starting the first assignment, you should make sure to read this document about the work history you must submit as part of every assignment.
There is a video in that document that shows how your work history is documented and how to inspect that history.
When you are complete, here is how to submit your assignment: