Eboard 01: Getting started

You are probably being recorded.

Approximate overview

  • Preliminaries
    • Notes and news
    • Upcoming work
    • Extra credit
    • Questions
  • Course goals
  • Course structure
  • ADTs and data structures
  • A quick intro to object-oriented design
  • Designing a stack ADT (an exercise)

Preliminaries

  • Consider grabbing a mask.
    • Even before covid, post winter break was full of illnesses.
    • The graphs I’ve seen suggest that covid incidence is rising.
  • Sit where you’d like, within reason.
  • If you don’t know the people next to you, please introduce yourselves.

News / Etc.

  • Welcome to CSC207!
  • I’m Sam (or SamR)
  • Our class mentor is Elene Sturua
  • We’ll be using two “books” for this course: The readings I write (or wrote) and CLRS.
  • I type class notes in markdown and post to the Web site.
    • It’s like magic (I hope).
  • You will find that I call on students randomly using a set of cards with your names on them.
    • I use this process to give you practice “thinking on your feet”, as it were.
    • I also use this process to help everyone realize that they are not the only one who is puzzled.
    • And I use the process to push you a bit.
    • Feel free to say “I’m not sure” or “I’d prefer not to answer.”
    • If you don’t want to be called on in class, please let me know.
  • We are a community. Treat each other with respect. If you (think you) know more than your partner, support, don’t overwhelm.
  • Sam has some personal issues. There may be some hiccups in the class.

Upcoming work

Tokens

I don’t know what your prior experience with tokens is. I give them for academic/scholarly events, cultural events, peer events, wellness events, and a few other things. Only those I record in the daily eboards are available. Please log them within three days.

Academic/Scholarly

  • Friday, 2024-01-26, 6:00–7:30 p.m., JRC 101. Celebration of MLK day with Alan Page.

Cultural

  • Saturday, 2024-01-27, 11:55 a.m.–3:55 p.m., Harris Cinema. Met Opera presents Carmen.

Peer

  • Saturday, 2024-01-27, 10:00 a.m.–1:00 p.m., Field House. Grinnell Track and Field Invitational.

Wellness

Misc

Other good things

Attendance

  • Since it’s the first day of class, I will take attendance.
    • It will take me at least a few weeks to learn all of your names.
    • _Please say your name before you ask or answer questions.
  • Today’s attendance protocol. When I say your name, answer as follows.
    • “Hi, my name is FORENAME SURNAME.”
    • Optional: “My pronouns are ….”
    • “You can call me PRIMARY_NAME.”
    • “If you must address me by surname, you can call me Mr./Ms./Mx./Sr./Srta./etc. SURNAME [San].”
    • “This semester, I’m looking forward to ….”
    • Optional: A question

Excited about

  • This class (learning Java) [x2].
  • Sucking up to faculty.
  • Only one STEM class.
  • New skills.
  • Schedule. (Only one non-STEM class.)
  • Three classes.
  • No 8am classes. [x4]
  • More classes in major.
  • Grading.
  • Not grading.
  • Not having classes on weekends.
  • Things settling down.
  • Time with friends.
  • Springtime in four months.
  • CS Classes
  • Tennis [x2]
  • Moving forward in the CS major.
  • Taking CS a non-CS major.
  • Know exams. [x2]

Questions

  • What’s the work in the class?
    • Weekly mini-projects (some individual, some group). Goal of 3-5 hours.
      • EMRI
      • First redo is free (for MR).
      • Subsequent redos cost tokens.
      • When Sam is organized, there will be a clear rubric.
    • Portfolio learning assessments (for the most part)
      • E.g., Learning Objective: Parse Input
      • Submit: Code you’ve written + a bit of explanation.
      • All online, arbitrary amounts of time (well, a week)
    • A few LAs will involve a direct question.
    • Free redos on all LAs (as many as you need).
    • Sam will release LAs every week or two, if all goes well.
  • How should we contact you.
    • Preference: Teams
    • Alternate: Email. Send a reminder if I don’t respond within a day.
    • Emergency: Text. 641-990-2947.
    • Serious emergency: Call.
  • How frequent is the group work?
    • Labs (almost) every class.
    • Probably 3/12 mini-projects.
  • How do tokens work?
    • I charge them automatically.
    • You apply for new tokens on a not-yet-available Gradescope problem set.
  • What’s a SoLA?
    • Cruft from an old version of the course. “Set of learning assessments.”
  • Do we have to turn in every individual lab?
    • TBD.
    • Likely the “Sam says stop here” model.
    • Even if I don’t require you to turn in everything, you should still reflect on the remainder (or actually do the remainder).
  • What’s the rhythm of the course?
    • Mini-projects released every Wednesday, due every Tuesday at 11pm.
    • LAs released approximately weekly starting in week two. Released on Friday, due the following Friday (probably late).
  • Are groups for assignments assigned or self selected?
    • Class/lab: Random
    • Mini-projects: Both
  • What’s the late work policy?
    • 1 token for up to two days. Applies to readings, labs, metacognitive reflections, mini-projects. (Not LAs; no late LAs.)
  • What will class time look like?
    • Varies.
    • Basic model one: Sam answers accumulated reading questions then you work on lab in randomly assigned pairs while we wander around and ask you questions. (And answer your questions.)
    • Basic model two: Sam answers accumulated reading questions then ask you some design questions which we do in a Think-Pair-Share (TPS) model.
    • Basic model three: Same first part; something like a tech interview.
  • When are your office hours?
    • Still TBD
    • Feel free to TM me to set up a time.
  • Are there exams?
    • No. The LAs serve as the exam equivalent.
  • What are metacognitive reflections?
    • Required opportuities to reflect on your learning.
    • See the page in handouts.
  • Will we be expected to use Javadoc?
    • Of course.
  • Will we be expected to follow standard style guidelines for writing Java code or can we write random crap like we’ve done in the past?
    • Google Java style guidelines
    • Those specify an indentation of two spaces.
    • Our IDE helps automatically reformat.
  • How much of CLRS will we cover?
    • Not a lot.

Course goals

  • Teach you to be “real” computer scientists.
  • Design and implement algorithms.
  • Analyze algorithms.
  • Design and implement and analyze data structures.
  • Build non-trivial program.

For building non-trivial programs

  • Use OOD
  • Use some standard tools (IDEs, (potentially) build tools, version control systems)

Course structure

See above.

ADTs and data structures

  • Ways of organizing collections of data.
  • ADT (abstract data type): Overall philosophy/methods (the interface)
  • Data structure: Underlying implementation (organize data in memory and the effects of doing so)

Don’t forget to ask me when I use a TLA that you don’t understand.

Designing a stack ADT (an exercise)

We will use the Think-Pair-Share (TPS) approach.

ADT: Use the PUM method for ADTs.

  • P: Philosophy (organizing principle)
  • U: Uses (or use cases)
  • M: Methods

The philosophy of stacks

  • Stacks are collections of data in which you can add and remove data. You add and remove data only at the “top” of the stack.
  • Stacks follow a last-in, first-out policy; the thing you remove is the most-recently-added of the things still on the stack.

Some uses (we could use stacks for …)

  • To-do list: Or maybe not. The first thing you add will be the last thing you do (and you may never get it done).
  • (Helps with building one-to-one functions.)
  • The back button on a standard browser usually keeps track of a stack of the things you’ve seen.
  • Most programming languages have a “call stack”, where they put the context of a procedure on a stack of procedure contexts. This is particularly useful for recursive procedures.
  • Simulating the stack of plates in the dining hall.

Core methods:

  • ??? push(???) - add an element
    • C: void push(string_stack *s, char *str)
    • Requires not full.
  • ??? pop(???) - remove and return an element
    • C: char *pop(string_stack *s); (Requires not empty)
  • char *peek(string_stack *s); - look at the top value, but don’t remove it. (Requires not empty)
  • boolean isEmpty(string_stack *s);
  • boolean isFull(string_stack *s);

Optional methods:

  • void popmany(string_stack *s, int num_to_pop);
    • Who needs for loops? We just want to throw stuff away without looking at it.
    • perhaps char ** popmany(string_stack *s, int num_to_pop);
  • int size(string_stack *s);