CSE341: Programming Languages, Winter 2013

Course Info

Course Information

Lecture: Monday, Wednesday, Friday 12:30-1:20 CMU 120
Section AA: Thursday 12:30-1:20, EEB 105
Section AB: Thursday 1:30-2:20, EEB 105

Office Hours:
Dan Grossman, Allen Center 574, Thursdays 10:45-11:45 + appointments + try coming by (please visit!)
Sunjay Cauligi, Allen Center 002 (basement lab), Fridays 2:30-3:30
Eric Mullen, Allen Center 220, Thursdays 2:30-3:30
Cody Schroeder, Allen Center 218, Wednesdays 11:00-12:00
Rachel Sobel, Allen Center 022 (basement lab), Mondays 2:30-3:30
Sean Wu, Allen Center 220, Tuesdays 12:00-1:00

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.

Course staff:
  All staff: cse341-staff@cs.washington.edu
  Instructor: Dan Grossman, djg and then at and then cs.washington.edu
  TA: Sunjay Cauligi sunjayc then at and then cs.washington.edu
  TA: Eric Mullen emullen then at and then cs.washington.edu
  TA: Cody Schroeder codys then at and then cs.washington.edu
  TA: Rachel Sobel rs then at and then cs.washington.edu
  TA: Sean Wu wujsean then at and then cs.washington.edu
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 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. Jan 7-9: Course Mechanics, ML Variable Bindings   slides: pptx   pdf   pdf6up   code: sml
  3.   L2. Jan 9: Functions, Pairs, Lists   slides: pptx   pdf   pdf6up   code: sml
  4.   S1. Jan 10: Emacs, SML Mode, Shadowing, Error Messages   slides: pdf   pdf4up   code: errors.sml   solutions.sml
  5.   L3. Jan 11: 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. Jan 14: Records, Datatypes, Case Expressions   slides: pptx   pdf   pdf6up   code: sml
  9.   L5. Jan 16: More Datatypes and Pattern Matching   slides: pptx   pdf   pdf6up   code: sml
  10.   S2. Jan 17: Type Synonyms, Polymorphism, & More   slides:   pptx   pdf   code:   synonyms.sml   generics.sml   equality.sml   fun_patterns.sml
  11.   L6. Jan 18: Nested Pattern-Matching, Exceptions, Tail Recursion   slides: pptx   pdf   pdf6up   code: sml
    Tail recursion moved to Jan 23 after the Jan 21 holiday
  12.  
  13. Unit 3: First-Class Functions and Closures    Reading Notes    Videos
  14.   L7. Jan 23: First-Class Functions   slides: pptx   pdf   pdf6up   code: sml
  15.   S3. Jan 24: Standard-Library Docs, Unnecessary Function Wrapping, Map, & More   slides: pdf   pdf4up   code: sec3.sml   higher-order.sml
  16.   L8. Jan 25: Lexical Scope and Function Closures   slides: pptx   pdf   pdf6up   code: sml
  17.   L9. Jan 28: Function-Closure Idioms   slides: pptx   pdf   pdf6up   code: sml
  18.  
  19. Unit 4: ML Modules, Type Inference, Equivalence, & More    Reading Notes    Videos
  20.   L10. Jan 30: ML Modules   slides: pptx   pdf   pdf6up   code: sml
  21.   S4. Jan 31: Mutual Recursion, More Currying, More Modules   slides:   pptx   pdf   code:   all_pairs.sml   bank.sml   mutual_rec.sml
  22.   L11. Feb 1: Type Inference   slides: pptx   pdf   pdf6up   code: sml
  23.   L12. Feb 4: Equivalence   slides: pptx   pdf   pdf6up
  24.  
  25. Course-Motivation Interlude, Feb 4-6  slides  pdf  pdf6up   Videos
  26.  
  27. Unit 5: Racket, Delaying Evaluation, Memoization, Macros    Reading Notes    Videos
  28.   L13. Feb 6-11: Racket Introduction   slides: pptx   pdf   pdf6up   code: rkt
  29.   S5. Feb 7 <Midterm Review for Midterm on Feb 8>
  30.   L14. Feb 13: Thunks, Laziness, Streams, Memoization   slides: pptx   pdf   pdf6up   code: rkt
    Some of the material in L14 is covered in S6 instead
  31.   S6. Feb 14: More streams, memoization, etc.   slides: pdf   pdf6up   code: sec6.rkt   streams.rkt
  32.   L15. Feb 15: Macros   slides: pptx   pdf   pdf6up   code: rkt
  33.  
  34. Unit 6: Structs, Implementing Languages, Static vs. Dynamic Typing    Reading Notes    Videos
  35.   L16. Feb 15-20: Datatype-Style Programming With Lists or Structs   slides: pptx   pdf   pdf6up   code: rkt   sml
  36.   L17. Feb 20-22: Implementing Languages Including Closures   slides: pptx   pdf   pdf6up   code: rkt
    Some of the material in L17 is covered in S7 instead
  37.   S7. Legal ASTs, Macros as Functions, and More   slides: pdf
  38.   L18. Feb 22-25: Static vs. Dynamic Typing   slides: pptx   pdf   pdf6up   code: rkt   sml
  39.  
  40. Unit 7: Ruby, Object-Oriented Programming, Subclassing    Reading Notes    Videos
  41.   L19. Feb 27: Introduction to Ruby and OOP   slides: pptx   pdf   pdf6up   code: lec19_silly.rb   lec19_example.rb
  42.   S8. Ruby arrays, hashes, ranges, blocks, and more slides   (See also material posted with L20.)
    Some of the material in L20 is covered in S8 instead
  43.   L20. Mar 1-4: Arrays & Such, Blocks & Procs, Inheritance & Overriding   slides: pptx   pdf   pdf6up   code: rb
  44.   L21. Mar 4-6: Dynamic Dispatch Precisely, and Manually in Racket   slides: pptx   pdf   pdf6up   code: rb   sml   rkt
  45.  
  46. Unit 8: Program Decomposition, Mixins, Subtyping, and More    Reading Notes    Videos
  47.   L22. Mar 6-8: 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
  48.   S9. Mar 7: Double-Dispatch, Expression Problem, Mixins, and Visitors   slides: pdf   pdf6up   code: janken.rb   janken.sml   helpers.sml   mixins.rb   visitor.rb   visitor.sml
  49.   L23. Mar 8: Multiple Inheritance, Mixins, Interfaces, Abstract Methods   slides: pptx   pdf   pdf6up   code: rb
  50.   L24. Mar 11-13: Subtyping   slides: pptx   pdf   pdf6up
  51.   L25. Mar 13: Subtyping for OOP; Comparing/Combining Generics and Subtyping   slides: pptx   pdf   pdf6up
  52.   S10. Mar 14: Review, Especially Subtyping   slides: pdf   counter-examples
  53.  
  54. L26. Mar 15: Course Victory Lap   slides: pptx   pdf   pdf6up
Homeworks

Homework Assignments

Homework 0: on-line survey worth 0 points, "due" Wednesday January 9

Dropbox for homework turn-in

Exams

Midterm: Friday February 8, in class   unsolved   solved
Sample midterms:
   Fall 2011   unsolved   solved
   Spring 2011   unsolved   solved
   Spring 2008   unsolved   solved
   Winter 2008   unsolved   solved

Final: Thursday March 21, 8:30-10:20   unsolved   solved
Sample finals:
   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

Books+

Textbooks and Other Resources

While the other materials on this page (lectures, sections, homeworks, installation instructions, videos) are designed to provide what you need for the course, the books/guides provide alternate explanations and additional details. We will not follow them closely, but you may still find them valuable. Suggestions for additional links are welcome.

Elements of ML Programming, ML'97 Edition, Jeffrey D. Ullman, 1998.
 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.

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.

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 is still a fine resource if that's the one you happen to have.

In addition to the texts above, there are many useful online resources for the languages we are using. In particular, effective use of any language involves leveraging existing libraries, which requires more library documentation than any class should cover. There are also many tutorials and guides that you may find useful.

Additional SML resources:
  www.smlnj.org (links to many things, including the next three resources)
  user's guide
  standard-library documentation
  tutorials, books, and documentation

Additional Racket resources:
  racket-lang.org, particularly the Documentation and Learning tabs

Additional Ruby resources:
  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