You are here
Introduction to Computer Science I
Our CS1 course has the following calendar description:
A first course in programming [for B.C.S. students] emphasizing problem solving and computational thinking. Topics include pseudocode, variables, conditionals, iteration, arrays, objects, functions, sorting, searching, and simulation.
When teaching the major and non-major section of this course, I use Processing. My approach is inspired by previous offerings, but reorganized according to two principles: first, that it is better to introduce the minimum number of concepts at one time so students can become used to each one before complexity is increased; and second, that it is better to introduce concepts in the context of an interesting problem instead of as a sequential laundry list of things to know. Processing is very well suited to these principles because it is possible to make interesting and even complex programs knowing only a few concepts. For example, students can create Pong in their fourth week, knowing only variables, functions, and if statements.
By the end of the course, the successful student will be able to:
- Understand what computer science and computational thinking is.
- Learn how to use Processing to create visual programs of varying types.
- Explain these basic concepts of programming to somebody who has never programmed before:
- instruction sequencing
- data types (integer and floating point numbers, Strings, etc)
- variable declaration, assignment, and usage
- Booleans and if statements
- loops (for and while)
- arrays (one and two dimensional)
- objects as mutable data structures
- Solve basic programming problems by working with:
- searching and sorting algorithms
- shared data
- Develop good programming practices in the areas of:
- breaking a problem down into smaller pieces
- run-time efficiency
- code reuse
- Learn to approach programming problems with the following values:
- a desire to experiment
- the confidence to make mistakes and try again
- the instinct to consult documentation and seek solutions yourself before asking for help
For each topic after the introduction, I demonstrate the Processing example we will work toward. We write code to create the final product together (with some code provided ahead of time), learning new concepts as they are needed.
- Introduction: computer science and computational thinking
- Drawing Pictures With Processing: data and variables
- Interactive Painting: functions, switch statement
- Jukebox: Booleans, conditionals
- Sheep AI: while loops, arrays
- Foreign Student Visualization: parallel arrays, Strings, algorithms, objects, recursion
- Set Cover Problem: for loops, object references, object copying, shared data
- Image Processing (bonus topic)
Notes and Code
The most recent version of notes and code can be found on GitHub. Only the most important code examples are included (not small examples illustrating concepts).