Student Resources
Official documentation, tutorials, and references for every tool used in CSCD 240
This page collects the most useful official documentation, tutorials, and references for the tools you will use in this course. Every link points to a primary source maintained by the authors of the software. Bookmark the sections relevant to your current week.
Linux Shell and Command Line
You will spend the first three weeks (and every week after) working in a Linux terminal. These resources cover navigation, file manipulation, permissions, pipes, and text processing.
Essential
-
MIT Missing Semester – The Shell – A lecture-plus-exercises introduction to shell basics: what a shell is, navigating with
cd/ls/pwd, file permissions (rwx), pipes and redirection (|,>,>>), andmanpages. Covers exactly the material from weeks 1-2 of this course. Work through the exercises at the bottom of each lecture. -
MIT Missing Semester – Full Course – Eleven lectures covering shell tools, editors (vim), data wrangling (grep/sed/awk), version control (git), debugging, and more. Each lecture is 30-60 minutes with exercises. The most efficient single resource for everything a CS student needs to know about their tools.
-
man7.org – Linux Man Pages – The complete collection of Linux manual pages online. When you need the exact flags for
chmod,grep,find, or any other command, search here. Equivalent to typingman <command>on the server.
Quick References
-
SS64 – Bash Commands A-Z – Alphabetical index of every common Bash command with one-line descriptions and usage examples. Faster than man pages when you just need the syntax.
-
chmod Calculator – Interactive tool for converting between symbolic (
rwxr-xr--) and numeric (754) permission notation. Useful until the octal system becomes second nature.
Reference (Advanced)
- GNU Bash Reference Manual – The definitive specification for everything Bash can do: quoting, expansions, conditionals, loops, functions, and built-in commands. Not a tutorial. Use it when you need the precise definition of a feature.
Git and GitHub
Every lab submission goes through git. You will clone an assignment repository from GitHub Classroom, commit your work, and push it. These resources cover the fundamentals.
Essential
-
Pro Git Book – Chapter 1: Getting Started – Explains what version control is, how git differs from older systems, and the three states (modified, staged, committed). Read sections 1.1 through 1.3 before your first lab.
-
Pro Git Book – Chapter 2: Git Basics – Covers the exact commands you will use every day:
git init,git clone,git add,git commit,git push,git pull,git status,git log, andgit diff. The single most useful chapter for this course. -
GitHub: About GitHub and Git – Short introduction to how GitHub adds collaboration features (repositories, branches, pull requests) on top of git. Part of GitHub’s “Start Your Journey” tutorial series.
-
GitHub: Cloning a Repository – Step-by-step instructions for cloning via HTTPS, SSH, or GitHub CLI. Includes troubleshooting for common clone failures.
Quick References
-
Git Cheat Sheet (git-scm.com) – Two-page PDF with the commands you will use most often, organized by workflow stage: setup, stage, commit, branch, inspect, sync. Print it.
-
Git Reference Manual – Official documentation for every git subcommand. Use this when you need the exact flags for
git log,git diff,git reset, or anything else.
Video
- Git and GitHub for Beginners – freeCodeCamp (YouTube, ~68 min) – Full walkthrough from installing git through pushing to GitHub. Covers the same workflow you will use for lab submissions.
C Programming
Starting in week 3, you will write C programs compiled with gcc. These resources cover the language from hello-world through pointers, memory allocation, and structs.
Essential
-
C Programming – cppreference.com – Complete reference for the C standard library (stdio.h, stdlib.h, string.h, etc.) and language constructs (types, operators, statements, declarations, pointers, arrays, structs, functions). Authoritative, well-organized, and kept current with each C standard revision. Bookmark this.
-
The C Programming Language (K&R) – The original book by Kernighan and Ritchie remains the best compact introduction to C. Available in the EWU library. Read chapters 1-6 alongside the course.
Quick References
- C Reference Card (ANSI) – Two-page summary of C syntax, operators, types, format specifiers, and standard library functions. Print it and keep it next to your keyboard.
Video
- C Programming Tutorial for Beginners – freeCodeCamp (YouTube, ~3h 46min) – Covers variables, types, functions, loops, arrays, pointers, and structs. Follows a similar progression to the first half of CSCD 240’s C material.
GCC (Compiling C Programs)
Every C program in this course is compiled with gcc -Wall. The -Wall flag enables all common warnings and is required on every assignment.
Essential
-
GCC Manual – Option Summary – Overview of all compiler flags organized by category (warnings, optimization, debugging, linking). Find the exact meaning of
-Wall,-g,-O0,-c,-o, and others. -
GCC Manual – Warning Options – Detailed explanation of every warning flag. Understand which warnings
-Wallenables and what each one means when the compiler prints it.
Quick Reference
- Common compilation commands for this course:
gcc -Wall -g -o program program.c # compile single file with debug info
gcc -Wall -g -c file.c # compile to object file only
gcc -Wall -g -o program main.o utils.o # link multiple object files
Make (Build Automation)
Starting around week 4, you will use Makefiles to compile multi-file C projects. Make reads a file called Makefile that describes how to build your program and only recompiles files that changed.
Essential
-
GNU Make Manual – Chapter 2: An Introduction to Makefiles – Explains rules, targets, prerequisites, and recipes. Read sections 2.1 through 2.5. This is all you need for the first several labs.
-
GNU Make Manual – Automatic Variables – Explains
$@(target),$<(first prerequisite),$^(all prerequisites), and other shorthand used in Makefile recipes.
Quick Reference
- Minimal Makefile pattern for this course:
CC = gcc
CFLAGS = -Wall -g
program: main.o utils.o
$(CC) $(CFLAGS) -o $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c $<
clean:
rm -f program *.o
Valgrind (Memory Debugging)
Starting around week 7, you will use Valgrind’s Memcheck tool to find memory leaks, buffer overflows, and use-after-free errors. Your C labs with dynamic memory (calloc/free) must pass Valgrind cleanly.
Essential
-
Valgrind Quick Start Guide – The minimum you need: compile with
-g, run withvalgrind --leak-check=yes ./program, then read the output. Covers how to interpret “Invalid write”, “definitely lost”, and “Conditional jump depends on uninitialised value” messages. Read this entire page – it is short. -
Valgrind User Manual – Memcheck – Complete documentation for every error type Memcheck reports, including how to suppress false positives and how to use
--track-origins=yesfor uninitialised value errors.
Quick Reference
- Standard Valgrind invocation for this course:
valgrind --leak-check=full --show-leak-kinds=all ./program
Fix errors in the order Valgrind reports them. Later errors are often caused by earlier ones.
GDB (Interactive Debugging)
GDB lets you pause your program, step through it line by line, inspect variables, and find exactly where a segfault occurs. You will use it whenever printf debugging is not enough.
Essential
-
GDB Sample Session – A complete walkthrough of a real debugging session: setting breakpoints, stepping through code, inspecting variables, modifying values, and continuing execution. Shows exactly how GDB finds a bug in a real program. Read this first.
-
GDB User Manual – Complete reference for all GDB commands. Refer to the “Stopping and Continuing” and “Examining Data” chapters when you need more than the basics.
Quick Reference
| Command | What it does |
|---|---|
gcc -g -o prog prog.c |
Compile with debug symbols (required for GDB) |
gdb ./prog |
Start GDB with your program |
break main |
Set breakpoint at function main |
break file.c:42 |
Set breakpoint at line 42 |
run |
Start the program |
n (next) |
Execute one line, skip over function calls |
s (step) |
Execute one line, step into function calls |
p variable |
Print the value of a variable |
bt (backtrace) |
Show the call stack (where you are) |
c (continue) |
Resume running until next breakpoint |
q (quit) |
Exit GDB |
Video
- GDB Tutorial – CppCon / Greg Law (YouTube, ~55 min) – Practical GDB tips from basic usage through conditional breakpoints and watchpoints. Covers more than you need for this course, but the first 20 minutes are directly applicable.
Vim (Text Editor)
Vim is the standard terminal text editor on most Unix systems. You do not need to master it, but you need to know how to open a file, make edits, save, and quit. Nano is also available as a simpler alternative.
Essential
-
vimtutor– Typevimtutorat the command line. This is a built-in 30-minute interactive tutorial that teaches movement, editing, saving, and quitting by having you practice on a real file. The single best way to learn the basics. -
Vim Help – User Manual Table of Contents – The official Vim user manual organized by task. Chapters 1-8 cover everything a beginner needs: basic editing, simple changes, moving around, and working with files.
Quick Reference
| Mode | How to enter | What it does |
|---|---|---|
| Normal | Press Esc |
Navigate and run commands |
| Insert | Press i |
Type text into the file |
| Command | Press : from Normal |
Save (:w), quit (:q), save and quit (:wq), force quit (:q!) |
- Vim Cheat Sheet – Single-page visual reference for the most common Vim keystrokes.
Alternative: Nano
If vim feels overwhelming, use nano filename instead. Nano shows keyboard shortcuts at the bottom of the screen. Ctrl+O saves, Ctrl+X exits.
- GNU Nano Manual – Official documentation for nano.
GitHub Classroom (Lab Submission Workflow)
Labs are distributed through GitHub Classroom. You click an assignment link, clone the repository, write your code, and push. The autograder runs automatically on push.
Workflow Summary
- Click the GitHub Classroom assignment link (posted on Canvas or the course site).
- Clone the repository:
git clone <url> - Write your code in the repository directory.
- Stage:
git add . - Commit:
git commit -m "description of changes" - Push:
git push - Check the Actions tab on GitHub for autograder results.
Resources
-
GitHub Classroom Student Guide – Official documentation for the student side of GitHub Classroom.
-
GitHub Actions – Viewing Workflow Results – How to check whether the autograder passed or failed after you push.
Universal Checklists
Before Every Lab Submission
- Code compiles with
gcc -Wall -gand zero warnings. - Program produces correct output for the sample inputs.
- If the lab uses dynamic memory:
valgrind --leak-check=fullreports zero errors and zero leaks. - All files are committed:
git statusshows “nothing to commit, working tree clean”. - Pushed to GitHub:
git pushsucceeds with no errors. - Checked the GitHub Actions tab for a green checkmark.
When Something Goes Wrong
- Read the error message carefully. The first line usually tells you what happened.
- Look at the file name and line number in the error.
- Search the Troubleshooting Guide for the error text.
- Search the official documentation linked on this page for the tool that produced the error.
- If you are still stuck, copy the exact error message and bring it to office hours.
Sources
- Git: git-scm.com – official Git project site, documentation, and Pro Git book
- GitHub: docs.github.com – official GitHub documentation
- MIT Missing Semester: missing.csail.mit.edu – MIT CSAIL course on developer tools
- GNU Bash: gnu.org/software/bash – GNU Bash project and reference manual
- GNU Make: gnu.org/software/make – GNU Make project and manual
- GCC: gcc.gnu.org – GCC project and compiler documentation
- GDB: sourceware.org/gdb – GNU Debugger project and manual
- Valgrind: valgrind.org – Valgrind project, quick start guide, and user manual
- cppreference: en.cppreference.com – C and C++ language and library reference
- Vim: vimhelp.org – Vim online help and user manual
- Nano: nano-editor.org – GNU Nano project and documentation
- Linux man pages: man7.org – online Linux manual pages