student@ubuntu:~$
Guide All Platforms

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 (|, >, >>), and man pages. 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 typing man <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, and git 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


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


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 -Wall enables 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

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 with valgrind --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=yes for 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


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 – Type vimtutor at 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.


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

  1. Click the GitHub Classroom assignment link (posted on Canvas or the course site).
  2. Clone the repository: git clone <url>
  3. Write your code in the repository directory.
  4. Stage: git add .
  5. Commit: git commit -m "description of changes"
  6. Push: git push
  7. Check the Actions tab on GitHub for autograder results.

Resources


Universal Checklists

Before Every Lab Submission

  1. Code compiles with gcc -Wall -g and zero warnings.
  2. Program produces correct output for the sample inputs.
  3. If the lab uses dynamic memory: valgrind --leak-check=full reports zero errors and zero leaks.
  4. All files are committed: git status shows “nothing to commit, working tree clean”.
  5. Pushed to GitHub: git push succeeds with no errors.
  6. Checked the GitHub Actions tab for a green checkmark.

When Something Goes Wrong

  1. Read the error message carefully. The first line usually tells you what happened.
  2. Look at the file name and line number in the error.
  3. Search the Troubleshooting Guide for the error text.
  4. Search the official documentation linked on this page for the tool that produced the error.
  5. If you are still stuck, copy the exact error message and bring it to office hours.

Sources