CSCI 141 - Computer Programming I

Scott Wehrwein

Winter 2023

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

I recommend 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

Five 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.

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). Late lab submissions are penalized 10% per hour after the deadline.

Due to scheduling quirks of Winter quarter, you will need to watch the videos (if any) for Wednesday’s class before you arrive at your lab for the week. For most students, this means Wednesday’s videos will need to be watched by sometime on Tuesday.

Midterm Exam

A midterm exam will be given during class on Friday, 2/10. The exam will be taken in the computer labs, and will include a substantial programming task.

Final Exam

The final exam will be given in our usual lecture classroom during the scheduled final exam slot, which is 3:30-5:30pm on Monday, 2/13. This will be a paper-based exam that may include true/false, multiple choice, short-answer, and small programming problems (i.e., problems whose solutions require no more than a page of handwritten code).

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. You will submit your individual solutions to Canvas to the assignment titled “E##I” (I for Individual; ## is the lecture number). Individual solutions will be graded for completion. You can miss up to three of these submissions without penalty.

In class, your team will get together and collaboratively write a solution set for the exercises. The group’s solution set will be handed in during class and graded for correctness. Grades for team solutions will be in a Canvas assignment titled E##T (T for Team). You can miss up to three class periods and still get credit for the work your group does; after that, you will not recieve credit for missed in-class work.

Note that the Exercises to be completed before lecture are distinct from Problems, which you will work on in class after finishing your collective Exercise solution set. Grades will be based only on Exercises, not Problems - the Problems are designed to challenge you, so I do not expect that all groups will be able to finish all of them. Some class time will be spent in groups working on Problems, while some will be spent discussing Exercise and Problem solutions.

The groupwork-heavy design of this course is motivated by research that shows that peer instruction is an effective teaching methodology that improves student learning outcomes. If you are absent or disruptive, this is detrimental not only to your own learning, but to your peers’ as well. To get credit for the team-based submission, you must be present for the entire class period. By writing your name on an Exercise Solution Set in class, you are certifying that you are present for the whole class period and actively participating during group work. If you list your name after arriving late or before leaving early, this will be considered a breach of academic honesty. If you arrive late or leave early, you may participate in group work as usual, but you will leave your name off the Solution Set sheet, and you will receive credit for neither the team-based submission nor for the individual submission, regardless of whether you submitted it.

If you have a compelling reason that you will need to arrive late or leave early, please let me know at least one day in advance.

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:

Other Resources

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.

Faculty Community Ambassadors

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 Ambassadors are Yasmine Elglaly and myself (Scott Wehrwein). You can find information on Commnity Office Hours and contact details for both at the following link: https://cs.wwu.edu/diversity-equity-inclusion.

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.

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 watching the videos, you will complete a short set of Exercises to test your understanding of the new content and submit your answers on Canvas to be graded for completion.
  3. Much 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. Your team’s solution set will be handed in and graded for correctness.
  4. The remainder of class time will be split between working in teams on Problems that require you to apply and extend the concepts from the lecture videos, and discussing Exercise and Problem solutions as a full class.

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

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
1/4 (0) No Class
1/6 No Class About You Survey (10pm on 1/5)
1/9 (1) 0 Introduction, Logistics
Hello, World!
slides
hello.py
Lab 1
1/11 1 Computers
Alorithms and Pseudocode
Function Calls
A: 8:45
B: 9:29
C: 13:04
notes
A
B
C
code
E01 Ch 1
1/13 2 Data Types
Variables
A: 15:26
B: 15:53
notes
A
B
E02
2.1–2.5
1/16 (2) No Class: MLK Day Lab 2
1/18 3 Operators
Expressions and Statements
A: 17:56
B: 16:41
notes
code
A
B
E03 2.6–2.7
1/20 4 Keyword Arguments
Binary Representation
A: 6:43
B: 12:33
notes
A
B
E04
P04
A1
1/23 (3) 5 Boolean logic A: 16:45 notes
code
A
E05
P05
Lab 3 7.1–7.3
1/25 6 Conditionals A: 16:59
B: 15:53
notes
A
B
code
E06
P06
7.4–7.8
1/27 7 While loops A: 20:25
B: 11:17
notes
A
B
code
E07
P07
A2 A1 8.1–8.3
1/30 (4) 8 For loops A: 7:18
B: 21:28
notes
A
B
code
E08
P08
Lab 4 Ch 5
8.1–8.3
2/1 9 importing modules
random, Turtles
A: 12:17
B: 16:39
notes
A
B
code
E09
P09
Ch 4
2/3 Buffer Day notes
B01P.py
Norms:
Team;
Class;
Problem
A3 A2
2/6 (5) 10 Functions 1: inputs and outputs A: 8:08
B: 12:21
C: 11:00
notes
A
B
C
code
E10
P10
Lab 5
turtleshape_test.py
6.1–6.3
2/8 11 Functions 2: Local variables, scope; A: 19:34
B: 12:24
notes
A
B
code
E11
P11
6.4
2/10 Midterm Exam Guidelines
2/13 (6) 12 Functions 3: Managing Complexity in A4
Tuples
A: 11:17
B: 14:07
notes
A
B
code
Norms
E12
P12
Lab 6
A4
A3 6.5–6.10
10.27–10.28
2/15 13 Strings 1 A: 4:40
B: 12:19
notes
A
B
code
E13
P13
Ch 9
2/17 14 Strings 2 A: 12:56
B: 4:54
notes
A
B
E14
P14
Ch 9
2/20 (7) No Class: President’s Day Lab 7
2/22 15 Lists A: 5:49
B: 18:14
notes
A
B
code
E15
P15
Ch 10
2/24 16 Reading and writing files A: 7:26
B: 26:37
A
B
code
E16 A4 Ch 11
2/27 (8) 17 Dictionaries A: 16:03 notes
A
E17
P17
Lab 8 Ch 12
3/1 18 Variables are references; Mutability A: 15:52 notes
A
E18
P18
9.9, 10.8, 12.4
3/3 19 Mutability and functions A: 10:18 notes
A
E19
P19
6.4
This Blog Post
3/6 (9) 20 Searching notes
binary_search.py
E20
P20
3/8 Sorting sort.py E20
P21
3/10 AMA
3/13 Final Exam: 3:30-5:30pm, Fraser 101

Course Policies

Professionalism

I am committed to maintaining an inclusive, supportive, and professional environment in all academic settings including lectures, labs, and course-related online spaces. Students are expected to live up to the expectations of WWU’s Student Code of Conduct defined in WAC 516-21. Failing to follow the Student Code of Conduct will negatively affect course grades up to and including a failing grade for the course. Conduct is also considered when determining admission to the major. Refer to University and Departmental policies for more information.

Academic Honesty

Academic honesty is taken seriously in this course. All submitted code will be automatically checked for similarity to all other submitted code for this quarter and previous quarters. The similarity detection tools are quite sophisticated: trivial changes to the code are insufficient to fool it – students who take their classmates’ code and try to tweak it get caught. In fact, making sufficient changes to someone else’s code to eliminate suspicion of similarity is more difficult than just writing the code yourself. All involved parties are accountable for plagiarism: sharing your code with someone else is just as much a violation as taking someone else’s code.

Regret Policy: If you find you have made a bad decision in a panic, you have 48 hours after the deadline to contact the instructor to apologize; in this circumstance the penalty will be a zero for the assignment. Otherwise, the standard department policy for violating academic integrity applies, which is a failing grade in the course and the incident being reported to the Chair and Dean.

Finally, please note that “while plagiarism on a given assignment is correlated with better than average scores on that assignment, plagiarism is negatively correlated with final grades in both the course that the plagiarism occurred and in a subsequent related course” (Pierce & Zilles, Investigating Student Plagiarism Patterns and Correlations to Grades, 2017).

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:

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.

Other guidelines for communication in this course:

Late Work

Programming Assignments

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, the Final Project, 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.

Labs

The late penalty for labs is 10% for each hour past the deadline, rounded down to the nearest integer number of hours.

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.

Changes to the Syllabus

This syllabus is subject to change. Changes, if any, will be announced in class or online. Students will be held responsible for all changes.

University Policies

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