Course book
Introduction to Computer Science: Harvard CS50
Nine illustrated chapters, one for each lecture. Read each after its lecture to fix the ideas in place, with worked examples small enough to check by hand.
- Chapter 1Bits, Algorithms and BlocksBinary and bytes, how text and colour are stored, searching a phone book three ways, pseudocode, and programming with Scratch.
- Chapter 2Writing and Compiling CFrom source code to machine code, types and operators, conditions, loops and functions, integer overflow and floating-point imprecision.
- Chapter 3Many Values, and Putting Them in OrderThe four steps of compiling, debugging, arrays, strings as arrays of characters, command-line arguments, ciphers, and sorting algorithms compared.
- Chapter 4Addresses, Pointers and the HeapHexadecimal, pointers and dereferencing, strings as pointers, malloc and free, the stack and the heap, overflows and reading files.
- Chapter 5Arranging Data for SpeedResizing arrays, linked lists built from structs and pointers, binary search trees, hash tables, tries, and stacks and queues.
- Chapter 6From an Address to a PageIP addresses, routers, DNS, packets and ports, HTTP requests and status codes, HTML as a tree of tags, and CSS selectors.
- Chapter 7A Higher-Level LanguagePython compared with C, interpreting versus compiling, lists, tuples, dictionaries and sets, functions, exceptions, arguments and files.
- Chapter 8Building Dynamic Web ApplicationsRoutes, Jinja templates and layouts, forms with GET and POST, validating input, storing data, sessions, and the model-view-controller pattern.
- Chapter 9Storing and Querying DataRelational databases and column types, CRUD in SQL, summaries and grouping, linking tables with keys and joins, indexes, transactions and placeholders.