Week 1
MONDAY
Overview/Intro
Explain syllabus
Suggested topics:
Discuss prerequisites. Engineers should take other support course.
Why learn programming?
-
To increase our understanding of computer technology.
- Tool for solving problems
- Tool for building other tools
- Learn new problem solving skills, reasoning skills
- It's fun. Rewarding to master the computer, create something,
solve puzzles
- Self-discovery
Why programming is more difficult than a typical college course.
- You have to learn a language including vocabulary and grammar.
- You have to learn design and problem solving methods.
- You have to acquire a new world view: information and
algorithms.
- Learning French and Quantum Physics simultaneously analogy
- Like learning carpentry and architecture simultaneously
- Teaching languages versus Industrial languages
- No slack time. Topics are cumulative. Requires lots of
practice.
Anyone can succeed.
- Many beginners get an A in the course.
- Computer itself is a teaching aid.
- Lots of resources available.
Course philosophy
- Instructor doesn't teach what's in the book, because it's
specific to one language, not general concepts and principles.
The course is titled "Fundamentals of CSC" not "C programming".
- Cope with rapidly changing technology. Half-life of
technological knowledge is 4 years.
- Don't focus on your first job after college, but your nth
job.
- E.g., John has programmed professionally in eleven different
programming languages. And he isn't even a full time developer.
- Emphasize:
- strategies for learning new tools quickly.
- general problem solving skills: abstraction, decomposition,
reduction, etc.
- CSc concepts and general principles: algorithms, general
cross-lingual programming concepts. (Not "C" programming).
- Engineering approach to complete software development process.
- Architect vs. Contractor analogy
Optional topics:
Lab Notebooks
Example course outcomes
Demo of Playlist Calculator (cp -i
~cs101-1/Programs/songdata.txt $HOME;
~cs101-1/Programs/playlistcalculator.exe)
Professional responsibilities lecture - I don't want to teach hackers.
Academic Integrity
WEDNESDAY
Lecture on Chapter 1
FRIDAY
Lecture on Chapter 1 (continue unfinished topics from Wed)
Lecture on Ch 2
Algorithms + data structures = programs
Program Structure - Fig 2.1 (pg 35)
Hand
trace technique "a
representation of the dynamic behavior
of static source code."
Suggested Topics
Evolution of Software
- Software
evolves from machine-oriented to
problem/user-oriented.
- Models - we are trying to create models of real world phenomenon
that we can manipulate to help us solve problems.
- Building models is easiest if we have tools that use a vocabulary
or notation that closely resembles the problem domain. E.g. WYSIWYG vs
text formatters.
- We want tools that let us express our solutions
using the language of the problem domain and that hide the details of
the
machine implementation.
How
to Study CSc 101 (Learning Strategies). (Assign Ch 2 reading
due before this topic, so students can compare their current study
habits to those recommended).
Success Tips:
- If you encounter a problem that keeps you from moving forward,
contact the instructor.
- Get started on the assignments promptly so if problems occur
there is time to resolve them.
- Attention to detail is a vital skill.
- Patience
- Start Early
- Get Help: Instructor, tutors, peers
Limit headbanging to 30 min.
Week 2
MONDAY
Holiday
WEDNESDAY
Language
Feature overview - C in a nutshell
Language
comparison example: Fuel use - Compute Miles/Gallon in 6
languages
Why C in first course? Party Line: multi-lingual, procedural,
prep for upper division
Summary of Software Development Process - Ch 2 case study (pg 62)
How To Build a Program - a
process for students
Debugging - Categories of Errors
(Ch 2.8)
Suggested Topics/Examples
Example: Number
Juggling from lab 1
Example: Calculating UPC check digit
Optional Topics:
Problem Analysis Strategies - Informal
Requirements Gathering
Productivity
Summary Form
and Time
Recording Log Form
FRIDAY
Lectures on Ch 7.1 - 7.3
Data types
Character, Integer, Floating Point, Fixed Point, Boolean,
String
Type checking comparison
Numerical Inaccuracies (precision problems), Bad Money example.
Enumerated
types
Week 3
MONDAY
Lecture on Ch 3
Subprograms
- Purposes
- Declaration
- Definition
- Invocation
Examples
- Procedure: Fig 3.14 pg 120
- Redundant Code example
- Function: Fig 3.21 pg 128, Fig 3.24 pg 133
Student in-class exercise: Prediction exercise Ch3_1.c
Practice exercise: Eliminate redundancy in Hypotenuse Program by
writing find_hypotenuse()
WEDNESDAY
Introduce Exploration
Strategies
Sample explorations: Revenue,
Triangle
Subprograms (continued)
- Input parameters
- Exploration: Fig 3.5 Flat Washers Program, modified to use
circumference and area functions
Practice: Write a function to convert Carats to Ounces, given
1 carat = 200mg, 1Kg = 2.2lb
FRIDAY
Review Coding
Standards: Layout, Naming conventions, Comments, etc.
Subprograms (continued)
- discuss use of functions in this week's lab and programming
projects
Functions Practice: Pythagorean
Triple Exercise
Algorithm Building Blocks: Sequence, Selection, Iteration
Exercise: Identify
the Building Block from a problem statement
Suggested Topics
Discussion: What makes good software? (Background for coding
standards discussion)
- Usability, Correctness, Maintainability, Efficiency
- How would you rank them in order of importance?
- Software economics
Week 4
MONDAY
Lecture on Ch 4.1 Logical Expressions
Forms of selection statements
- The "true" part of an if statement always follows the "if" and
the "false" part always follows the "else."
"if" statement readability issues
Boolean operators: &&,|| vs AND, OR
Uppercase keywords (if allowed)
Braces: always!
indenting
Nested if vs sequence of if's
Optional Topics:
Pseudocode (pg 169): Purpose
and Style
guide
Structure Diagramming (N-S charts)
WEDNESDAY
Lecture
- Hand
trace technique for selection statements
- Example: Table 4.9 pg 164-5
Test
Plans for "if" statements
Test plan demo:
Today is a cold/nice/hot day example
"Minimum Complete Coverage" - the minimum
set of test data that guarantees that each branch in the program is
executed at least once.
Boundary cases.
FindHypotenuse
and GiveNotice examples
FRIDAY
Switch Statements (Ch 4.8)
IF and SWITCH statement pitfalls in C. (CH 4.9)
Boolean Functions
- Def: a function that returns a boolean value
- You can declare a boolean function and then invoke it as the
conditional in an "if" statement.
"Decrease-and-conquer" Problem solving strategy: Reduce a complex
problem
to a simpler one. Math Aptitude test joke.
Summary review
of textbook chapter on iteration. (Taxonomy of loop structures)
Pseudocode for loops
Example of Iteration: Submarine Data
Analysis (Solution in 5 languages)
Exercises with Iteration
(This could be a handout for in-class activity)
Table of Cubes data validation loops
example (in Java; need to convert to C)
WEDNESDAY
Loop Cartoon
Directions for how to use the hand
trace technique with iteration, and exercises.
Finding
loop defects with a hand trace.
FRIDAY
Loop design problems
- lizard island
- GPA calculation
- circus tax
- car-train collision
- Occurrence of first and last 12 example
Strategy Tip: "Don't sweat the small stuff"
Under Construction
Week 6
MONDAY
Structured vs Unstructured loops; rationale, examples.
Loop design problems (continued)
General Debugging techniques lecture (see notes)
WEDNESDAY
Midterm Exam
FRIDAY
*** Holiday ***
Week 7
MONDAY
Lecture Ch 6
- Subprograms with output parameters
WEDNESDAY
Structure Charts lecture (Ch 3.3 and Ch 6)
Incremental Implementation. See "LecPhases" notes.
Stubs and Executing Architecture
Examples:
- First and last 12 example
- "Find the Hurkle" lab activity on previous page.
FRIDAY
Lecture Ch 8 Introduction to arrays
Debugging and Testing (Ch 6.6)
Week 8
MONDAY
Array Processing
Practice with Arrays
Sample array problems:
Soda Tally without arrays and with arrays
Others?
Introduce Prime number sieve problem
WEDNESDAY
Parallel
Arrays exercises
Exam Scoring problem design activity
Discuss Compare Lists solution.
FRIDAY
Lab Exploration: Arrays with non-integer subscripts - letter
count, table lookup
Design activity with arrays and linear search:
- Remove Duplicates problem (paired problem solving)
- Critique instructor solution.
- Compare while vs for loop implementations of search method.
- Compare search vs contains/indexOf
- Comparing design alternatives: tradeoffs.
Week 9
MONDAY
Lecture CH 9 - Strings
WEDNESDAY
Lecture CH 12 - File Input
CH 2.x Endfile loops
FRIDAY
Lecture CH 11 - Records, Arrays of Records
Week 10
MONDAY
Lecture CH 8.x - Intro to Multi-Dimensional arrays
Multi-D arrays - example problems
WEDNESDAY
Lecture Ch 13 -Programming in the large
- Multiple File Linking
- Implementation versus Interface
Examples and demonstration of multi-file
programs
FRIDAY
Course wrapup and Review for final exam