COMS 3157 Advanced Programming
All students MUST take the exams at those times. There are no make-up or alternate exams. If you cannot make any of those exams, please take the course next semester.
- Jae’s office hours
- TA office hours
Course essentials
- OVERVIEW AND LOGISTICS
- REQUIRED READING: ACADEMIC HONESTY POLICIES
- Course Syllabus
- Jae’s Git Tutorial
- Lab Workflow
- Helpful Guides
Past Lectures & Recitations
- Course overview and logistics
- Slides: OVERVIEW AND LOGISTICS
- Introduction to command line interface (CLI)
- Getting Started in the UNIX Programming Environment
- Lecture notes 01: CLI basics
Recitation for Week 1: F 9/8 |
- CLI, Vim, hello.c
- Review of 9/7 lecture
- Some Vim tricks & .vimrc
- hello.c
- Compiling & linking
- Separate compilation
- Function declarations
- Standard C Library
- Using header file to prevent linking problem
- Lecture notes 02: Separate Compilation and Make
- Makefile
- Lecture notes 02: Separate Compilation and Make (continued)
- Makefile
- myadd.c
- myadd.h
- mymod.c
- myprogram.c
Recitation for Week 2: F 9/15 |
- Lab submission process
- Quick review of the Git portion of 9/14 lecture
- Lab workflow and submission using Git
- C language basics
- Integral data types
- Binary numbers
- Integer literals
- Expression vs. statement
- Bitwise operators
- C language basics (continued)
- Bitwise operators (continued)
- Automatic variables
- Static variables
- Lecture notes 04: Storage classes
- Storage classes (continued)
- Static variables (continued)
- Lecture notes 04: Storage classes (continued)
- Stack variable allocation
- Lecture notes 04: Storage classes (continued)
- Pointers (continued)
- Pointer types
- NULL pointers
- Lecture notes 05: Pointers (continued)
- Array basics
Recitation for Week 4: F 9/29 |
- Pointers (continued)
- Simulating pass-by-reference with pointers
- Dangling pointers
- Lecture notes 05: Pointers (continued)
- Heap memory allocation (continued)
- Char arrays as strings
- String literals
- String functions in the Standard C Library
- argv array
- Lecture notes 08: Strings in C
- Review of argv array
- Function pointers
- const qualifier
- qsort() library function
- Complex declarations
- Lecture notes 09: Function pointers
- struct
- Struct member layout
- Struct size
- Pointers to structs
- Linked list
- Lecture notes 10: Structs
- Coverage:
- Labs 1 and 2
- All lecture materials before struct
- Sample exams
- All ANN emails
- Linked list (continued)
- free_all_nodes()
- struct List
- void *data
- Lecture notes 10: Structs (continued)
- Lecture notes 11: Libraries
- stdin , stdout , stderr
- Redirection & pipes
- Lecture notes 12: Standard I/O
- Standard I/O (continued)
- Pipeline demo
- Redirecting to stderr
- FILE pointers
- fopen() , fclose() , fprintf() , fgets() , fputs()
- Lecture notes 13: File I/O (updated on 10/23; new link below)
Recitation for Week 7: F 10/20 |
- Macros & include guards
- Getting stated with lab 3
- File I/O (continued)
- Buffering on standard I/O
- Line buffering vs. block buffering
- fflush()
- ‘b’ mode in fopen()
- fread() , fwrite() , fseek()
- Pages 7-10 updated on 10/23
- Formatted I/O
- sscanf() & sprintf()
- snprintf() vs. strncpy()
- Inspecting binary files
- Little-endian vs. big-endian
- Network byte order
- Lecture notes 14: Endianness
- fmt-io.c
- cut-str.c
- endian-demo.c
- Process management in UNIX
- Spawning processes with fork()
- Exit status codes and waitpid()
- Executing programs with exec()
- Lecture notes 15: fork()
- parent-child.c
- ap-shell.c
- Coverage is technically cumulative, but will focus on post-Exam 1 materials:
- Labs 3 and 4
- Lecture materials up to and including 10/26 lecture
- Sample exams
- All ANN emails
No Class on T 11/7 – Fall Break |
- netcat : TCP/IP swiss army knife
- ./mdb-lookup-cs3157 < mypipe | nc -l 10000 >mypipe
- “shebang” interpreter directive
- Lecture notes 16: UNIX
Recitation for Week 10: F 11/10 |
- Getting started with Lab 5
- Users and file permissions in UNIX
- User and group IDs
- Expressing perms in octal number
- Search permission in directories
- setuid permission in executables
- Lecture notes 16: UNIX
- Five Internet protocol layers
- Lecture notes 17: TCP/IP
- Sockets API
- UNIX I/O using file descriptors
- Sockets API overview
- Simple echo client & server example
- Lecture notes 17: TCP/IP
- Reference slides: Overview of Sockets API and HTTP 1.0
- toupper.c
- tcp-echo-client.c
- tcp-echo-server.c
No Recitation for Week 11 |
Lecture 20: M 11/20 (online) |
- Sockets API
- Simple echo client & server example (continued)
- GET request & response
- Demo using netcat
- Lecture notes 18: HTTP
- tcp-echo-client.c
- tcp-echo-server.c
No Recitation for Week 12 |
- Putting it all together: Sockets API, Endianness, File I/O
- File sender & receiver example
- tcp-sender.c
- tcp-recver.c
- Lab 7 demo
- Web root
- HTTP 1.0 vs HTTP 1.1
- Dynamic web page
No Recitation for Week 13 |
Upcoming Lectures & Exam
- From C to C++: Object-Oriented Programming Exposed
- Source code:
- Coverage is cumulative:
- Labs 1-6
- Lectures up to and including 11/30
- Sample exams
- All ANN emails
- Topics that will definitely be on the exam: fork, netcat
- All other topics are fair game
No Recitation for Week 14 |
Assignments
Last updated: 2023-12-04