Send Close Add comments: (status displays here)
Got it!  This site uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.nbsp; Note: This appears on each machine/browser from which this site is accessed.
CS 340 FALL 2019: Calendar


1. CS 340 FALL 2019: Calendar

Note: This calendar and coverage is subject to change. Major changes to notes can happen until after that class meeting. Minor changes to notes can happen after that class meeting.
 CS340 sections: [29 meetings]
 CS340 calendar: [29 meetings]
SundayMondayTuesdayWednesdayThursdayFridaySaturday
Aug 25
Aug 26
Aug 27
#1
Aug 28
Aug 29
#2
Aug 30
Aug 31
Sep 1
Sep 2
Labor Day
Sep 3
#3
Sep 4
Sep 5
#4:  Q1 
Sep 6
Sep 7
Sep 8
Sep 9
Sep 10
#5
Sep 11
Sep 12
#6:  Q2 
Sep 13
Sep 14
Sep 15
Sep 16
Sep 17
#7
Sep 18
Sep 19
#8:  Q3 
Sep 20
:  A1 
Sep 21
Sep 22
Sep 23
Sep 24
#9
Sep 25
Sep 26
#10:  Q4 
Sep 27
:  A2 
Sep 28
Sep 29
Sep 30
Oct 1
#11
Oct 2
Oct 3
#12
Oct 4
:  A3 
Oct 5
Oct 6
Oct 7
Oct 8
#13
Oct 9
:  Q5 
Oct 10
#14:  E1 
Oct 11
Oct 12
Fall Break
Oct 13
Fall Break
Oct 14
Fall Break
Oct 15
Fall Break
Oct 16
Oct 17
#15
Oct 18
Oct 19
Oct 20
Oct 21
:  P1 
Oct 22
#16
Oct 23
:  P2 
Oct 24
#17
Oct 25
:  A4 
Oct 26
Oct 27
Oct 28
Oct 29
#18
Oct 30
:  P3 
Oct 31
#19:  Q6 
Nov 1
:  A5 
Nov 2
Nov 3
Nov 4
Nov 5
#20
Nov 6
Nov 7
#21:  Q7 
Nov 8
:  A6 
Nov 9
Nov 10
Nov 11
Nov 12
#22
Nov 13
Nov 14
#23:  Q8 
Nov 15
:  A7 
Nov 16
Nov 17
Nov 18
Nov 19
#24:  Q9 
Nov 20
Nov 21
#25:  E2 
Nov 22
:  P4 
Nov 23
Nov 24
Nov 25
Nov 26
#26
Nov 27
Thanksgiving
Nov 28
Thanksgiving
Nov 29
Thanksgiving
Nov 30
Thanksgiving
Dec 1
Thanksgiving
Dec 2
Dec 3
#27
Dec 4
Dec 5
#28:  Q10 
Dec 6
:  P5 
Dec 7
Dec 8
Dec 9
Dec 10
#29
Dec 11
Reading Day
Dec 12
Final Exams:  F1   Q11 
Dec 13
Final Exams
Dec 14
Final Exams
Dec 15
Final Exams
Dec 16
Final Exams
Dec 17
Final Exams
Dec 18
Commencement
Dec 19
Dec 20
Dec 21
 CS340 meetings summary: [29 meetings]
 CS340 meetings details: [29 meetings]
Tue, Aug 27 : #1: Intro, software installation checks, etc. [notes]
Having an overview of computer science, fundamental problems in computer science, the nature of programming languages and how these relate to this course is important.
  • Robin Snyder: office hours and class times
  • Welcome to this class
  • Introduction to computer science
  • Copy-update problem
  • Programming languages
  • Syllabus: CS 340 - Fall 2019
  • Thu, Aug 29 : #2: Counting, bases, conversion [notes]
    Counting is very important and we will need some of the code examples for programming language example use.
  • Cards for mind-reading card trick
  • Counting: introduction
  • Counting: importance
  • Counting: bases 2, 10, and 16
  • Counting: Decimal to binary
  • Counting: Data representation
  • Counting: Algorithms
  • Counting: Base conversions
  • Counting suffixes
  • Online base converter
  • Binary and hex dumps (added 2019-09-09 from what was done in class on 2019-08-29)
  • Decimal to binary: program examples (added 2019-09-09)
  • Tue, Sep 3 : #3: Hello world, programs that write programs [notes]
  • The light switch problem
  • I1: My story
  • Counting exercise/quiz
  • The Lua programming language
  • Programs that write programs
  • Hello world in many languages
  • Top-down vs. bottom-up
  • Thu, Sep 5 : #4: Imperative languages, more Hello world [notes]
  • Q1: Quiz#1: Base conversion (on Thu, Sep 5)
  • Computations, Programming languages, Notations
  • Character data
  • Character data
  • Tue, Sep 10 : #5: Logic and truth tables [notes]
  • The Python programming language
  • Pipes and redirection
  • Two-valued logic: Introduction
  • Two-valued logic: Operators
  • Truth tables: manual method
  • DeMorgan's Laws
  • Thu, Sep 12 : #6: Logical expression definitions, intro to grammars and JSON [notes]
  • Q2: Quiz#2: Truth table, tree (on Thu, Sep 12)
  • The JavaScript programming language
  • Abstraction and psychological chunking
  • Logical expression definitions
  • JSON
  • One-time pads
  • Tue, Sep 17 : #7: Prefix, infix, postfix notations, programmed truth tables [notes]
  • Alan Kay and Smalltalk
  • Logical expressions
  • Truth tables: programmed method
  • Automata theory
  • Traveling train puzzle
  • Thu, Sep 19 : #8: Tree representation and traversal [notes]
  • Q3: Quiz#3: Infix, prefix, postfix expressions (on Thu, Sep 19)
  • Pascal and related programming languages
  • Towers of Hanoi
  • Tree representation and traversal
  • A1: Asmt#1: Programs that write programs (due Fri, Sep 20, not available)
  • Tue, Sep 24 : #9: Stack-based postfix code [notes]
  • Traveling train puzzle (revisited)
  • The C programming language
  • The C language preprocessor
  • Boolean operations using integers
  • Tree evaluation
  • Postfix traversal to generate code
  • Stack-based code execution
  • Thu, Sep 26 : #10: DSL: Graphviz and trees [notes]
  • Q4: Quiz#4: Truth table, tree, code (on Thu, Sep 26)
  • Associativity for expressions and trees
  • The C++ programming language
  • Project overview
  • Problem solving and decision making
  • Problem solving for document writing
  • Domain specific languages
  • Graphviz: dot (getting started)
  • GraphViz: expression trees
  • Recursion introduction
  • Towers of Hanoi: code complexity
  • Self-similarity and fractals
  • A2: Asmt#2: Programmed truth table (due Fri, Sep 27, not available)
  • Tue, Oct 1 : #11: DSL: Regular expression pattern matching [notes]
  • Project ideas: C program processing
  • The Java programming language
  • Regular expressions
  • Regular expressions: Tester
  • Thu, Oct 3 : #12: Lists and dictionaries [notes]
  • The PHP programming language
  • Postfix code to tree
  • Lists
  • Dicts
  • Simple JavaScript IDE
  • Regular expressions and printf (started but not complete)
  • A3: Asmt#3: Expression diagrams (due Fri, Oct 4, not available)
  • Tue, Oct 8 : #13: Tree representation and traversals [notes]
  • Bit buckets
  • NAND operator
  • NOR operator
  • Printf strings
  • Operator no-precedence parsing (started but not complete)
  • Q5: Quiz#5: Postfix code (on Wed, Oct 9)
  • Thu, Oct 10 : #14: E1: Exam [notes]
  • E1: Exam#1: Written (on Thu, Oct 10)
  • Thu, Oct 17 : #15: Abstraction: String rewriting [notes]
  • Tree traversal question notes
  • Code and data driven programming
  • Data driven programming (started but incomplete)
  • String rewriting using multi-line macros in C
  • Towers of Hanoi in various languages
  • String rewriting systems
  • String rewriting in JavaScript
  • String rewriting examples (for JavaScript, Lua, PHP, Python)
  • The Ruby programming language
  • P1: Project#1: Towers of Hanoi moves (on Mon, Oct 21)
  • Tue, Oct 22 : #16: Lazy evaluation, Logic programming: Prolog [notes]
  • Towers of Hanoi: eager moves
  • Lazy evaluation
  • Logic programming overview
  • Logical expressions using Prolog
  • Prolog examples using TuProlog
  • Introduction to logic programming
  • P2: Project#2: Code to data driven programming (on Wed, Oct 23)
  • Thu, Oct 24 : #17: Generators, closures, Prolog, list structures [notes]
  • Puzzles
  • Towers of Hanoi: Recursion to iteration
  • Iterators and generators
  • Prolog: Iteration and loops
  • Myers-Briggs personality profiles
  • Prolog: Logical variables
  • Prolog and Datalog
  • Logic programming: more  Prolog examples
  • A4: Asmt#4: String rewriting systems (due Fri, Oct 25, not available)
  • Tue, Oct 29 : #18: Constraint logic programming: Prolog [notes]
  • Towers of Hanoi: Recursion to iteration 2
  • Constraint processing
  • Linear programming overview (just for brief overview)
  • Case study: Rules based advising system
  • Rules for COBA courses (example from 2007)
  • rmsDSL for permutations
  • DSL for Prolog permutations
  • Alphametic puzzles
  • Encoding and solving logic puzzles
  • Practical examples of Prolog
  • P3: Project#3: Eager to lazy program code (on Wed, Oct 30)
  • Thu, Oct 31 : #19: Recursion to iteration: run-time stack [notes]
  • Q6: Quiz#6: Prolog logical expressions (on Thu, Oct 31)
  • Array diagrams (using GraphViz)
  • String rewriting systems: case study
  • TuProlog IDE
  • Prolog tree traversal
  • Lists: Prolog, Lisp, etc.
  • Family trees in Prolog
  • Nontrivial logic puzzle (similar to assignment puzzles)
  • A5: Asmt#5: Prolog logical expressions (due Fri, Nov 1, not available)
  • Tue, Nov 5 : #20: Operational semantics, control flow, compilers [notes]
  • Programming semantics: introduction
  • C: Goto statement
  • Goto statement harmful
  • Prolog: assert and retract
  • Prolog: Terms
  • Prolog: control flow compiler
  • Prolog: base conversion transformation
  • Arrays: maximum value (in class practice quiz example)
  • Thu, Nov 7 : #21: Axiomatic semantics, correctness and verification [notes]
  • Q7: Quiz#7: Control flow transformation (on Thu, Nov 7)
  • Nontrivial logic puzzle (continued from previous lesson)
  • Permute DSL for nontrivial puzzle
  • Prolog: Call by pattern
  • Verification vs. validation
  • Program testing
  • Program correctness
  • Axiomatic semantics: assertions
  • C: Assertions
  • Axiomatic semantics: assignment statement
  • A6: Asmt#6: Prolog family tree (due Fri, Nov 8, not available)
  • Tue, Nov 12 : #22: Axiomatic semantics, correctness and verification [notes]
  • Compiler generated code
  • Code investigations
  • Axiomatic semantics: Assignment statement exercises (for practice, try them)
  • Axiomatic semantics: example and proof
  • Array initialization: proof
  • Quotient and remainder: proof
  • Thu, Nov 14 : #23: EBNF grammars, syntax trees, BNF grammars [notes]
  • Q8: Quiz#8: Program verification and correctness (on Thu, Nov 14)
  • EBNF
  • EBNF: Some Python constructs
  • EBNF to BNF


  • Join the YCP Hacks, November 15-17. Programming, prizes, food, etc.
  • A7: Asmt#7: Prolog constraint satisfaction (due Fri, Nov 15, not available)
  • Tue, Nov 19 : #24: Bugs, failure and recovery, exception handling [notes]
  • Q9: Quiz#9: EBNF to syntax diagrams and BNF form (on Tue, Nov 19)
  • Abstract interpretation
  • Case study: String rewriting
  • Meta prefixes
  • Bugs and software systems
  • Failure and recovery
  • Exception handling
  • Thu, Nov 21 : #25: E2: Exam#2 [notes]
  • E2: Exam#2: Written (on Thu, Nov 21)
  • Note: When solutions to quizzes, etc., are made available (such as Q8 and Q9) they are found from links near the end of the original page on which that quiz, etc., appeared.
  • P4: Project#4: Language feature using grammar (on Fri, Nov 22)
  • Tue, Nov 26 : #26: Modules, classes, object-oriented programming [notes]
  • Goto statements:  Python code
  • The Fortran programming language
  • Just in time compilation
  • Classes and objects
  • The object-oriented paradigm
  • OOP language examples
  • Classes, objects, inheritance, and polymorphism
  • Tue, Dec 3 : #27: Polymorphism, modules, intractability [notes]
  • Classes polymorphism examples
  • Modules and encapsulation
  • Modules and interfaces in C
  • Module examples: programming languages
  • Intractable problems
  • Thu, Dec 5 : #28: Computability [notes]
  • Q10: Quiz#10: Modules and classes (on Thu, Dec 5)
  • Statistics: flipping coins
  • History of computation and computability
  • DNA: code introduction


  • Additional material for what was covered in class:
  • Fixed points
  • Compilers and fixed points
  • Nondeterminism
  • Program that writes itself
  • P5: Project#5: Module and class (on Fri, Dec 6)
  • Tue, Dec 10 : #29: Other topics, as time permits [notes]
  • Module and class example (possible solutions for Q10)


  • There is no class meeting on this date. This time is for making sure you have everything submitted, and issues identified and resolved.
    At some point Thanksgiving week, IT required a password reset no my email. The Portal changed that week too. For whatever reason, my YCP email to off-line folders no longer works. Thus, all submissions need to be sent to robinsnyder@gmail.com with the proper subject line and attachments. Any submissions sent to rsnyder9@ycp.edu will not be accepted.
    End of semester cutoff dates: (announced 2019-11-26, posted 2019-11-28)
    • Sat, Dec 7: All work graded and posted
    • Mon, Dec 9: Any scoring issues need to be raised via email with subject line I1 (for Issue submission #1). Please raise only one scoring issue on each submission. After Dec 9, scores for any scoring issues not raised via I1 submission will not be changed.
    • Tue, Dec 10: Last CS 340 class date. No class. Use time to resolve any work or scoring issues..
    • Wed, Dec 11:All I1 scoring issues resolved and posted.
    • Thu, Dec 12: CS 340 final at 1015 for class meeting at TR 1100.
    • Sat, Dec 13: Any scoring issues on I1 scoring issues (meta scoring issues) need to be raised via email with subject line I2 (for Issue submission #2). After Dec 13, scores for any scoring issues not raised via I2 submission will not be changed.
    • Sat, Dec 14: CS 340 final at 0800 for class meeting at TR 0930.
    Note: F1 (final exam) is 2019-12-12 at 1015 (1100 section) or 2019-12-14 at 0800 (0930 section).

    Note: Q11 is a bonus quiz for immediately after you finish the final exam. It is intended to cover the last two lessons and provide an additional quiz drop for those that might need and/or want such a drop.