Skip to main content

CSC 151.01, Class 02: Getting started with Linux and Scheme

Overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Extra credit
    • Questions
  • A bit about algorithms
  • Getting started with Linux
  • Using DrRacket (and a bit of Scheme)
  • Debrief

Preliminaries

The “start of class algorithm”

  • Take any handouts.
  • Grab a card.
  • Read the name of the workstation and its location.
  • Attempt to determine where that workstation is.
  • If you have difficulty, ask the instructor or mentor.
  • Put the card in the jar.
  • Make your way to the indicated workstation
  • Have a seat
  • If you are the second person there, introduce yourself.

News / Etc.

  • Today should be mostly a laboratory day.
    • We think you often learn better from doing than by listening.
    • Reflecting is good, too.
  • But I have a larger-than-normal number of preliminaries to get through.
  • Welcome to Mike Conner, our awesome SysAdmin
    • He has accounts and passwords for you.
    • Change your password soon!
    • MathLAN uses a different account system than the rest of campus. Same username, different password. Deal with it.
    • Try logging in.
    • Then log out and let your partner log in.
    • Then have them log out.
  • Reminders:
    • You are in CSC 151
    • I’m Sam (or SamR)
    • Your class mentors are Sally and Shelby
  • You should have received four handouts at the start of class.
  • When you speak in class, please say your name first.
  • Contact Sam if you would like to be on the department mailing list.

Upcoming work

  • Assignment 2 due Tuesday night.
    • Your partner for today is your partner for the homework.
    • You should make plans as to when you will work on the assignment together, presumably in this room or the neighboring one.
  • Readings (online), due before class Friday.
  • Signed academic honesty policy due in class on Friday.
    • If you are uncomfortable signing it, make an appointment to chat with me.
  • Quiz Friday!
    • Components of algorithms
      • Sample Q: Identify the parts in the following algorithm
      • Sample Q: List the N parts of an algorithm
    • Very basic Scheme
      • What will the output of the following expression be?
    • Review sessions starting next week.

Extra credit (Academic/Artistic)

  • Convocation tomorrow! Democracy at the Roots: Culture and Sovereignty in Haiti
    • Sam riffs on the value of convocation.
    • 11:00 a.m. on Thursdays in JRC 101.

Extra credit (Peer)

None yet.

Extra credit (Misc)

Other good things

Questions

What do I have to do with the self checks?
Do them as a mechanism for checking or developing understanding.
Bring questions if you don’t understand.
Be ready to discuss them in class.
What should I do for extra credit?
Attend the event.
Write a one or two paragraph reflection. (I don’t need as much description.)
Email it to me with a subject of “CSC 151.01 Extra Credit (Your Name)” (but without the quotation marks and with your name in place of the words “Your Name”)
What about the Data Buddies Survey
Acceptable. “Dear Sam, I took the Data Buddies survey.”
Less acceptable. “Prof, I took that survey you told me to take.”
Better: “Dear Sam, I took the Data Buddies survey. Are you sure that this was intended for novice students. I found myself a bit nervous about having to answer questions on the culture of the department and the number of academic talks in CS I had to attend.”
Do you always give too-long answers to questions?
Yes.

A bit about algorithms

An opportunity to check in on what you might have learned and what I might not have communicated as well as I might have.

Chat with your partner, and be prepared to do the following.

  • List the “components of algorithms”
  • “Define” each component.
  • Indicate an instance in Monday’s algorithm in which we used that component.

Some context from Sam

  • We look at the components in part so that you can think about what “tools” you have in writing algorithms.

Components of algorithms

  • Variables. When we were doing the butter and preserve algorithm, we named the two slices of bread piece one and piece two. Give names to the things we work with along the way.
  • Subroutines. A set of instructions for accomplishing a task. We expect to apply that subroutine multiple times, usually with different inputs. Example: “How to open a jar.”
    • They are algorithms
    • Just algorithms we expect to use as parts of other algorithms.
  • Repetition.
    • What it says: Doing a task again and again and again.
    • Example: Opening a jar twice.
    • Example: Twist the top counter-clockwise with your non-dominant hand until it (the top, not your hand) falls off.
  • Conditionals. “If something happens, then do something” (also a possible alternate). If the jar is a twist-top, untwist. If it’s a pop top, pop the top. If it’s something else, give up and go get a big cookie from the grill.
  • Input. Data from somewhere else that we use in our algorithm. Sample input: The jar of preserves.
    • We use the term “parameter” for the input to a subroutine.
    • We may also use the term “argument”
    • We may just use the term “input”
  • Output. It’s useful to see what the program computes.
  • Basic (or built-in) values and operations. The already-defined things that the “computer” knows how to do. The building blocks with which I can create my algorithm. We assumed that I could identify different objects (spoon, knife, jar) and differentiate them. We assumed that I could pick up a jar, even if I’m not sure how to differentiate.
  • Sequencing. It’s important that you do things in order. The order may be explicit or implict. “It’s hard to spread the jam if the jar’s not open.”

Questions

  • What’s the relationship of subroutines to repetition?
    • Subroutines are usually a set of instructions (that we anticipate doing again and again)
    • Repetition is the act of doing it again and again and again
  • Can instructions be input?
    • Yes, instructions are a kind of input. The realization of that concept is one of the great ideas of computing.

More algorithms questions

  • We formed groups on Monday.
  • There was an explicit component: Your card determines your group.
  • There was an implicit component: You need to use the card to get with your group.
  • You simultaneously chose to use the algorithm “Shout your number really loudly and make your way to someone shouting the same number.”
  • Is there a better algorithm? Yes: Assign numbers to particular parts of the room. Alternately: “All 1’s raise your card.” “All 2’s raise your card.”

Getting started with Linux

How do I get to the class Web site?
Follow the really long URL.
Go to Sam’s home page at https://www.cs.grinnell.edu/~rebelsky/ and click on the “CSC 151” link at the top of the page (or perhaps elsewhere)
Do a Web search for “Rebelsky Grinnell CSC 151” and cross your fingers.
Go to the department’s home page, click on current courses, and click on this course. (Unfortunately, Sam forgot to set this one up.)
What if there’s not time for both of us to do all of the setup?
We’ll begin Friday’s class with time for you to do that.
What should we do if we finish early?
Make sure that both of you have the opportunity to do the lab, since the lab includes account configuration.
How do I know that the stuff is successfully installed?
The “Close” button becomes available. Click it.
What’s up with lab writeups?
None today.
Should we finish this outside of class?
You can, butyou need not.

Using DrRacket