CSE341: Programming Languages, Spring 2013

Course Info

Course Information

Lecture: Monday, Wednesday, Friday 12:30-1:20 EEB 037
Section AA: Thursday 12:30-1:20, SIG 134
Section AB: Thursday 1:30-2:20, SIG 134

Office Hours:
Josiah Adams, Mondays 11:30-12:30, department labs CSE002 (Allen Center basement)
Dan Grossman, Tuesdays 11:00-Noon + appointment + try coming by (please visit!), Allen Center 574
Amaris Chen, Wednesdays 2:30-3:30, department labs CSE002 (Allen Center basement)
Patrick Larson, Fridays 1:30-2:30, department labs CSE002 (Allen Center basement)

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 and then at and then cs.washington.edu
  TA: Amaris Chen, amarisch and then at and then cs.washington.edu
  TA: Patrick Larson, palarson and then at and then cs.washington.edu
  TA: Josiah Adams, josiaha and then at and then cs.washington.edu

Course Discussion Board (optional)

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. 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   slides: pptx   pdf   code: errors errors fixed
  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 8-10: Records, Datatypes, Case Expressions   slides: pptx   pdf   pdf6up   code: sml
  9.   L5. Apr 10: More Datatypes and Pattern Matching   slides: pptx   pdf   pdf6up   code: sml
  10.   S2. Apr 11: Type Synonyms, Polymorphism, & More   slides: pptx   pdf   code: sml
  11.   L6. Apr 12-15: 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 15-17: First-Class Functions   slides: pptx   pdf   pdf6up   code: sml
  15.   L8. Apr 19: Lexical Scope and Function Closures   slides: pptx   pdf   pdf6up   code: sml
  16.   S3. Apr 18: Standard-Library Docs, Unnecessary Function Wrapping, Fold & More   slides: pptx   pdf   code: sml
  17.   L9. Apr 22: 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   slides: pptx   pdf   code: sml
  22.   L11. Apr 26-29: Type Inference   slides: pptx   pdf   pdf6up   code: sml
  23.   L12. Apr 29: Equivalence   slides: pptx   pdf   pdf6up
  24.  
  25. Course-Motivation Interlude, May 1  slides  pdf  pdf6up   Videos
  26.  
  27. Unit 5: Racket, Delaying Evaluation, Memoization, Macros    Reading Notes    Videos
  28.   L13. Feb May 1-6: Racket Introduction   slides: pptx   pdf   pdf6up   code: rkt
  29.   L14. Feb May 8: Thunks, Laziness, Streams, Memoization   slides: pptx   pdf   pdf6up   code: rkt
    Some of the material in L14 is covered in S6 instead
  30.   S6. May 9: More streams, memoization, etc.   annotated code: rkt
  31.   L15. May 10: Macros   slides: pptx   pdf   pdf6up   code: rkt
  32.  
  33. Unit 6: Structs, Implementing Languages, Static vs. Dynamic Typing    Reading Notes    Videos
  34.   L16. May 13: Datatype-Style Programming With Lists or Structs   slides: pptx   pdf   pdf6up   code: rkt   sml
  35.   L17. May 15: Implementing Languages Including Closures   slides: pptx   pdf   pdf6up   code: rkt
    Some of the material in L17 is covered in S7 instead
  36.   S7. May 16: Legal ASTs, Macros as Functions, and More   pptx: pptx   pdf: pdf
  37.   L18. May 15,17,20: Static vs. Dynamic Typing   slides: pptx   pdf   pdf6up   code: rkt   sml
  38.  
  39. Unit 7: Ruby, Object-Oriented Programming, Subclassing    Reading Notes    Videos
  40.   L19. May 20-22: Introduction to Ruby and OOP   slides: pptx   pdf   pdf6up   code: lec19_silly.rb   lec19_example.rb
  41.   S8. May 23: Ruby arrays, hashes, ranges, blocks, and more   annotated code: rb
  42.   L20. May 24: Arrays & Such, Blocks & Procs, Inheritance & Overriding   slides: pptx   pdf   pdf6up   code: rb
    Some of the material in L20 is covered in S8 instead
  43.   L21. May 24-29: Dynamic Dispatch Precisely, & Manually in Racket   slides: pptx   pdf   pdf6up   code: rb   sml   rkt
  44.  
  45. Unit 8: Program Decomposition, Mixins, Subtyping, and More    Reading Notes    Videos
  46.   L22. May 29-31: 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
  47.   S9. May 30: Double-Dispatch, Mixins, and Visitors   slides: pptx   pdf   code: sml   rb
  48.   L23. May 31: Multiple Inheritance, Mixins, Interfaces, Abstract Methods   slides: pptx   pdf   pdf6up   code: rb
  49.   L24. June 3-5: Subtyping   slides: pptx   pdf   pdf6up
  50.   L25. June 5: Subtyping for OOP; Comparing/Combining Generics and Subtyping   slides: pptx   pdf   pdf6up
  51.   S10. June 6: Review, Especially Subtyping   slides: pptx   pdf
  52.  
  53. L26. June 7: Course Victory Lap   slides: pptx   pdf   pdf6up
Homeworks

Homework Assignments

Homework 0: on-line survey worth 0 points, "due" Wednesday April 3

Dropbox for homework turn-in

Exams

Midterm: Friday May 3, in class   unsolved   solved
Sample midterms:
   Winter 2013   unsolved   solved
   Fall 2011   unsolved   solved
   Spring 2011   unsolved   solved
   Spring 2008   unsolved   solved
   Winter 2008   unsolved   solved

Final: Thursday June 13, 8:30-10:20   unsolved   solved
Sample finals:
   Winter 2013   unsolved   solved
   Fall 2011   unsolved   solved
   Spring 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.
 Videos showing the software installation on Windows

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 valuable. 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.
   Approximately Chapters 2, 3.1-3.4, 5.1-5.5 (skip 5.2.5, 5.3.4, 5.4.4), 6.1-6.2, 7.1, 8.2, 8.5.5 overlap with the course material.

Racket resources:
  The Racket Guide
   Approximately Chapters 1-4.9.1 (skip 2.4.1-2.4.3, 3.5-3.12, 4.4.3, 4.4.4, 4.6.5), 5.1, 5.2, 6.1-6.5 (skip 6.3), 16.1-16.1.4 overlap with the course material. We might cover some of 7.1, 7.2, 15.1.
  racket-lang.org, particularly the Documentation and Learning tabs

Ruby resources:
  Programming Ruby 1.9: The Pragmatic Programmers' Guide (Facets of Ruby), Dave Thomas et al, 2009.
   Check the errata page to avoid bugs.
   Overlap with the course material is very roughly Chapter 1 through 9 except Chapter 7.
   We will be using Ruby 1.9. While there are significant differences between 1.8 and 1.9 in the language, a 1.8 version of the book below is still a fine resource if that's the one you happen to have.
  ruby-doc.org, including links for the library documentation and various books. You can even buy the t-shirt.
  Ruby home page
  list compiled by Stuart Reges for Spring 2010's CSE341, including lecture slides


Valid CSS! Valid XHTML 1.1