Announcements
November 16th, 2012
- Good evening, everyone.
- Lest you have nothing to read over break, I've gone ahead and posted a practice exam and solution right here and here. The exam is scheduled for the evening of November 28th from 7 until 10 p.m. in Cemex Auditorium, and will cover everything we've discussed so far, save for graphs and graph algorithms. While all material previously taught is fair game, the exam will emphasize material not emphasized by the first exam.
November 14th, 2012
- As of assignment 6, Pathfinder, the Stanford libraries have undergone a major change so that the graphics, event handling, and certain other components are handled through a backend Java process. The C++ code you end up writing to implement the assignment will look largely the same, but in order to run the project, you'll need to have Java installed.
- If you're using a Mac, you shouldn't need to make any changes. However, if any issues do come up, please let Jerry or Ben know!
- If you're using a PC and you don't already have Java installed, you can do so easily by visiting Java's website, clicking on "Free Java Download", and following the instructions. You absolutely don't need the Ask.com toolbar or search page, so uncheck those options. Otherwise, the process should be fairly straightforward.
- That should be all you need to get the Pathfinder project to run. Try testing it to be sure it works both by running the starter code from XCode or Visual Studio, as well as by running the sample demo.
- Good luck on the assignment, and again, let Jerry or Ben know if you run into any problems setting up and running the project.
November 6th, 2012
- We sent email yesterday about a new PC version of the Huffman demo, but it's not clear to me that that email went through to everyone. There was a subtle PC-specific bug in the Huffman demo that was corrected about 6:30 p.m. yesterday—about 90 minutes after the original PC starter files were uploaded. If you downloaded the PC starter files for Assignment 5 and this is the first you're hearing of this, please download the PC starter files again—not for the starter code (which is fine) but for the same application.
- I need to move my office hours tomorrow (Wednesday). I normally hold office hours from 10:15 a.m. until noon, but I have an unmovable meeting at 10:30 a.m. for about 45 minutes. I'm going to shift my office hours forward 1:15 until 2:45 p.m. tomorrow, just this week. Also, I need to truncate my Friday hours to end at 11:30 a.m., as I have a meeting in San Jose at 12:30 p.m.
- Also, if you know you're planning to take CS107 next quarter, I humbly request that you sign up for CS107 via Axess as soon as you reasonably can. We're trying to allocate TAs for next quarter, and we allocted based on a combination of last year's numbers and the current enrollment figures. The CS107 lecturer's worst nightmare is not having enough staff, so make sure we get the staff we need by telling us you'll be part of the class.
October 17th, 2012
- The next problem in the sequence of fun contest problems: Sharing Chocolate. This particular problem will drill you on recursive backtracking and memoization, and you need to master both if you're to make any headway on this problem and produce a solution that's both functional and fast.
- As with the first contest problem, I'll accept submissions from any and all students interested in trying. Those who submit a fast, working solution will be treated to din-din in downtown Palo Alto later in the quarter.
- Take a stab at it if you'd like.
October 11th, 2012
- Keith Schwarz uncovered an interesting video illustrating a continuous version of the Game of Life. It relies on a related set of rules, but with floating point instead of integer values. Check out the video right here.
October 10th, 2012
- The second assignment is due tomorrow morning, and your third assignment goes out today. Assignment 3 goes out in two parts, and the first part, comprised of a series of small problems, is due in a week. The second part, which has you implement the game of Boggle, is a larger problem and is due two days later. Think of the warm-ups problems as a checkpoint, but this this it needs to be submitted. (I'll post the starter files by 3:00 p.m. today.)
- A student pointed out that the bond.g grammar file doesn't include a final blank line like it should. Most implementations won't cough on it, but if you're doing aggresstive error checking, the formatting issue might mess things up. The best thing to do is to just go in and manually add the one final blank line yourself, since it's too minor a concern to recommend a fresh download of the entire starter project again.
- Each quarter I distribute a small number of optional programming problems, and I'm just this second posting the first one right here! The problem takes the form of a contest, where I accept solutions from everyone, but reward the first three of you to submit efficient, working solutions with dinner out and about in Palo Alto at some point later in the quarter. The entire problem statement should be clear from the document itself. The primary difference between the optional contest problem and the regular assignment questions is that you must solve these all by yourself without the help of any other people.
- This is a problem I wrote for the Regional ACM Programming Contest three years ago, and it was reasonably challenging but not impossible, and a good number of the top teams submitted working solutions. That means that many of you are more than outfitted to tackle this, knowing you have a good amount of time to submit something.
- Good luck! [I'll be distributing another problem like this--one requiring recursion and caching--in about a week, so if you don't like this problem, then don't worry, because there are more to come.]
September 26th, 2012
- Good morning, cool CS106X cats.
- Your first assignment goes out today, and is formally due a week. The assignment is best tackled in short bursts, and because we want you to start early and work patiently and thoughtfully over the course of the 7 days you have, we're encouraging (though not actually requiring) you to submit a partial solution by Monday night. Note that the full assignment is due at 8:00 a.m., so that you have a good hour to merrily skip your way over to 9:00 a.m. lecture in Gates.
- Oh, and check this out this out. Stanford is holding a little programming contest this Saturday, and while the actual purpose is to select the teams we send to a regional programming contest, the local contest itself is fun, and you get to meet a lot of fellow CS enthusiasts who enjoy a nerdy programming problem or two (or ten). If you have any questions about the contest this Saturday, then by all means get in touch with me.
September 9th, 2012
- Welcome to CS106X, everyone! I'm looking forward to an awesome quarter of coding together. I have lots of new ideas on how to upgrade the syllabus and the manner in which we all get things done.
- Class begins on Monday, September 24th and meets at 9 a.m. in Gates B01 every Monday, Wednesday, and Friday.
- Everyone needs to visit http://cs198.stanford.edu/section sometime between Thursday, September 27th at 5:00 p.m. and Sunday, September 30th at 5:00 p.m. to state which discussion times work best. Come Sunday evening, we'll distribute everyone across the discussion section times as optimally as possible and email everyone his or her section assignment. For those familiar with our CS106A course, note that our discussion section format is different, and that attendance is required. As opposed to CS106A discussion sections, where most if not all code is written by the section leader on the whiteboard or blackboard, our discussion sections are a mix of traditional recitation and laboratory.
- SCPD students--that is, students taking the course remotely--are automatically enrolled in a discussion section that too will be syndicated over the net and optimized for a remote student audience. Any remote student who prefers to come to campus for a non-televised discussion section is encouraged to do so by signing up for a discussion section as if you were an on-campus student.
CS106X Resources
- Tresidder LaIR Office Hours
- C and C++ Standard Library Reference
- Good Programming Style 1
- Good Programming Style 2
- Course Reader PDF
- CS106X Library Documentation
- Submitter
- Lecture Videos
Handouts
- 01 CS106X Course Information
- 02 CS106X Course Syllabus
- 03 Getting Started
- 04M Downloading XCode
- 04P Downloading Visual Studio C++
- 05M Using Xcode
- 05M Using Microsoft IDEs
- 06 Queen Safety [Mac][PC]
- 07 Assignment 1: Life
- 08 C++ Strings
- 09 Stacks and Queues [Mac][PC]
- 10 Library Reference
- 11 Section Handout [Mac][PC][Solution]
- 12 Maps and Sets [Mac][PC]
- 13 Assignment 2: ADTs
- 14 Recursion [Mac][PC]
- 15 Section Handout [Mac][PC][Solution]
- 16 Assignment 3: Warmups
- 17 Assignment 3: Boggle
- 18 Recursive Backtracking I [Mac][PC]
- 19 Recursive Backtracking II [Mac][PC]
- 20 Section Handout [Mac][PC][Solution]
- 21 Memoization
- 22 CS106X Practice Exam [Solution]
- 23 Sparse String Arrays [Mac][PC]
- 24 Section Handout [Mac][PC][Solution]
- 25 CS106X Midterm [Solution]
- 26 All About Linked Lists
- 27 Assignment 4: PQueue
- 28 Section Handout [Mac][PC][Solution]
- 29 Hashing and HashMaps [Mac][PC]
- 30 Assignment 5: Huffman
- 31 Huffman Encoding
- 32 Section Handout [Mac][PC][Solution]
- 33 Trees and TreeMaps [Mac][PC]
- 34 Tries and Lexicons [Mac][PC]
- 35 Section Handout [Mac][PC][Solution]
- 36 Assignment 6: Pathfinder
- 37 CS106X Practice Exam [Solution]
- 38 Section Handout [Mac][PC][Solution]
- 39 CS106X Midterm [Solution]
- 40 Assignment 7: Stanford 1-2-3
- 41 Section Handout [Mac][PC][Solution]
- 42 Python Basics
- 43 Networking With Python
Assignments
- Assignment 0: Narcissism (Mac)
- Assignment 0: Narcissism (PC)
- Assignment 1: Life (Mac)
- Assignment 1: Life (PC)
- Assignment 2: ADTs (Mac)
- Assignment 2: ADTs (PC)
- Assignment 3: Recursion (Mac)
- Assignment 3: Recursion (PC)
- Assignment 4: Priority Queue (Mac)
- Assignment 4: Priority Queue (PC)
- Assignment 5: Huffman (Mac)
- Assignment 5: Huffman (PC)
- Assignment 6: Pathfinder (Mac)
- Assignment 6: Pathfinder (PC)
- Assignment 7: Stanford 1-2-3 (Mac)
- Assignment 7: Stanford 1-2-3 (PC)