CS107 - Programming Paradigms

CS107: Programming Paradigms (Stanford Univ.). Taught by Professor Jerry Cain, this course introduces several programming languages, including C, Assembly, C++, Concurrent Programming, Scheme, and Python. The class aims to teach students how to write code for each of these individual languages and to understand the programming paradigms behind these languages. Topics: Advanced memory management features of C and C++; the differences between imperative and object-oriented paradigms. The functional paradigm (using LISP) and concurrent programming (using C and C++). Brief survey of other modern languages such as Python, Objective C, and C#. (from


Lecture 01 - Introduction
Lecture 02 - C/C++ Data Types - Interpretations, Sizes, Bits
Lecture 03 - Converting Between Types of Different Sizes and Bit Representations Using Pointers
Lecture 04 - Generic Swap Function, Swapping Pointers, Generic Linear Search
Lecture 05 - Generic Linear Search, C Stack
Lecture 06 - Stack Implementation, Reimplementing the Stack Interface as a Generic Data Structure
Lecture 07 - Problems with Ownership of Memory
Lecture 08 - Heap Management, Stack Segment
Lecture 09 - How a Code Snippet is Translated into Assembly Instructions
Lecture 10 - More Detail about Activation Records - Layout of Memory During a Function Call
Lecture 11 - Moving from C Code Generation to C++ Code Generation: Basic Swap Example
Lecture 12 - Preprocessing Commands, Preprocessing Macros
Lecture 13 - Review of Compilation Process of a Simple Program, How Linking and Compilation Work Together
Lecture 14 - Several Code Examples, Sequential Programming Vs. Concurrent Programming
Lecture 15 - Transitioning from Sequential Programming to Concurrent Programming in the Ticket Sale Example
Lecture 16 - Review of Semaphore Syntax, Using Semaphores, Dining Philosopher Problem
Lecture 17 - Review of the Dining Philosopher Problem, Practical Applications of Threading
Lecture 18 - The Ice Cream Store Problem, with Customer, Cashier, Clerk, and Manager Threads
Lecture 19 - Introduction to the Functional Paradigm (Scheme), Scheme Programming Language
Lecture 20 - Scheme Programming Language: Recursive Flatten Function
Lecture 21 - Scheme Programming Language: The Kawa Development Environment, Functions
Lecture 22 - Scheme Programming Language: Several Detailed Code Examples
Lecture 23 - Scheme Programming Language: Memory Model, Code Examples
Lecture 24 - Overarching Features of Python: Scripting Language, Python Environment, Examples
Lecture 25 - How Objects Are Implemented in Python, Python Dictionary Implementation
Lecture 26 - XML Processing and Python - Two Different XML Processing Models
Lecture 27 - Guest Lecturer: Sasha Rush, Haskell Programming Language and Several Code Examples

CS107 - Programming Paradigms
Instructors: Professor Jerry Cain. Handouts. Assignments. Exams. This course introduces several programming languages, including C, Assembly, C++, Concurrent Programming, Scheme, and Python.