What to do, When
Monday Wednesday Thursday
for session
1
November 28

Introduction to Python

  • Introductions to:
    • The course as a flipped classroom.
    • What is software engineering?
    • What is programming? A programming language?
  • Introduction to Python (our programming language):
    • Arithmetic expressions, e.g., 3.1 * (4 + 1.83).
    • Strings, e.g. "May the Force be with you".
    • Names, aka variables.
    • Calling functions defined in modules.
  • Tools for software development:
    • Eclipse, our Integrated Development Environment (IDE).
    • The Pydev console.
    • Subversion (SVN) / Subclipse, our way to acquire and turn in work via a version control system.
  • Reading a simple program, I:
    • Comments.
    • The print function.
    • Introduction to using objects:
      • Constructing objects.
      • Calling methods.
      • Referencing and setting instance variables.
  • Application: Turtle graphics.
for session
2
November 30

Calling Functions and Methods / Using Objects

  • Executing (aka running) a program:
    • Hardware:
      • Memory. Addresses.
      • The Central Processing Unit (CPU).
    • Software:
      • Names, aka variables. References.
      • Evaluating expressions, executing statements.
  • Objects:
    • Types (float, int, string, function, module) and values.
    • Names, aka variables.
      • Assignment.
      • Names are references to objects.
      • Dynamic typing versus static typing.
      • The importance of choosing good names.
  • Expressions:
    • Arithmetic operators: + - * / **
    • Relational operators: < <= > >= != ==
    • Parentheses and precedence.
    • String arithmetic.
  • Functions:
    • What are they, why are they important?
    • What is a function call?
      • Sending arguments to parameters. Relationship to assignment.
      • Flow of control.
  • Statements.
  • Modules:
    • import and the dot trick.
    • The builtins module.
  • Reading a simple program, II:
    • Function definitions:
      • In the module.
      • In builtins and other modules.
    • The use of indentation for blocks of code.
    • The role of main.
    • Flow of control (sequential but interrupted by function calls).
  • Coding to a specification:
    • What is it, why is it important?
    • Functions as black boxes.
    • Doc-strings.
  • Object-Oriented Programming (OOP):
    • What is it, why use it (brief introduction).
    • vs Procedural Programming.
  • Classes and objects:
    • Class vs instance of the class.
      • UML class diagrams (for a single class).
      • Object diagrams.
    • Methods (aka function attributes).
    • Instance variables (aka data attributes).
  • Using objects:
    • Constructing instances of a class.
    • Applying methods to objects.
    • Referencing and setting instance variables of objects.
  • Debugging techniques I: Correcting syntax (aka compile-time) errors.
  • Application:
    • RoseGraphics.
    • Using an Application Programming Interface (API) (brief introduction).
for session
3
December 1

Loops / Functions with Parameters

  • Namespaces, Scope:
    • Local scope (in functions).
    • Global scope (in a module).
    • Builtins scope.
  • Lifetime of a name in a function:
    • When it comes into existence.
    • When it goes out of existence.
    • How a stack implements function calls.
  • Loops:
    • When is a loop needed?
    • What goes before the loop? Inside it? After it?
    • Implementing loops using for k in range(n): ....
    • Flow of control (revisited to allow FOR loops).
  • Accumulators: Summing.
  • Implementing and calling functions:
    • Sending arguments to parameters. Relationship to assignment.
    • Local scope.
    • Side effects.
    • Returning a value (and capturing it in a variable).
    • Doc-strings and coding to a specification (revisited).
    • The power of parameters.
  • Using objects (reinforcing previous sessions).
  • Testing:
    • Test-Driven Development (TDD).
    • Unit testing.
    • Writing simple tests.
  • Coding: First Solve It By Hand.
  • Debugging techniques II:
    • Identifying when a run-time exception has occurred.
    • Understanding a stack trace.
    • Tracing code by hand.
for session
4
December 5

The Accumulator Pattern / Conditionals

  • Conditionals:
    • boolean values (True and False).
    • if, if-else, if-elif... statements.
    • Flow of control (revisited to allow conditionals).
  • Accumulators: Summing (revisited), Counting, Graphical Patterns.
    • Using the loop variable vs using accumulators.
  • More practice tracing code by hand.
  • Code Reviews:
    • What are they, why do them.
    • How to do them (brief introduction).
    • Code inspection checklists.
for session
5
December 7

Pair Programming

  • Reinforce all concepts to date.
  • Pair programming.
  • Writing good unit tests.
  • Conventions and advice for choosing names.
  • More practice tracing code by hand.
  • Debugging techniques III:
    • Understanding simple run-time error messages.
    • Using such messages to correct errors.
  • Application:
    • Robots and Motion.
    • Using an Application Programming Interface (API) (brief revisit).
    • Using the RoseBot API.
for session
6
December 8

Tracing Code by Hand / Practice for Test 1

  • More practice tracing code by hand.
  • More practice using pop-up help and the dot trick in Eclipse/PyDev.
  • Test 1 Practice.
  • Debugging techniques IV:
    • Using print statements.
    • Using a debugger.
    • Using the stack trace to know where to start.
for session
7
December 12

Test 1.

  • The regular in-class session on Monday is an OPTIONAL review session.
  • The test itself is Tuesday evening (December 13) from 8:30 p.m. to 10:30 p.m. (with an additional 30-minute grace period).
    • So NOT Monday, NOT daytime.
  • The rooms are:
    • Fisher, section 3: Olin 203
    • Mutchler, section 1: Olin 159
    • Mutchler, section 2: Olin 259
    • Mutchler, section 4: Olin 267
  • You MUST have completed this test's PRACTICE project (including its paper-and-pencil exercise) BEFORE you take this test.
    • It is your ADMISSION TICKET to the test.
    • Talk to your instructor if that poses a problem for you.
for session
8
December 14

Names are References to Objects / Mutating Objects

  • Names are references to objects (revisited).
  • Mutation:
    • What is it?
    • Why is it dangerous if abused?
    • Why is it useful?
    • Functions and methods that mutate their arguments.
  • is and not is versus == and !=.
  • Box-and-pointer diagrams.
  • More practice tracing code by hand.
  • Floating point arithmetic, roundoff (basic introduction).
  • Integer arithmetic: % and //.
  • Multiple arguments in range expressions.
for session
9
December 15

Implementing Classes, I

  • Reading a simple class definition:
    • class expression.
    • The init method.
    • The repr method.
    • The self parameter.
  • Implementing classes I:
    • Writing a class expression.
    • Defining constructor (init) methods.
    • Defining instance variables (aka data attributes):
      • For parameters of init.
      • For "remembering" attributes of the object.
    • Defining methods (aka function attributes) that:
      • Reference and/or set instance variables.
      • Call other methods.
      • Require the introduction of an instance variable.
      • Have parameters (other than self) that are instances of the class.
      • Return an instance of the class.
    • What self means and how to use it.
  • Testing class implementations.
  • More practice tracing code by hand.
for session
10
December 19

Implementing Classes, II

  • Implementing classes II:
    • A deeper understanding of self.
  • More practice implementing classes.
  • Debugging techniques V: Deciphering more complicated run-time error messages.
No class
December 21
No class
December 22
No class
December 26
No class
December 28
No class
December 29
No class
January 2
for session
11
January 4

Sequences, I / What is a Sequence? / Iterating Through a Sequence

  • Sequences and indices.
    • Lists, tuples, strings.
    • The index vs the item at that index.
  • Patterns for iterating through sequences, I:
    • Forward/backwards, with steps. Using three-argument range expressions.
    • Selecting items.
    • Counting/summing/etc.
  • Debugging techniques VI: Locating the source of a run-time error.
for session
12
January 5

Sequences, II / Patterns for Sequences: Find, Max-Min and Building a Sequence

  • Patterns for iterating through sequences, II:
    • Find (using linear search).
    • Max/min.
    • Building sequences using the + operator.
  • Debugging techniques VII: Debugging loops.
for session
13
January 9

Classes and Sequences

  • Reinforce concepts re implementing classes.
  • Reinforce concepts re sequences.
  • Implementing classes that involve immutable sequences.
  • Conditionals (revisited):
    • Boolean (Logical) operators.
    • Bitwise operators.
    • When to use elif and/or else. When not to them.
    • Nested conditionals.
    • Pitfalls.
for session
14
January 11

Tracing Code by Hand (again) / Practice for Test 2

  • Revisiting in the context of classes and sequences:
    • Names are references to objects (revisited).
    • Mutation:
    • What is it?
    • Why is it dangerous if abused?
    • Why is it useful?
    • Functions and methods that mutate their arguments.
    • is and not is versus == and !=.
    • Box-and-pointer diagrams.
  • More practice tracing code by hand.
for session
15
January 12

Waiting for Events / Indefinite Loops / Input from a Console

  • Waiting for Events.
  • Indefinite Loops.
    • Flow of control (revisited to allow WHILE loops).
    • while True: ... if <condition>: break vs while <condition>...
  • Loops (revisited):
    • When is a loop needed?
    • What goes before the loop? Inside it? After it?
    • Use a definite or indefinite loop?
    • Implementing loops using for k in range(n): ....
    • Implementing loops using while True: ... if <condition>: break ...
  • Input from the Console
    • The input function
    • The int and float functions
  • Application: Robots and Sensors.
    • Waiting for events.
    • Augmenting the RoseBot library.
for session
16
January 16

Test 2.

  • The regular in-class session on Monday is an OPTIONAL review session.
  • The test itself is Tuesday evening (January 17) from 8:30 p.m. to 10:30 p.m. (with an additional 30-minute grace period).
    • So NOT Monday, NOT daytime.
  • The rooms are:
    • Fisher, section 3: Olin 259
    • Mutchler, section 1: Olin 167
    • Mutchler, section 2: Olin 169
    • Mutchler, section 4: Olin 267
  • You MUST have completed this test's PRACTICE project (including its paper-and-pencil exercise) BEFORE you take this test.
    • It is your ADMISSION TICKET to the test.
    • Talk to your instructor if that poses a problem for you.
for session
17
January 18

Sequences, III / More Patterns / Mutating Sequences

  • Patterns for iterating through sequences, III:
    • Find (using linear search) (revisited).
    • Max/min (revisited).
    • Two indices at each iteration.
    • Two sequences in parallel.
    • Building sequences:
    • Using the + operator.
    • Using mutation:
      • via append (for lists).
      • plus list and tuple (for tuples).
      • plus list and join (for strings).
  • Mutating sequences:
    • Which sequences are immutable?
    • Why both lists and tuples?
    • Mutating the (deep) insides of a tuple.
    • Deleting items from a list.
    • Copy vs deep copy.
  • Using + versus append: comparing efficiencies.
for session
18
January 19

Loops within Loops

  • Loops revisited:
    • When is a loop needed?
    • What goes before the loop? Inside it? After it?
    • Use a definite or indefinite loop?
    • When is a nested loop needed?
  • Nested Loops:
    • Application: printing on the console.
    • Application: 2-d graphics.
    • Replacing the inner loop by a function call. Helper functions.
for session
19
January 23

Sequences within Sequences

  • Nested Loops:
    • Application: printing on the console (revisited).
    • Application: 2-d graphics (revisited).
    • Application: sequences of sequences.
  • Sequence, list and string methods.
  • The in and not in relational operators.
  • Application: String processing.
  • Application: Talking and Singing Robots.
    • Augmenting the RoseBot library.
    • Blocking messages versus nonblocking messages.
for session
20
January 25

Dictionaries / Looping (summary)

  • Dictionaries
    • Attributes are implemented using dictionaries.
  • More practice at nested loops.
  • Finite state machines: Application to more complicated logic.
  • Looping patterns: Summary.
for session
21
January 26

Practice for Test 3

for session
22
January 30

Test 3.

  • The regular in-class session on Monday is an OPTIONAL review session.
  • The test itself is Tuesday evening (January 31) from 8:30 p.m. to 10:30 p.m. (with an additional 30-minute grace period).
    • So NOT Monday, NOT daytime.
  • The rooms are:
    • Fisher, section 3: Olin 259
    • Mutchler, section 1: Olin 167
    • Mutchler, section 2: Olin 169
    • Mutchler, section 4: Olin 267
  • You MUST have completed this test's PRACTICE project (including its paper-and-pencil exercise) BEFORE you take this test.
    • It is your ADMISSION TICKET to the test.
    • Talk to your instructor if that poses a problem for you.
for session
23
February 1

Event-Driven Programming / Graphical User Interface (GUI) Programming / Throw-away Project

  • Project Teams.
    • Meet each other, establish goals and expectations.
    • How a team project works:
      • Team member responsibilities.
      • Individual accountability.
      • Divide and conquer. Integration of the parts.
  • Event-Driven Programming.
  • Tkinter I:
    • Root/mainloop.
    • Frame.
    • Button. Using lambda functions to respond to button-clicks.
    • Entry. Using lambda functions and get to acquire values from Entries.
  • Using a shared repository effectively:
    • Avoiding conflicts.
    • Correcting conflicts.
    • When to commit (and when not to).
    • The importance of commit messages.
  • Application: Throw-away project.
    • Using m0 and my_frame functions to structure the application.
    • Sharing a RoseBot object across modules.
    • Sharing functions across modules.
for session
24
February 2

Project Kickoff / Sprint 1 begins

  • Project Kickoff.
    • Project theme.
    • Project features.
    • How the project is graded.
  • Agile/Scrum:
    • Sprints.
    • Features.
    • Sprint planning.
    • Stand-up meetings.
  • Materials made available for applications, including:
    • More Tkinter GUI objects.
    • File IO (for text files)
    • Socket IO.
    • Multiple threads and processes.
    • Multiple implementations of the same interface.
    • PID line-following.
    • Following waypoints.
    • Image processing.
    • Robot conversation (via LEDs + camera with vision processing, or via IR emitters and receivers), protocols.
  • Sprint 1 begins.
for session
25
February 6

Procedural decomposition / Sprint 1 continues

  • Procedural decomposition.
  • Inheritance (brief introduction):
    • The concept.
    • Reading classes in an inheritance hierarchy:
      • How self climbs the inheritance hierarchy.
      • Methods that override, in whole or in part.
      • Multiple inheritance (very, very brief introduction).
      • The object class.
  • Object-Oriented Design (OOD) (brief introduction):
    • The IS-A and HAS-A concepts.
    • Reading IS-A and HAS-A relationships in UML class diagrams.
  • Implementing classes, III: Using IS-A and HAS-A relationships.
    • Application: Robots.
    • Augmenting simple classes in the RoseBot library that inherit (beyond just from object).
    • Implementing simple classes that HAS_A RoseBot.
  • Using an Application Programming Interface (API) (revisited).
  • Implementing classes IV:
    • Implementing classes that inherit from (aka extend) other classes.
    • Application: extending Tkinter classes.
  • Sprint 1 continues.
for session
26
February 8

Sprint 1 ends, Sprint 2 begins

for session
27
February 9

Sprint 2 continues.

for session
28
February 13

Sprint 2 ends, Sprint 3 begins.

for session
29
February 15

Sprint 3 continues.

for session
30
February 16

Sprint 3 (and the project) ends.

PROJECT DEMOs (and a possible final exam) during exam week, time TBD.