CSCI 141 - Computer Programming I

Scott Wehrwein

Spring 2021

Course Overview

What is this course about?

Synopsis from the WWU Course Catalog

Intended for students majoring in computer science. Basic concepts of computer programming using an object oriented programming language. Topics covered: introduction to the development environment, introduction to algorithms, elements of a programming language, including data types, packages, control structures, procedures and functions, basic input and output, arrays and records, text files, strings, variant records. Algorithm development, problem solving and software engineering are emphasized. Programming is required in implementation of concepts. Lab.

Official Course Outcomes

On completion of this course students will demonstrate:

Textbook

We will use the following free online interactive e-textbook as a reference:

How to Think like a Computer Scientist: Interactive Edition

Assessment

Grades will be calculated as a weighted average of scores on the following course components, each of which is described in more detail below:

The standard letter grade ranges apply (i.e., 90–100% is an A, 80–90% is a B, and so on). The calculated raw percentages may be curved at the instructor’s discretion, but any such curve used will not lower anyone’s grade. “+” or “-” cutoffs will be decided at the instructor’s discretion. Students who demonstrate mastery of the material will get grades in the A range, and it is my goal to give as many A’s as possible.

Programming Assignments

Approximately 5 programming assignments will be given to provide hands-on practice with the programming concepts introduced in the course. The level of sophistication in the assignments increases as the quarter progresses; later assignments will be more involved and will take most students more time to complete. Please keep this in mind when planning your time: start working on the assignments early and seek help promptly if you get stuck to make sure you have enough time to complete the assignment by the deadline. Assume each assignment will take significantly longer to complete than the previous one. To ensure you have sufficient time to complete it, the last assignment’s deadline may be as late as the Monday of the last week of classes.

Labs

Labs will provide hands-on experience in topics related to the course with the support of a TA. To get full credit for a lab activity, you must both attend lab and hand in the deliverable by the deadline (typically Friday at 10pm the week that the lab takes place). Missing a lab or attending a lab section other than the one you are registered for requires my permission, so please contact me ahead of time in case of extenuating circumstances. Barring case-by-case exceptions, if you miss lab but submit the deliverable on time you will receive half credit (i.e., your graded lab score will be multiplied by 0.5). No late labs will be accepted without explicit permission.

Midterm Exam

A midterm exam will be given during the 6th week of class (the week of 5/3). Details of timing and format will be announced at least one week before the exam. Currently, the exam is tentatively planned to be a shot coding exercise to be completed during class on Wednesday, 5/5, but this is subject to change.

Final Project

In place of a final exam, you will complete a Final Project. This will involve designing and writing a program that processes data from one or more files in order to answer a question of your choosing. You will be given about the same amount of time as for a regular programming assignment, but your program will be unique to you. Details will be released with the Final Project assignment on 5/17.

Please see the official finals schedule for authoritative details.

Exercise Solution Sets

Before each class, you will watch up to three short videos and work through a set of Exercises that test your understanding of the material from the videos. In class, your team will get together and collaboratively write a solution set in your team’s cumulative Google Doc. The Exercises component of your grade (10%) will be determined based both on completion and correctness.

Note that the Exercises to be completed before lecture are distinct from Problems, which you will work on in class after finishing your Exercise solution set. Grades will be based only on Exercises, not Problems. The Problems are designed to challenge you and build your programming and problem-solving skills, and it is not expected that all groups will be able to finish all of them in every lecture.

Resources for Getting Help and Support

Help with Course Content

If you are stuck, struggling, or need help on any aspect of the course, you have several avenues for seeking help:

If you are have concerns that go beyond the course material you are welcome to talk to me, but the following resources are also available to support you.

Other Resources

Faculty Community Ambassador - Moushumi Sharmin

The Computer Science department has both Faculty and Student community ambassadors who hold regular office hours:

These hours are a time for students, staff and faculty to bring concerns, feedback or questions as it related to equity, inclusion and diversity within STEM. We hope that we, the Community Ambassadors and the STEM Inclusion and Outreach Specialist, can advise and also guide people to college, university or external resources.

Our Faculty Community Ambassador is Moushumi Sharmin, and our Student Community Ambassador is Sydney Kaster. You can find information on Commnity Office Hours and contact details for both at the following link: https://cs.wwu.edu/equity-and-inclusion-ambassadors

University Resources

As a reminder, the following University resources are always available:

Logistics

Course Webpage / Syllabus

The Schedule section of this page will be kept up-to-date as the quarter progresses with topics, links to all lecture materials (videos, slides, exercises, problems, and readings), as well as links to assignment and lab handouts. I suggest bookmarking this page; if you forget the URL and need to find your way back here, you can find the link on the Syllabus page in Canvas.

Remote Instruction Logistics

Lecture

Remote class meetings will be conducted using a combination of Zoom (for full-class lecture content) and Discord (for small teamwork). Links for both Zoom and Discord are available on the Syllabus page on Canvas. The bulk of class time will be spent working in pre-assigned small teams, collaborating in your own team’s voice channel. Teams will persist across class periods and may be shuffled once or twice throughout the quarter. Your primary task in class is to collectively write up a solution set to the day’s Exercises and as many Problems as you have time to complete. Exercise solution sets will be written in a Google Slides document that contains one slide per group, provided to you via a link pinned in your group’s text channel. When working in groups, everyone should be present in the voice channel, have a working microphone, and actively participate in constructing your group’s solution set.

Labs

Labs will be conducted using Discord. You will work through the lab handout during your assigned lab time unless you’ve made other arrangements with me. The TA will be available on Discord and will be available to answer questions that come up as you’re working. You will be paried with a Lab Partner for labs. Although you must write and submit your own implementation for the labs, the academic honesty restrictions are relaxeed with respect to your lab partner: you are encouraged to collaborate freely, including brainstorming, problem-solving, and debugging. Unlike for regular assignments, you may screenshare and view each others’ code, although each partner still needs to write up their own solution.

Exams

Online instruction will necessitate changes to the usual format for exams. The details of exam format and delivery will be announced at least one week before the exams take place. It is likely that exams will be comprised at least in part by short programming tasks to be completed within a short (e.g., 2-hour) time window. The best way to prepare for such a task is to make sure that you can solve the in-class Problems and programming assignments.

Lectures

The Lecture component of this course will be largely “flipped”. For most class periods, you will do the following:

  1. Before a given class period, watch the (usually 3) pre-recorded lecture videos.
  2. After each lecture video, complete a short set of Exercises to test your understanding of the new content.
  3. Most of class time will be spent working in teams. At the beginning of class, you will compare Exercise answsers with other members of your team, compiling your solutions into a single team-wide solution set. Questions and clarifications on exercises will be discussed as a whole class.
  4. The remainder of class time will be spent working on a sequence of Problems which require you to apply and extend the concepts from the lecture videos.

Lecture videos will be posted on YouTube and linked from the Schedule table, alongside the Exercises, Problems, and optional readings for each class period.

Canvas

We will use Canvas for announcements, grades, and submission of assignments and labs. Lab and assignment writeups will be linked from both the course webpage and the corresponding assignment on Canvas. Lecture videos, slides, exercises and problems, and references to the textbook for each lecture, will only be posted on the course webpage.

Computer Labs

Pandemic Note: While we are still holding classes online and away from campus, the computer labs are unlikely to be useful to you. You should be able to install Thonny on your own computer, which will allow you to complete all necessary programming assignments for this class. To use the CS environment described below, you would need to access it remotely, which is unlikely to be worthwhile for purposes of this class.

The CS department maintains a set of Computer Science computer labs separate from the general university labs.

CS Accounts
To log into the machines in these labs, you will need a separate Computer Science account, which you’ll need to create unless you’ve taken another CS course already. Your username will be the same as your WWU username, but you will need to activate your account and set a new password by visiting http://password.cs.wwu.edu. Note that you’ll need to do this before your first lab, since you’ll be unable to log into the computers to access a web browser until you’ve done this. An announcement about this will be made in the first and second lecture to remind you.

Lab Locations and Access
The following rooms in Communications Facility are CS Department labs: 162, 164, 165, 167, 405, 418, 420. These labs are open to all CS students (that’s you!) any time except when scheduled for a class or other activity. The complete of CS labs and their schedules can be found on the CS Support Wiki. CF 405 is never booked, so it’s always available. Labs are open 24/7, although the building locks at 11pm so you won’t be able to enter later than that.

Feedback

I take student feedback seriously, and I believe it’s especially important this quarter given the remote format and newly-flipped course. I appreciate any feedback you’re willing to give, and I will do my best to act on constructive feedback when possible. I will solicit feedback through surveys periodically throughout the course, but you are welcome and encouraged to provide feedback anytime in my office hours, by email, or if you desire anonymity you can fill out this Google Form.

Schedule

This schedule is tentative and subject to change without notice. Videos, slides, exercises and problems, assignments, labs, and readings will be posted here throughout the quarter.

Date # Topics Videos Slides Ex Out Due References
3/31 (1) 0 Introduction, Logistics
Hello, World!
Checklist
L00
4/2 1 Computers
Alorithms and Pseudocode
Function Calls
L01 notes
A: 8:45
B: 9:29
C: 13:04
A
B
C
code
E01 Ch 1
4/5 (2) 2 Data Types
Variables
A: 15:26
B: 15:53
A
B
E02 Lab1 2.1–2.5
4/7 3 Operators
Expressions and Statements
A: 17:56
B: 16:41
A
B
E03 2.6–2.7
4/9 4 Keyword Arguments
Binary Representation
A: 6:43
B: 12:33
A
B
E04 A1
4/12 (3) 5 Boolean logic A: 16:45 A E05 Lab2
bad_code.py
faulty_code.py
broken_calculator.py
7.1–7.3
4/14 6 Conditionals A: 16:59
B: 15:53
A
B
code
E06 7.4–7.8
4/16 B1 Buffer B01.py B01
4/19 (4) 7 While loops A: 20:25
B: 11:17
A
B
code
E07 Lab3
A2
A1 8.1–8.3
4/21 8 For loops A: 7:18
B: 21:28
A
B
code
E08 Ch 5
8.1–8.3
4/23 9 importing modules
random, Turtles
A: 12:17
B: 16:39
A
B
code
E09 Ch 4
4/26 (5) B2 Buffer B02 Lab4
A3
A2
4/28 10 Functions 1: inputs and outputs A: 8:08
B: 12:21
C: 11:00
A
B
C
code
E10 6.1–6.3
4/30 11 Functions 2: Local variables, scope; A: 19:34
B: 12:24
A
B
code
E11 6.4
5/3 (6) Midterm Exam Lab5
turtleshape_test.py
5/5 12 Functions 3: Managing Complexity in A4
Tuples
A: 11:17
B: 14:07
A
B
code
E12 A4
sierpinski.py
sierpinski_test.py
A3 6.5–6.10
10.27–10.28
5/7 13 Strings 1 A: 4:40
B: 12:19
A
B
E13 Ch 9
5/10 (7) 14 Strings 2 A: 12:56
B: 4:54
A
B
E14 Lab6 Ch 9
5/12 15 Lists A: 5:49
B: 18:14
A
B
code
E15 Ch 10
5/14 B3 Buffer: FP Overview FP
5/17 (8) 16 Reading and writing files A: 7:26
B: 26:37
A
B
code
E16 Lab7
lottery.py
A4 Ch 11
5/19 17 Dictionaries A: 16:03 A E17 FP Proposal Ch 12
5/21 18 Variables are references; Mutability A: 15:52 A E18 9.9, 10.8, 12.4
5/24 (9) 19 Mutability and functions A: 10:18 A E19 Lab8
skeleton code
earth.png
earthquakes.csv
words.txt
6.4
This Blog Post
5/26 Buffer - FP Office Hours FP code draft
5/28 20 Searching E20
5/31 (10) No Class (Memorial Day) FP
FP Showcase
6/2 21 Sorting
6/4 22 AMA

Course Policies

Inclusive Classroom Environment

It is expected that everyone will promote a friendly, supportive, and respectful environment in the classroom, labs, and project groups. Everyone’s participation will be equally welcomed and valued.

Attendance

One reason I am keeping lectures synchronous is to help us all maintain a routine, which is extra important when much of the structure in our lives has been upended by circumstances such as a global pandemic. Attendance will be tracked based on your participation in the in-class team work that will comprise the bulk of our synchronous class meetings. Up to three absences will not affect your grade for the exercise solution sets. After that, you will not receive credit for Exercise Solution Sets that you were not present for.

Communication

It is your responsibility to make sure that you promptly become aware of Canvas Announcements as they are posted; Canvas should be configured to send you an email notification by default, but if you are unsure, please come see me in office hours.

Late Work

You have three “slip days” that you may use at your discretion to submit programming assignments late. Slip days apply only to programming assignments and can not be applied to labs or any other deadline. You may use slip days one at a time or together - for example, you might submit each of three assignments one day late, or submit one assignment three days late. A slip day moves the deadline by exactly 24 hours from the original deadline; if you go beyond this, you will need to use a second slip day, if available.

After your slip days are exhausted, a penalty of 10% * floor(hours_late/24 + 1) - that is, 10% per day late, will be applied.

The time of your submission will be recorded when you submit it on Canvas, so other than submitting your assignment late, you do not need to take any action to use a slip day. Your grading feedback will include a note of how many slip days have been applied.

Programming Guidelines

Your programs will be graded on correctness, clarity, and efficiency (in that order).

Correctness:

A correct program is one that always produces the correct output for a given input. Also, a correct program does not produce unintended side-effects. The most effective way to ensure that your program is correct is to test, test, test. Test each component as you introduce it; once you are confident that a component works you can use it in other routines. Try to break your program in testing, and if you succeed, locate the bug and fix it. The better you test your program, the more likely it is to be correct - the more likely it is to be correct, the more likely you’ll earn a good score. Most of your grade will depend on the correctness of your code.

Clarity:

The easier it is to read and maintain your code, the easier it is to locate and remove bugs. Your program should be well organized, appropriately commented, and easy to maintain. To have a well-organized program, design your program thoughtfully and modularly. Think before you code: hacking away blindly leads to ugly, difficult-to-read code. If you do hack away, producing a functional but ugly wall of code, try to clean it up a bit. Make sure that your cleaning does not introduce new bugs.

As for comments, please follow these simple guidelines proposed by Emeritus Professor Osborne:

Efficiency:

Your code should be efficient, in the sense that the programs you write in this class should run in a few seconds or less. If you continue on in CS, the definition of and standards for efficiency will get more rigorous; for now, just make sure your programs aren’t doing a lot of unnecessary work.

Academic Honesty

Collaboration Policy - Individual Assignments

Individual programming assignments are to be completed independently. Students are welcome to discuss assignments with each other on a conceptual level, but each student should be writing their code independently and without direct help from fellow students. Sharing your code with others or looking at someone else’s code is an explicit violation of this collaboration policy. The best way to be absolutely sure you are collaborating appropriately is follow these two rules:

Automated tools will be used to check your code for plagiarism at the push of a button. They are not fooled by tricks such as changing variable naming and whitespace: in fact, hiding plagiarism is harder than doing the assignment.

University Policies

All University-wide policies apply to this course, including those outlined at http://syllabi.wwu.edu. These policies cover issues including: