CSE341: Programming Languages, Spring 2019

Course Info

Course Information

Lecture: Monday, Wednesday, Friday 12:30-1:20 CSE2 G01
Section AA: Thursday 12:30-1:20, MGH 234 (Porter)
Section AB: Thursday 1:30-2:20, MGH 254 (Josh)
Section AC: Thursday 2:30-3:20, THO 202 (Taylor, Yuma)
Section AD: Thursday 11:30-12:20, ECE 042 (Lanhao, Alex)

Office Hours:
Yuma: Mondays 10:00-11:00am, CSE2 151
Lanhao: Mondays 3:30-4:30pm, CSE2 151
Taylor: Tuesdays 12:30-1:30pm, CSE2 150
Josh: Tuesdays 3:00-4:00pm, CSE2 150
Dan: Wednesdays 11:00am-12:00pm, CSE2 309
Porter: Thursdays 5:30-7:30pm, CSE2 150
Alex: Fridays 10:30am-12:00pm, CSE2 151

Contact Info

Contact Information

Course Email List (mandatory): You should receive email sent to the course mailing list regularly, roughly at least once a day. Any important announcements will be sent to this list.

Email sent to cse341-staff@cs.washington.edu will reach the instructor and all the TAs. For questions multiple staff members can answer, we encourage you to use this email so that you get a quicker reply and the whole staff is aware of points of confusion.

Course staff:
  All staff: cse341-staff@cs.washington.edu
  Instructor: Dan Grossman, djg@cs.uw.edu (not @u...)
  TA: Taylor Blau, ttaylorr@cs.uw.edu
  TA: Porter Jones, pbjones@cs.uw.edu
  TA: Josh Pollock, joshpoll@cs.uw.edu
  TA: Yuma Tou, yumatou@cs.uw.edu
  TA: Lanhao (Johnny) Wu, lanhaw@uw.edu
  TA: Dongkai (Alex) Xu, sharpnel@cs.uw.edu

Course Discussion Board (optional but encouraged)

For the discussion board, if you are registered in the course, then you should be a member using your UW Google Apps identity (@uw, not @cs).

Anonymous Feedback

Course Materials

Material in the future naturally subject to change in terms of coverage or schedule

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

Homework Assignments

Turn-In Instructions: The Turn-In Form links take you to a Google Form where you enter your name and upload your files. These forms are restricted to UW accounts and you will need to log in to UW Google Apps identity (@uw, not @cs). These are different from any personal Google account you have and different from your UW CSE Google account. If you have not yet activated UW G Suite, you will need to do so first. If you are not signed into to your UW account you may see a page like this. To fix, go to google.com and click on the circle in the upper right to add/switch account.

Exams

Midterm: Friday May 3, in class   unsolved   solved

Sample midterms:
   Fall 2018   unsolved   solved
   Fall 2017   unsolved   solved
   Spring 2017   unsolved   solved
   Spring 2016   unsolved   solved
   Spring 2013   unsolved   solved
   Winter 2013   unsolved   solved
   Fall 2011   unsolved   solved
   Spring 2008   unsolved   solved
   Winter 2008   unsolved   solved

Final Exam: Thursday June 13, 8:30-10:20AM   unsolved   solved

Sample finals:
   Fall 2018   unsolved   solved
   Fall 2017   unsolved   solved
   Spring 2017   unsolved   solved
   Spring 2016   unsolved   solved
   Spring 2013   unsolved   solved
   Winter 2013   unsolved   solved
   Fall 2011   unsolved   solved
   Spring 2008   unsolved   solved
   Winter 2008   unsolved   solved

Software

Software Installation and Use

Instructions for SML and Emacs, which is 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