Lab 1:   up and running
1 Getting Started
2 Intro Survey
3 Starting Dr  Racket
4 Getting RSound installed
4.1 NOTE FOR WINDOWS USERS
5 Beginning of Prologue
6 Tiny Exercises
7 Make a Website
6.3.0.7

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.

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

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*.

2 Intro Survey

Before doing anything else, you should complete the two first-day surveys. See the links on the course schedule page.

3 Starting DrRacket

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

4 Getting RSound installed

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.

Next, in order to use sound in DrRacket, you’ll need to have the "RSound" package installed.

First, choose File|Install Package..., and enter "rsound" in the resulting dialog. Click Okay, and wait for it to finish (this should take less than 3 minutes). NB: The installation is finished when the "Close" button is enabled.

Finally, to check whether the installation finished correctly, enter this program into the top ("definitions") window of DrRacket:

(require rsound)
 
(play ding)

Then, type CMD-R or click the "Run" button to run the program. After about ten seconds, you should hear a ding.

4.1 NOTE FOR WINDOWS USERS

Try these instructions. If you get an error message indicating "device not available", then you probably need to configure your WASAPI device to be "CD Quality", 16-bit 44100Hz sound. To do this, click on the speaker volume icon in the lower right corner, then click on the top icon in that window, then go to the "Advanced" tab, and choose "CD Quality sound".

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.

7 Make a Website

The easiest way to build a portfolio website is to use Google Sites, like this:

Create a google account (if you don’t already have one) Use sites.google.com to create a new site for your CS portfolio.

You may wish to use this portfolio for projects that you tackle in later classes, so I would advise you not to make it CSC123-specific.

When you’ve created this site, add it to the Personal Portfolios page; the link appears on the main course web page.