Queen's University CISC220
Professor Ma · Queen's University · 23 lectures with notes
Every lecture with its full transcript and chapters, and one search across all 23 lectures.
Lecture 2: Very brief history of Linux; Filesystem
Linux’s Unix roots lead into a practical guide to inodes, filesystem paths, and Bash navigation.
Lecture 3: Command structure; Globbing
Bash expands glob patterns into matching file names, making it easy to run commands on selected groups of files.
Lecture 4: Quoting; Creating and moving files
Use Bash escaping and quotes to specify unusual filenames, and handle file creation, redirection, and moves carefully to avoid overwriting data.
Lecture 5: Removing and copying files; Permissions
Use Linux file commands carefully, understand `chmod` permissions, and learn how Unix standard streams handle command input and output.
Lecture 6: Redirections; Pipelines; tee; Expansions
Bash combines redirection, pipelines, `tee`, and expansions to route and transform command-line text.
Lecture 7: Expansions; Introduction to scripting
Bash expansions transform command text before execution, while shebangs and execute permissions make scripts runnable.
Lecture 8: Arithmetic; Variables
Bash scripts rely on exit statuses and special parameters, while careful quoting and braces prevent subtle variable-expansion bugs.
Lecture 9: Variables (cont); Strings
Bash parameter substitutions can inspect and transform strings, but most results only change the variable when assigned back.
Lecture 10: Regular expressions
Bash regular expressions combine anchors, character classes, quantifiers, and grouping to match text patterns, with `grep -E` applying them across files.
Lecture 11: tr command; Arrays
Bash `tr` handles character-level transformations, while safe array use depends on correct indexing, expansion, and quoting.
Lecture 12: Conditional statements
Bash `if` statements test command exit statuses; use `[[ ... ]]` for file and string tests and `(( ... ))` for arithmetic.
Lecture 13: Loops
Bash loop behavior depends on exit statuses, expansions, and careful quoting when processing arguments or files.
Lecture 14: Functions
Bash functions communicate through exit statuses, captured output, or dynamically scoped variables, so use `local` to avoid accidental interference.
Lecture 15: Introduction to C
C gives programmers close control over efficient programs, but requires explicit compilation and careful handling of files, functions, and exit codes.
Lecture 16: Types
C arrays and strings require careful size and bounds management because the language does not check indexes or terminate strings automatically.
Lecture 18: Scope and Lifetime
C scope determines where a name can be used, while storage duration determines how long its object remains alive.
Lecture 20: Floating-point; Pointers
C pointers let functions modify caller-owned objects by passing addresses and dereferencing them.
Lecture 22: Arrays (and pointers)
C array expressions often become pointers to their first element, linking indexing, memory copying, and pointer arithmetic.
Lecture 23: Arrays (continued)
C array functions need explicit length and storage-lifetime strategies because arrays decay to pointers.
Lecture 24: Strings
C strings depend on null termination, and their standard library functions illustrate essential pointer and buffer-safety rules.
Lecture 25: Strings (cont); Memory allocation
C programmers must match allocated byte counts to object types and use `memmove` when copied memory regions overlap.
Lecture 26: Memory allocation (cont); A custom string type
A C string struct combines a character buffer, length, and capacity to support safer, mutable strings.
Lecture 28: A stack data type
A C stack uses a top pointer and singly linked nodes to implement constant-time push and pop.