CSE341: Programming Languages, Summer 2019

Announcements

Announcements

Course Info

Course Information

Lecture: Monday, Wednesday, Friday 12:00-1:00 ECE 037
Section: Thursday 12:00-1:00, MOR 230 (Brendan)

Office Hours:
 Brett: Fridays, 2:00pm-3:00pm, CSE 446
 Brendan: Mondays, 11:00am-12:00pm, CSE2 152
 Svetoslav: Wednesdays, 1:00pm-2:00pm, CSE2 152

Contact

Contact Information

Course staff:
  Instructor: Brett Wortzman, brettwo@cs.uw.edu (not @uw...)
  TA: Brendan Murphy, bsmurphy@uw.edu
  TA: Svetoslav Kolev, swetko@cs.uw.edu

Course Discussion Board
You are encouraged to post questions on the message board rather than emailing course staff. This will allow us to see all questions in one place, and also allow students to benefit from (and help answer!) each other's questions.

Course Email List
Any important announcements will be sent to this list. Be sure you either check your @uw email address or have changed the address subscribed to that list.

Anonymous Feedback

Materials

Course Materials

This list should accurately reflect the past, but may not accurately predict the future. Please allow at least 24 hours after class for any changes or new materials to be posted.

  1. Unit 1: ML Functions, Tuples, Lists, and More    Reading Notes    Videos
  2.   L1. Course Mechanics, ML Variable Bindings (Jun 24)   slides:  pptx   pdf   pdf6up   code: sml
  3.   L2. Functions, Pairs, Lists (Jun 26 - Jun 28)   slides: pptx   pdf   pdf6up   code: sml
  4.   S1. Emacs, SML Mode, Shadowing, Error Messages (Jun 27)   slides: pptx   pdf  code: errors   errors fixed
  5.   L3. Local Bindings, Options, Benefits of No Mutation (Jun 28 - Jul 1)   slides: pptx   pdf   pdf6up   code: sml
  6.  
  7. Unit 2: Datatypes, Pattern Matching, Tail Recursion, and More    Reading Notes    Videos
  8.   L4. Records, Datatypes, Case Expressions (Jul 3)   slides: pptx   pdf   pdf6up   code: sml
  9.   L5. More Datatypes and Pattern Matching (Jul 5)   slides: pptx   pdf   pdf6up   code: sml
  10.   S2. Type Synonyms, Polymorphism, & More (N/A) Cancelled due to holiday. Content covered in S1 and L5.
  11.   L6. Nested Pattern-Matching, Exceptions, Tail Recursion (Jul 8)   slides: pptx   pdf   pdf6up   code: sml
  12.  
  13. Unit 3: First-Class Functions and Closures    Reading Notes    Videos
  14.   L7. First-Class Functions (Jul 10)   slides: pptx   pdf   pdf6up   code: sml
  15.   S3. Pattern Matching and Tail Recursion (Jul 11)   slides: pptx   pdf  code: code
  16.   L8. Lexical Scope and Function Closures (Jul 12)   slides: pptx   pdf   pdf6up   code: sml
  17.   L9. Function-Closure Idioms (Jul 15)   slides: pptx   pdf   pdf6up   code: sml
  18.  
  19. Unit 4: ML Modules, Type Inference, Equivalence, and More    Reading Notes    Videos
  20.   L10. ML Modules (Jul 17)   slides: pptx   pdf   pdf6up   code: sml
  21.   S4. Higher-Order Functions, Closures (Jul 18)   slides: pptx   pdf  code: starter code   completed code
  22.   L11. Type Inference (Jul 19)   slides: pptx   pdf   pdf6up   code: sml
  23.   L12. Equivalence (Jul 19 - Jul 22)   slides: pptx   pdf   pdf6up
  24.  
  25. S5. Midterm Review (Jul 25)
  26.  
  27. Unit 5: Racket, Delaying Evaluation, Memoization, Macros    Reading Notes    Videos
  28.   L13. Racket Introduction (Jul 22 - Jul 29)   slides: pptx   pdf   pdf6up   code: rkt
  29.   L14. Thunks, Laziness, Streams, Memoization (Jul 29 - Jul 31)   slides: pptx   pdf   pdf6up   code: rkt
  30.   L15. Macros (Material covered in S6)   slides: pptx   pdf   pdf6up   code: rkt
  31.   S6. Delayed Evaluation, Thunks and Streams, Macros (Aug 1)   slides: pptx   pdf  code: rkt
  32.  
  33. Unit 6: Structs, Implementing Languages, Static vs. Dynamic Typing    Reading Notes    Videos
  34.   L16. Datatype-Style Programming With Lists or Structs (Aug 2)   slides: pptx   pdf   pdf6up   code: rkt   sml
  35.   L17. Implementing Languages Including Closures (Aug 5)   slides: pptx   pdf   pdf6up   code: rkt
  36.   L18. Static vs. Dynamic Typing (Aug 7)   slides: pptx   pdf   pdf6up
  37.   S7. Legal ASTs, Macros as Functions, and More (Aug 8)   slides: pdf  code: rkt
  38.  
  39. Unit 7: Ruby, Object-Oriented Programming, Subclassing    Reading Notes    Videos
  40.   L19. Introduction to Ruby and OOP (Aug 9 - Aug 12)   slides: pptx   pdf   pdf6up   code: lec19_silly.rb   lec19_example.rb
  41.   L20. Arrays & Such, Blocks & Procs, Inheritance & Overriding (Aug 12)   slides: pptx   pdf   pdf6up   code: rb
       Some of the material in L20 will be covered in S8 instead
  42.   L21. Dynamic Dispatch Precisely, and Manually in Racket (Aug 14)   slides: pptx   pdf   pdf6up   code: rb   sml   rkt
  43.   S8. Ruby arrays, hashes, ranges, blocks, and more (Aug 15)   slides: pdf  code: rb
  44.  
  45. Unit 8: Program Decomposition, Mixins, Subtyping, and More    Reading Notes    Videos
  46.   L22. OOP vs. Functional Decomposition; Adding Operators & Variants; Double-Dispatch (Aug 14 - Aug 16)
       slides: pptx   pdf   pdf6up   code stage A:   sml   rb   java   code stage B:   sml   rb   java   code stage C:   sml   rb   java
  47.   L23. Multiple Inheritance, Mixins, Interfaces, Abstract Methods (Aug 16 - Aug 19)   slides: pptx   pdf   pdf6up   code: rb
  48.   L24. Subtyping (not covered)   slides: pptx   pdf   pdf6up
  49.   L25. Subtyping for OOP; Comparing/Combining Generics and Subtyping (not covered)   slides: pptx   pdf   pdf6up
  50.  
  51. L26. Course Victory Lap (Aug 21)   slides: pptx   pdf   pdf6up
  52.  
  53. S10. Final Exam Review
Homework

Homework Assignments

Turn in assignments (exception HW0) via Gradescope

Exams

Important note: while our exams will cover roughly the same material as the sample exams, the actual type, order, or style of questions may vary. Be careful not to overfit your preparation to the specific questions in the sample exams.

Midterm: Friday July 26, in class   unsolved   solved

Sample midterms:
   Spring 2019   unsolved   solved
   Winter 2019   unsolved   solved
   Fall 2018   unsolved   solved
   Fall 2017   unsolved   solved
   Spring 2017   unsolved   solved
   Spring 2016   unsolved   solved


Final Exam: Friday, August 23, in class   unsolved   solved
Since the final exam period in summer quarter is only one hour, our final exam will cover only a subset of the material on these sample exams.

Sample finals:
   Spring 2019   unsolved   solved
   Winter 2019   unsolved   solved
   Fall 2018   unsolved   solved
   Fall 2017   unsolved   solved
   Spring 2017   unsolved   solved
   Spring 2016   unsolved   solved

Software

Software Installation and Use

Instructions for SML and Emacs
Everything you need for the first half of the course.

Instructions for Racket and DrRacket

Instructions for Ruby and irb

Links

Links to Other Resources

The course materials on this page (lectures, sections, homeworks, installation instructions, videos) are designed to provide what you need for the course except for some details that you can look up in standard-library documentation or users' guides for particular languages. Links for such information is below. We also provide links to useful books and tutorials that provide alternate explanations. We will not follow any textbooks closely, but you may still find them useful. Suggestions for additional links are welcome.

SML resources:
  www.smlnj.org (links to many things, including the next three resources)
  user's guide
  standard-library documentation
  tutorials, books, and documentation
  Elements of ML Programming, ML'97 Edition, Jeffrey D. Ullman, 1998.
   This is a textbook that takes a different approach but does cover some of the same material.
   Check the errata page to avoid bugs.

Racket resources:
  The Racket Guide
  racket-lang.org, particularly the Docs button

Ruby resources:
  Programming Ruby 1.9 & 2.0: The Pragmatic Programmers' Guide, Dave Thomas et al.
   Check the errata page to avoid bugs.
  ruby-doc.org
  Ruby home page