On this page:
1 Sign up for Discord
2 Read the Web site
3 Schedule weekly work
4 Create a program that paints a date
8.5

Problem set 1: Paint a date in DrRacket

This assignment is due on Wednesday, January 12 at 11:59pm. Submit it using Handin as assignment ps1. Your submission is only accepted if the message “Handin successful” appears. Corrections can be presented until Friday, February 4.

1 Sign up for Discord

Ask questions on discord. talk with other students about problem sets. start problem sets early. go to office hours.

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). 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 Read the Web site

Read the General section of this Web site. Familiarize yourself with the course policies.

3 Schedule weekly work

According to an anonymous survey of students last semester, students spend at least 5 hours per week on average working on this course, in addition to the required lectures and labs.
  1. Decide when you are going to work on this course every week.

  2. Put at least 2 hours as a weekly appointment on your calendar. If you have never used a calendar, start using one, such as the one on your phone.

  3. Then, enter the time you chose at When2meet. This way, y’all can find study buddies.

4 Create a program that paints a date

Students in H211 should complete all the Extra fun exercises; they are optional and not graded for students in C211.

  1. Open up DrRacket. (Don’t open Racket.) Choose the “Beginning Student Language”.

  2. Put your name at the top of the Definitions area, as a comment. (If you’re not sure how to put a comment, review Lecture 1: DrRacket and arithmetic Exercise 9.) This is the full name you’d like us to use in this class. So, in the steps above, you should have used this name as your nickname on Discord and When2meet.

  3. In a second comment, list the 2 hours you added to your calendar and When2meet above.

  4. Start using the 2htdp/image library, as described in the Prologue of the book. Read all the way to where images are discussed!

    According to the book, you can either “add (require 2htdp/image) to the definitions area, or select Add Teachpack from the Language menu.” Don’t Add Teachpack, because it doesn’t fit how we grade homeworks in this course. Instead, add (require 2htdp/image) to the definitions area. The definitions area is the top half of DrRacket; the interactions area is the bottom half.

  5. Using this library, create a program that paints a date when you hit the “Run” button, like this painting by On Kawara:

    The text "OCT.31,1978" in white, centered on a black rectangular background

    Use the 2htdp/image library, including the text function it provides. Make sure there is some margin space at the border of the date text. Feel free to post your painted date to Discord, without your code.

  6. Extra fun Are you familiar with the abstract painter Piet Mondrian? Using the DrRacket image library, create a digital painting similar to one of his famous works in which he uses few colors (at most black, white, red, blue and yellow) and rectilinear forms. Feel free to vary the palette and make your own abstract painting; or to faithfully reproduce one of his works. You will find the function place-image useful.

  7. Extra fun Using random, modify your On Kawara and/or your Piet Mondrian so that each time you run your program, it’s likely that you’ll produce a different painting.

  8. Submit your definitions area for the first homework, labeled ps1, using Handin. Remember that Handin only submits the definitions area, the top half of DrRacket! Submit to ps1; do not submit to lecture2 or lab1 or test-handin. Your submission is only accepted if the message “Handin successful” appears. If you encounter any trouble, one way to get help is to post a screenshot to Discord.

Note There’s a maximum upload size for an acceptable submission to Handin: 7 MB. Be sure that any image that you’ve included in your file is small enough (you may need to rescale it in an image editor).

Help other students by answering this ungraded question: what did you have to learn to finish this problem set that we didn’t teach? Post your answer to Discord in the #ps1 channel, or put it as a comment at the bottom of your Handin submission.

We’re not going to post a solution to the problem set just for everyone to read, because you have to practice in order to learn. We’re happy to help you work on the problem set and answer any questions regardless of whether the due date has passed.