Resources

Here are useful materials and references about the tools and topics covered in CS107.

Textbooks

Here are some references for the C programming language:

Stanford Libraries also includes some excellent online book collections, such as Safari Books Online (includes Nutshell books on Linux, programming tools, languages) and Books 24x7 ITPro (includes "for Dummies" series, Sams, Osbourne/McGraw-Hill, MIT Press, Peachpit Press, and Sybex). Search Stanford's online book collection

Development Tools

In CS107, we will be working remotely on the myth machines in the Gates building with the following tools to write, compile, and debug our programs.

Here is a guide for how to remotely log in to the Myth computers: click here

Once you are remotely logged in, you can use the various tools we have installed to work on your programs. Here is some more information about each of these tools. There are walkthrough videos for many of the tools listed below - visit each page for a link. You can also view all the walkthrough videos here.

  1. Emacs (text editor)
  2. Make (compiles your program for you using a set of commands)
  3. GCC (how to manually compile C programs)
  4. GDB and Debugging (how to debug your programs)
  5. Valgrind Memcheck (finds memory leaks and memory errors)
  6. Valgrind Callgrind (CPU/cache profiling)
  7. Extra: Git (manage versions of your work)

Common Unix Commands

There are walkthrough videos for many of the commands listed below - visit each page for a link. You can also view all the walkthrough videos here.

  1. Overview
  2. The .backup directory
  3. The working directory and pwd
  4. What is the difference between an absolute and a relative path?
  5. cd (change directory)
  6. cat (print a file to the screen)
  7. ls (list a folder's contents)
  8. Extra: pushd and popd (easily move back and forth between folders)
  9. Extra: Symbolic Links (create a link to a file in a different directory)

Other Commands

  1. man (view manual pages)
  2. cp and mv (copy and move files and folders)
  3. mkdir (create new folders)
  4. rm and rmdir (delete files and folders)
  5. grep (search files for text)
  6. find (search for files)
  7. diff (view differences between two text files
  8. wc (count the chars/words/lines in a file)
  9. View and re-execute your previous unix commands
  10. Speed up typing unix commands with tab-completion
  11. Chain commands, and save output to a file, with <, > and |
  12. Extra: tar (archive and unarchive)

Assembly Language

Assembly language is one of the topics covered during the quarter. Here are some assembly references: