Lecture 1: DrRacket and arithmetic
1 Welcome!
This here Web site is where we post most information about the course, including all assignments. Before each lecture, you will prepare by studying a Web page like this one. There are several sections on the page, each with videos for you to watch. After each video, there are some quick exercises to check your understanding. Do the exercises before moving on to the next video.
You don’t need to submit anything for this lecture. But starting with the next lecture, you are required to submit the online exercises, so that we can confirm that you are keeping up. This is due by midnight on Tuesday and Sunday before each in-person lecture. We do not accept late homework.
Exercise 1. Watch Abbey describe her experience in this course. She is interviewed by Niyati, an undergraduate instructor who also took the course.
What will happen in this course?
How will you succeed in this course?
Exercise 2. We will use Discord to ask and answer questions, make announcements, and hang out. Sign up with the link we announced on Canvas when the course started. Change your nickname on Discord to the full name you’d like us to use in this class. Then, introduce yourself in the #introductions channel.
If you would like to talk to only instructors on Discord, type /breakout (with a forward slash at the beginning of the message) then hit Enter. This should create a “breakout channel” that only you and the staff can see.
Two safety tips on Discord (actually, on any network): First, enable two-factor authentication (next to your password setting). Second, don’t open any download you receive through a private message.
2 Practicing computer science
Just as with learning to do something with your body like playing a new sport, in order to learn computer science, it is not enough to watch other people play or to photocopy the sweat stains they leave behind. You have to practice yourself. You have to sit in front of a computer and make mistakes, as well as talk to people, read articles, write. This course will require you to do all of these things.
Two lecture assignments, due online at midnight on Tuesday and Sunday. (To prepare for some lectures, there is an additional reading assignment that requires you to read articles that are many pages long.)
Two lecture sessions on Monday and Wednesday. Lectures will meet in person.
One problem set, due online at midnight on Wednesday. Start early.
One lab, on Thursday or Friday. Each lab will come with a set of exercises to practice what you learned that week. Labs will meet and be graded in person.
3 Download and install DrRacket
If you’ll be using your own computer for any of the work in this course, you need to install DrRacket. Follow the instructions on this page to download and install DrRacket. It’s available for any platform you might want.
Start DrRacket (not Racket). In the lower-left corner, choose the language Beginning Student, because that is the language we will be using. In the upper-right corner, click the Run button, so that the change takes.
4 DrRacket as a calculator
5 Chaining operations
6 The definitions window
579 1368 5790 1368
7 Comments
; Exercise 3 ; Exercise 4 ; Exercise 5 ; Exercise 6
8 Stepping
The code written in the videos above is available for your reference. To download it, don’t use “Save Page As” or “Save As”; use “Save Link As” or “Download Linked File” in your Web browser. If you can’t find the command, try right-clicking or two-finger-tapping or long-pressing.
9 Images
(require 2htdp/image)
; overlay : Image Image -> Image ; underlay : Image Image -> Image ; above : Image Image -> Image ; beside : Image Image -> Image ; place-image : Image Number Number Image -> Image
Add your formula for combining the images to the bottom of your Definitions, so that when you click the Run button, the Interactions Window shows 4 numbers followed by 1 composite image.
10 Making images
11 Definitions
That’s it for this lecture!
Optional: Read the Prologue and Chapter 1 of the textbook.