Lab 1:   up and running
1 Getting Started
2 Intro Survey
3 Starting Dr  Racket
3.1 If you’re using the Lab Machines
3.2 If you’re using your own Laptop
4 Once Dr  Racket is running
5 Beginning of Prologue
6 Tiny Exercises
6.11.0.2

Lab 1: up and running

At the end of this lab, you should:
  • be able to start up DrRacket,

  • be able to run trivial programs (numbers, strings),

  • have completed the intro survey,

  • be able to translate simple expressions into Racket, and

  • have combined graphical operators to make a simple picture.

In this lab, you’re going to be writing a whole bunch of simple code. One note: don’t delete earlier code when you go on to later parts; just leave the code there in the definitions window, so that I can see it all when it’s time to grade it.

Please use comments to indicate which problem you’re solving.

1 Getting Started

The first thing you need is to find a computer, and sit down in front of it, and make sure you know the names of the people on both sides of you.

You’re welcome to use your own laptop, it should work fine. You should still find out the names of the people sitting next to you.

In the following instructions, I’m going to try to explain absolutely everything. Feel free to skim a paragraph if you don’t need that explanation.

The lab machines in this class are running the "Linux" operating system. The "operating system" is essentially the "master" program that a computer runs; it’s a program that allows you to run other programs, and supervises the resources of the machine. "Windows" is Microsoft’s popular operating system. "OS X" runs on Macintoshes. "Linux" is a free, open-source operating system that many people prefer.

Before you do anything else, you need to "log in" to the computer. These machines—like most machines these days—are configured to behave differently depending on who’s "logged in." So: you provide your name ("login") and password, and the computer then sets up the screen the way you want, and gives you access to your files. For me, for instance, the computer knows to use the "dvorak" keyboard, because I happen to like it.

In order to log in, you’ll need to know your id (colloquially known as your "login"), which will be the first letter of your first name, followed by the first seven letters of your last name. You’ll also need to know your password. In principle, everyone here already knows their login and password. In practice, that has never been the case. Fortunately, the folks that can help you with this are downstairs, in the offices along the back wall of the lab.

The software that we’ll be using to develop our software is called "DrRacket", and it runs on pretty much every major operating system, and should be stable and reliable. *However*, there’s one big caveat; the "rsound" extension that we’ll be using to create and play music is written by *me*. It’s totally not stable and reliable. It will crash. And when it does, it will take down DrRacket with it. This is especially a problem on Windows. You’ve been warned!

2 Intro Survey

Before doing anything else, you should complete the consent form and the first-day survey. See the links on the course schedule page.

3 Starting DrRacket

You’re welcome to use either the lab machines or your own laptop for this class. Follow the instructions for your situation, below:

3.1 If you’re using the Lab Machines

On the lab machines, we’ll be using Linux this quarter. After logging in, you’ll need to start DrRacket.

There are a bunch of different ways to do it. Here’s the one I recommend

3.2 If you’re using your own Laptop

Go to https://www.racket-lang.org. Choose the ‘Download’ link, and follow the instructions to download Racket.

After it’s installed, start the ‘DrRacket’ application (not the ‘Racket’ executable, which is the base layer on which DrRacket is built).

4 Once DrRacket is running

After starting DrRacket for the first time, you’ll need to choose a Language. Choose the "Beginning Student" language from the Language|Choose Language... menu.

5 Beginning of Prologue

Work through the HtDP 2e Prologue. Make sure to have a DrRacket session open while you read, and try all of the examples; correcting the errors you encounter while typing them in will be helpful in later work.

6 Tiny Exercises

These exercises should make sure that what you’re reading is making sense. Show me the results when you’re done. Leave all of them in the definitions window, so that I can see them all. If an exercise asks you an (English) question, write the answer in the form of a comment.