% lec 24: wrapup # administrivia Q&A Monday, 11:30-12:20, 560 final exam Wednesday, 2:30, here everything: lectures/sections/exercises/hws/readings including today's reading, minus Rust/JavaScript # today's plan what have we been doing for the last 10 weeks? # course goals programming: C/C++ systems: talk to the OS for fs/net/proc/thread/... tools: make, gcc, gdb, valgrind, nc, ... coding discipline deal with uncertainty: debugging, learning, communication curiosity # C: a high-level assembler designed to write OSes (Unix) abstractions: fixed-width integers, pointers, structs, ... control: compilers won't generate code you didn't write "easy" to understand & tune performance trade-off: easy to shoot oneself in the foot # C++: a better C (or not) tries to keep the good/low-level part higher-level abstractions encapsulation: class (members/methods), namespace polymorphism: virtual functions & templates (compare to function pointers & macros) examples: `std::string` vs `char *`, `std::thread` vs pthreads # programming beyond C/C++ performance vs safety: garbage collection, big integers? choose language(s) that work best for your applications real-world concerns: easy to hire? fit existing code bases? keep an open mind: Rust, Go, Java, Racket, OCaml, Haskell, ... # systems overview this course: programming interface to the kernel memory management, file systems, networking, threading general principles # systems: abstractions naming: filenames, DNS, IP file descriptors # systems: virtualization virtual address: mmap, processes virtual processor: processes/threads example: valgrind # systems: layering example: `FILE *`, fd, kernel, disk example: HTTP, TCP, IP, link layer caching (fsync) interface (zero-copying) # tools: make our life easier segfaults: much worse when bugs don't segfault valgrind: find memory leaks without it? how to build tools & design tool-friendly systems/languages example: Linux kernel example: g vs ms # coding discipline know what (not) to use less error-prone constructs performance trade-off example: `new`/`delete` vs `unique_ptr` # communication programming is _not_ everything in: reading books/google/stackoverflow/manpages out: giving talks & writing # future courses [341: programming langauges](http://courses.cs.washington.edu/courses/cse341/): principles & foundations [451: operating systems](http://courses.cs.washington.edu/courses/cse451/): lowest level of software stack [452: distributed systems](http://courses.cs.washington.edu/courses/cse452/): time, failure, coordination grad courses: 505, 550, 551, 552 # beyond 333 my humble advice "perfect is the enemy of good": end-to-end first; then improve get your hands dirty (e.g., big-endian hands-on, learn Go in 452) know yourself: what you like & you are good at # that's it congratulations & good luck on the exam(s)! big thanks to Sunjay, Renshu, Josue, Edward! stay in touch: drop by 560, grab lunch, emails