CS 2 (Winter 2021)

Welcome to CS 2! We’re super excited to have you here this term!

Announcements

Due Next

Calendar

Wellness and Inclusion

It is very important to us that you succeed in CS 2. We provide many extra resources to help you. Adam and the TAs hold many office hours, and we have a message board called Ed Discussion.

It is also very important to us that you maintain your mental wellness throughout the course. A few points are not worth losing sleep over. Everyone on the course staff is available to chat, and you can always attend office hours for a non-academic conversation if necessary. You can also visit the counseling center if you find you need help beyond the course staff. If you have a temporary health condition or permanent disability (either mental health or physical health related), you should contact accessibility services if you have not already. Additionally, if there is something we can do to make your experience better, please let us know.

Diversity, inclusion, and belonging are all core values of this course. All participants in this course must be treated with respect by other members of the community in accordance with the honor code. If you feel unwelcome or unsafe in any way, no matter how minor, we encourage you to talk to Adam or one of the Deans. We view these sorts of honor code violations as completely unacceptable, and we take them very seriously.

Tools

Project Registration Office Hours Queue Late Tokens Grades Discussion Board Zoom

Course Staff

Instructor

they/them
Book an appointment!
Annenberg 115
blank@caltech.edu
(626) 395-1765

Teaching Assistants

Hopper
she/her
hopper@
Ethan Ordentlich
he/him
eordentl@
Adam Abbas
he/him
aabbas@
Antonio Caceres
he/him
acaceres@
Anya Vinogradsky
she/her
avinogra@
Caleb Sander
he/him
csander@
Charlotte Park
she/her
cipark@
Devin Chotzen-Hartzell
he/him
dchotzen@
Esmir Mesic
he/him
esmir@
Isha Chakraborty
she/her
ichakrab@
James Bowden
he/him
jbowden@
Jeffrey Ma
he/him
jjma@
Jonathon Corrales de Oliveira
he/him
jcorrale@
Jyotsna Rao
she/her
jrao@
Matthew Hajjar
he/him
mhajjar@
Pippa Richter
she/her
prichter@
Ryan Han
he/him
rhan@
Sarah Dunbar
she/her
sdunbar@
Shwetha Kunnam
she/they
skunnam@
Tyrone McNichols
he/him
tmcnicho@
Vignesh Varadarajan
he/him
vvaradar@

Handouts

The following is a list of handouts that you might find helpful throughout the course. We’ve categorized them by when they are useful.

Course

Syllabus – an overview of the course and administrative information

Collaboration Policy – the course collaboration policy

Course Policies & Guidelines – an overview how the course will work since we’re online

Exploration Sessions – a list of optional sessions to explore topics the TAs have selected as interesting

Week 0

Python2Java ‘Finger’ Exercises – some exercises to help you acclimate to Java coming from a Python world

Java/Python Comparison – a comparison of the basic syntax of Python with Java

Software Setup – instructions on how to get Java, IntelliJ, and git for the course

Schedule

L00 Mon, Jan 04 Introduction and OOP [ pdf | recording | code ]
Course administrivia. Designing Java classes. Designing data structures. Object oriented programming.
:D Tue, Jan 05 Lab01: Explosive Debugging [ spec ]
Debugging JUnit tests. Prints. The IntelliJ debugger. Breakpoints.
L01 Wed, Jan 06 Problem Decomposition [ code ]
Using an API. Helper methods. Quadgrams. Log likelihoods. Java String API. Reading documentation.
Lab01 (debugging) due @ 11:30 pm on Thu, Jan 07
L02 Fri, Jan 08 Basic Data Structure Trade-Offs [ pdf | recording | code ]
Lists. Sets. Maps. Nested data structures. Efficiency.
L03 Mon, Jan 11 Implementation: ArrayIntList [ recording | code ]
Arrays. Implementing an ArrayList. Designing a class to fit an API.
Project01 (ciphers) due @ 11:30 pm on Mon, Jan 11
:D Tue, Jan 12 Lab02: Adventure Game [ spec ]
Reading stack traces. Using the IntelliJ Visualizer for debugging.
L04 Wed, Jan 13 Generics and Implementation: ArrayList [ recording | code ]
Generics. Java types. Interfaces.
Lab02 (adventure) due @ 11:30 pm on Thu, Jan 14
L05 Fri, Jan 15 Iterators and Implementation: SimpleArraySet, SimpleSortedArraySet
Iterators. Implementing a set. Data structure trade-offs.
:( Mon, Jan 18 No Class: MLK Day
Project02 (hangman) due @ 11:30 pm on Mon, Jan 18
:( Tue, Jan 19 No Lab: Mental Health Break!
L06 Wed, Jan 20 Stacks, Queues, and Implementation: LinkedList
Collections. Stacks. Queues. Nodes. Implementing a linked list.
L07 Fri, Jan 22 The Power of Recursion
RECURSION
L08 Mon, Jan 25 Trees and BSTs
Project03 (synthesizer) due @ 11:30 pm on Mon, Jan 25
:D Tue, Jan 26 Lab03: ID3 Decision Trees
Binary trees. Basic machine learning.
L09 Wed, Jan 27 Tries
Lab03 (decision trees) due @ 11:30 pm on Thu, Jan 28
L10 Fri, Jan 29 Recursive Backtracking
L11 Mon, Feb 01 Asymptotic Analysis
Project04 (movies) due @ 11:30 pm on Mon, Feb 01
:D Tue, Feb 02 Lab04: Anagrams
Recursive backtracking.
L12 Wed, Feb 03 Hash Tables I
Lab04 (anagrams) due @ 11:30 pm on Thu, Feb 04
L13 Fri, Feb 05 Hash Tables II
L14 Mon, Feb 08 Heaps & Priority Queues
:( Tue, Feb 09 No Lab!
L15 Wed, Feb 10 Interlude: P & N Positions and Nim
L16 Fri, Feb 12 Memoization
:( Mon, Feb 15 No Class: President's Day
Project05 (markov) due @ 11:30 pm on Mon, Feb 15
:D Tue, Feb 16 Lab05: Grundy's Game
L17 Wed, Feb 17 Graphs I: Representation
Lab05 (grundy) due @ 11:30 pm on Thu, Feb 18
L18 Fri, Feb 19 Interlude: Solving Nim
L19 Mon, Feb 22 Interlude: Nimbers and Sums of Games
Project06 (chat) due @ 11:30 pm on Mon, Feb 22
:D Tue, Feb 23 Lab06: Green Hackenbush
L20 Wed, Feb 24 Graphs II: Single-Source Shortest Paths
Lab06 (hackenbush) due @ 11:30 pm on Thu, Feb 25
L21 Fri, Feb 26 Interlude: Game Graphs
L22 Mon, Mar 01 Impartial and Partisan Games
Project07 (maps) due @ 11:30 pm on Mon, Mar 01
:D Tue, Mar 02 Lab07: Turning Turtles
L23 Wed, Mar 03 Minimax and Alphabeta
Lab07 (turtles) due @ 11:30 pm on Thu, Mar 04
L24 Fri, Mar 05 Value Iteration
L25 Mon, Mar 08 Sorting
:D Tue, Mar 09 Lab08: Pig
L26 Wed, Mar 10 Victory Lap
Lab08 (pig) due @ 11:30 pm on Thu, Mar 11
Project08 (othello) due @ 11:30 pm on Fri, Mar 12