What to do, When
Tuesday |
Thursday |
Friday |
for session
1
March 7
|
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.
- FOR loops:
for k in range(n): ... .
- Application: Turtle graphics.
|
|
for session
2
March 9
|
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: Turtle graphics.
|
|
for session
3
March 10
|
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.
- Application:
- RoseGraphics.
- Using an Application Programming Interface (API) (brief introduction).
|
|
for session
4
March 14
|
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
March 16
|
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
March 17
|
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
March 21
|
Test 1.
-
At the regular Tuesday class session,
you can complete your preparation for Test 1
OR do Session 8.
If you complete Session 8 in class Tuesday,
you do not need to attend Thursday.
-
The test itself is
Wednesday evening from 8:30 p.m. to 10:30 p.m.
(with an additional 30-minute grace period)
in rooms Olin 267 (section 1) and 269 (section 2).
-
So NOT Tuesday, NOT daytime.
-
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
March 23
|
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
March 24
|
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
March 28
|
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.
|
|
for session
11
March 30
|
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
March 31
|
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
April 4
|
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
April 6
|
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
April 7
|
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
April 18
|
Test 2.
-
The regular in-class session on Tuesday
is an OPTIONAL review session.
-
The test itself is
Wednesday evening from 8:30 p.m. to 10:30 p.m.
(with an additional 30-minute grace period)
in rooms TBA.
-
So NOT Tuesday, NOT daytime.
-
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
April 20
|
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
April 21
|
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
April 25
|
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
21
April 28
|
OPTIONAL class session
- If you have not completed your Preparation for Test 3,
this session is by far the best time to do so.
|
|
for session
22
May 2
|
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.
Test 3.
-
The regular in-class session on Tuesday
is a REQUIRED session, but its material will not be on Test 3.
-
The test itself is
Wednesday evening from 8:30 p.m. to 10:30 p.m.
(with an additional 30-minute grace period)
in rooms Olin 267 (section 1) and 269 (section 2).
-
So NOT Tuesday, NOT daytime.
-
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
May 4
|
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
May 5
|
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
May 9
|
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
May 11
|
Sprint 1 ends, Sprint 2 begins
|
|
|
for session
28
May 16
|
Sprint 2 ends, Sprint 3 begins.
|
|
|
for session
30
May 19
|
Sprint 3 (and the project) ends.
|
|
PROJECT DEMOs (and a possible final exam) during exam week,
time TBD.
|