Eboard 35: Probed hash tables

You are being recorded and transcribed.

Approximate overview

  • Administrivia
  • About MP10
  • Questions
  • Lab
  • Prep for next mini-project.

Preliminaries

  • Please fill in the mentor/tutor evaluation. (you are currently at slightly under 50%; you want tokens/you need tokens)
  • New partners today, no matter what I said on Monday.
  • Good luck to any tennis players heading to competitions over the weekend!
    • And to trackers and fielders heading out for Thursday’s meet.
  • I realize that grades have been slow in getting to you. You will definitely pass the class if you turned in semi-working code for every assignment, even if you got incompletes because of missing files (e.g., README) or bad formatting.
  • I’m working on Friday’s LAs. About half are out there, but have the wrong prompts.

Upcoming work

Tokens

How many tokens do I have?

10,000 each, plus or minus, as long as at least 63% of the class turned in the mentor evaluation.

Academic/Scholarly

  • Thursday, 2024-04-25, 11am, JRC 101. Scholars’ Convocation: Jonathan Rosa on Languages & Identities Beyond Borders.
  • Thursday, 2024-04-25, 4pm, Science 3821. CS Extras: Alex Hubers on the UIowa 4+1 (U2G) program.
  • Thursday, 2024-04-25, 4pm, HSSC N3118. “Beyond Grey Expectations: Seeing Chekhov in Color” by Anna Ivanov.
  • Tuesday, 2024-04-30, noon, Some PDR. CS Table.
  • Tuesday, 2024-04-30, 8:00pm, Science 3819. Mentor Session. Make Elene and Sam happy. Show up to mentor sessions! (Sam and Elene are currently very sad.)

Cultural

  • Wednesday, 2024-04-24, 7:30–8:30pm, Bucksbaum. Cornelia Di Gioia Presentation with GSO.
  • Thursday, 2024-04-25, 7:00–8:00, Grinnell Art Museum. Recital by Eric Mcintyre: Lifetimes of Water
  • Friday, 2024-04-26, 4:00–5:00pm, HSSC N1170. Middle of Everywhere.
  • Friday, 2024-04-26, 4:30–6:00pm, HSSC A2231 (Auditorium). Conversation with Humanity. Climate Change.
  • Saturday, 2024-04-27, Harris. ISO Cultural Event. Please don’t destroy the bathroom ceilings.

Peer

  • Saturday, 2024-04-27, 12:00–4:00pm, Kington Plaza. Spring Fest. There might be catered food.

Wellness

Misc

  • Wednesday, 2024-04-24, 4:00–5:00pm, JCC Lower-Level Conference Room. Leveraging LinkedIn.
  • Friday, 2024-04-26, 8:30–11:00pm, Harris Concert Hall. Drag.
  • Saturday, 2024-04-27, 6:00–11:30pm, Gardner. Mary B. James.

Other good things to do (no tokens)

About MP10

Our last mini-project!

Your goal: Parse JSON, the JavaScript Object Notation, a common form for sharing data between programs.

JSON lets you have:

  • “Objects” (hash tables with strings as keys). Start with {, end with } and have key/value pairs separated by commas in between. ‘STRING’ : value.
  • Strings: start with double quote ", end with double quote ", normal rules about backslashing in between.
  • Arrays : Start with [, end with ], values separated by commas.
  • Numbers (Integers, Reals) : As you might expect.

For fun, you get to design the hash table; you may not use Java’s HashMap or anything similar.

You should work in groups of two or three. You may self-select your groups.

Questions

Administrative

Will you please give detentions to the SEPC member who keeps showing up late? I find it distracting?

What’s a detention?

MP9

Could you explain more about dump?

See whiteboard.

How do I change the unicode data into unicode characters?

public class UnicodeExample {
  public static void main(String[] args) {
    for (String str : args) {
      int i = Integer.decode("0x" + str);
      System.err.println(i);
    } // for
  } // main(String[])
} // class UnicodeExample

That gives us numbers. We could also use Integer.parseInt(str, 16).

We convert to unicode with Character.toChars.

public class UnicodeExample {
  public static void main(String[] args) {
    for (String str : args) {
      int i = Integer.decode("0x" + str);
      System.err.println(Character.toChars(i));
    } // for
  } // main(String[])
} // class UnicodeExample

Why didn’t you just tell us that to start with?

Because exploring the Javadoc documentation is one of the learning goals of the course.

Hash tables

Misc

Lab

Time for forming groups