CSE341: Programming Languages, Autumn 2017

Course Info

Course Information

Lecture: Monday, Wednesday, Friday 2:30-3:20 MGH 241
Section AA: Thursday 12:30-1:20, MGH 242
Section AB: Thursday 1:30-2:20, MGH 284
Section AC: Thursday 2:30-3:20, MGH 284

Office Hours:
Mondays, 11:00AM-12:00PM, CSE574, Dan Grossman
Tuesdays, 10:30-11:20AM, CSE006, Xander Lent
Wednesdays, 1:00-2:00PM, CSE021, Bader Tayeb
Thursdays, 9:30-10:30AM, CSE220, Eric Mullen
Fridays, 12:00-1:00PM, CSE 3rd Floor Breakout, Kush Gupta
Fridays, 3:30-4:20PM, CSE 4th Floor Breakout, Tam Dang

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: Tam Dang, dangt7@uw.edu
  TA: Kush Gupta, bluek7@cs.uw.edu
  TA: Xander Lent, lenta@cs.uw.edu
  TA: Eric Mullen, emullen@cs.uw.edu
  TA: Bader Tayeb, bader2@cs.uw.edu

Course Discussion Board (optional but encouraged)

For the discussion board, we took an initial class list and registered everyone with their @cs.washington.edu email (or @uw.edu if you don't have an @cs.washington.edu). If you joined the class later, please contact the course staff and we will add you.

Anonymous Feedback (goes only to the instructor)

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. Sep 27-29: Course Mechanics, ML Variable Bindings   slides: pptx   pdf   pdf6up   code: sml
  3.   S1. Sep 28: Emacs, SML Mode, Shadowing, Error Messages
      Xander slides: pptx   pdf   pdf6up      Eric slides: pptx   pdf   pdf6up      code:   errors   errors fixed
  4.   L2. Sep 29 - Oct 2: Functions, Pairs, Lists   slides: pptx   pdf   pdf6up   code: sml
  5.   L3. Oct 2-4. Local Bindings, Options, Benefits of No Mutation   slides: pptx   pdf   pdf6up   code: sml
  7. Unit 2: Datatypes, Pattern Matching, Tail Recursion, and More    Reading Notes    Videos
  8.   L4. Oct 4-6: Records, Datatypes, Case Expressions   slides: pptx   pdf   pdf6up   code: sml
  9.   S2. Oct 5: Type Synonyms, Polymorphism, & More   slides: pptx   pdf   pdf6up   code: sml
  10.   L5. Oct 6-9: More Datatypes and Pattern Matching   slides: pptx   pdf   pdf6up   code: sml
  11.   L6. Oct 9-11: Nested Pattern-Matching, Exceptions, Tail Recursion   slides: pptx   pdf   pdf6up   code: sml
  13. Unit 3: First-Class Functions and Closures    Reading Notes    Videos
  14.   L7. Oct 11-13: First-Class Functions   slides: pptx   pdf   pdf6up   code: sml
  15.   S3. Oct 12: Standard-Library Docs, Unnecessary Function Wrapping, Fold & More code: sml
  16.   L8. Oct 13-16: Lexical Scope and Function Closures   slides: pptx   pdf   pdf6up   code: sml
  17.   L9. Oct 16-18: Function-Closure Idioms   slides: pptx   pdf   pdf6up   code: sml
  19. Unit 4: ML Modules, Type Inference, Equivalence, & More    Reading Notes    Videos
  20.   L10. Oct 18-20: ML Modules   slides: pptx   pdf   pdf6up   code: sml
  21.   S4. Oct 19: Mutual Recursion, More Currying, More Modules   slides: pptx   pdf   pdf6up   code: sml
  22.   L11. Oct 23: Type Inference   slides: pptx   pdf   pdf6up   code: sml
  23.   L12. Oct 25: Equivalence   slides: pptx   pdf   pdf6up
  25. Course-Motivation Interlude, Oct 25-27  slides  pdf  pdf6up   Videos
  27.   S5. Oct 26: Midterm Review
  29. Unit 5: Racket, Delaying Evaluation, Memoization, Macros    Reading Notes    Videos
  30.   L13. Oct 27, Nov 1: Racket Introduction   slides: pptx   pdf   pdf6up   code: rkt
  31.   L14. Nov 3: Thunks, Laziness, Streams, Memoization   slides: pptx   pdf   pdf6up   code: rkt
    Some of the material in L13 and L14 was covered in S6 instead
  32.   S6. Nov 2: Mutation, Delayed Evaluation   pptx   pdf   pdf6up   code: rkt
  33.   L15. Nov 6: Macros   slides: pptx   pdf   pdf6up   code: rkt
  35. Unit 6: Structs, Implementing Languages, Static vs. Dynamic Typing    Reading Notes    Videos
  36.   L16. Nov 6, 8: Datatype-Style Programming With Lists or Structs   slides: pptx   pdf   pdf6up   code: rkt   sml
  37.   L17. Nov 8, 13: Implementing Languages Including Closures   slides: pptx   pdf   pdf6up   code: rkt
    Some of the material in L17 will be covered in S7 instead
  38.   S7. Legal ASTs, Macros as Functions, and More   pptx   pdf   pdf6up   code: rkt
  39.   L18. Nov 13, 20: Static vs. Dynamic Typing   slides: pptx   pdf   pdf6up   code: rkt   sml
  41. Unit 7: Ruby, Object-Oriented Programming, Subclassing    Reading Notes    Videos
  42.   L19. Nov 15, 20: Introduction to Ruby and OOP   slides: pptx   pdf   pdf6up   code: lec19_silly.rb   lec19_example.rb
  43.   S8. Nov 16: Ruby arrays, hashes, ranges, blocks, and more   code: sec8.rb
  44.   L20. Arrays & Such, Blocks & Procs, Inheritance & Overriding   slides: pptx   pdf   pdf6up   code: rb
    Some of the material in L20 will be covered in S8 instead
  45.   L21. Dynamic Dispatch Precisely, & Manually in Racket   slides: pptx   pdf   pdf6up   code: rb   sml   rkt

Homework Assignments

Homework 0: on-line survey worth 0 points, "due" Friday September 29, 11PM

Turn-In Instructions for regular homeworks: 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 G Suite (G as in Google) with your UW credentials. 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.


Midterm: Monday October 30, in class   unsolved   solved

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

Final Exam: Tuesday December 12, 2:30-4:20PM
Will post more information and sample exams closer to the exam date


Software Installation and Use

Instructions for SML and Emacs, which is everything you need for the first half of the course.
 Videos showing the software installation on Windows

Instructions for Racket and DrRacket

Instructions for Ruby and irb


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 home page