/stanford-cs106b

As I work through the open courseware for Stanford's Programming Abstractions CS106B, taught by Julie Zelenski in 2008, I will be saving the updated source code and instructions on how to get setup to follow the instructional videos.

Primary LanguageC++

Stanford Open Course cs106b

Updated from 2008 to 2017 C++ standards.

Stanford made one year of their "cs106b: Programming Abstractions" course open to the public. The source code within this project is an updated version of the material presented by Julie Zelenski when she taught this course in 2008.

Setup

  • Work was done using Unix(Mac).
  • C++ version is: Apple LLVM version 8.1.0 (clang-802.0.42)
  • Install Xcode: Version 8.3.3 (8E3004b)
  • Install JVM
  • In terminal:
    • clone repository git clone https://github.com/LauraKirby/stanford-cs106b.git
    • move into the root directory of stanford-cs106b:
      • cd stanford-cs106b
    • from here, print the current working directory:
      • pwd
      • my path looks like: /Users/laurakirby/Desktop/stanford-cs106b
    • Stanford has done some extra work to standardize how the programs are run. You will need to set an environment variable that lets your program know where to find the spl.jar file.
      • launchctl setenv SPL_HOME '/your/path/from/pwd

Sources

Debugging

  • If Xcode doesn't recognize the "example.txt" file
    • In the Xcode (v7.1.1 at the time of writing) [modification: I am using 8.3.3 and comment remains relevant] sidebar, there's an automatically generated folder called "Products". Inside you'll find the executable of your project (assuming you've built your project at least once). Right-click it & choose "Show in Finder". A folder will open in Finder. That's the working directory of your program, & you'll notice it's not actually inside your project's folder.
    • You can have Xcode use a different directory instead. In the top toolbar, on the left side where it shows your project name next to the active build architecture, click on the Project name > Edit Scheme…
    • Then look for an option called "Working Directory" in the sheet that appears. Tick the checkbox & then choose a custom directory. Note: Make sure the "Run" option is the selected one in that sheet's sidebar. [source: Mahouk's response within Stackoverflow ]