CSC 161 Imperative Problem Solving
Fall 2024
Synopsis: This class broadens your means of "computational
thinking" as a method of solving problems. Using robotics (sensing
and control) as a vehicle for exploration, you will learn additional
important concepts from computer science. With daily labs that help
you become progressively fluent in a low-level programming language
and its data representations, you will practice the design and analysis
of algorithms, recognizing and creating abstractions, and manipulating
important information structures. You also get to make robots sing
and dance!
| Instructor: | Jerod Weinman |
| Office: | Noyce 3825 |
| Phone: | x9812 |
| E-mail: | [weinman] |
| |
| Mentor: | Gabriela |
- Course web page:
- http://weinman.cs.grinnell.edu/courses/CSC161/2024F
- Class meetings:
- MWF 1:00-2:20 pm, Science 3815
Contents
english
1 Accommodations2 Overview3 Textbooks4 Schedule of topics5 Assignments and activities 5.1 Reading 5.2 Module Laboratories and Projects 5.2.1 Laboratory sessions 5.2.2 Projects 5.3 Short Quizzes 5.4 Homework assignments 5.5 Exams 6 Electronic Devices7 Partner responsibilities and Collegiality8 Grading9 Attendance10 Academic honesty 10.1 Policy on AI-based Tools 11 Deadlines12 Getting help 12.1 Peer educators 12.2 Discussion with Piazza 12.3 Office hours 12.4 Email
1 Accommodations
If you have any disability that requires accommodations, please meet
with me right away so that we can work together to find accommodations
that meet your learning needs. You will also need to provide documentation
of your disability to Disability Resources staff, located in Steiner
Hall 209 (x3089 or [access]).
Please also note that I also require your accommodations. The chemical
fragrances found in lotions, after shave, body sprays, scented laundry
products, perfume, cologne, etc. make many people who suffer with
asthma, allergies, environmental sensitivities, cancer, and migraines
much sicker. I am sensitive to many chemicals you may not even notice,
so please try to avoid using such scented products before coming to
class and
especially if you visit my office.
Grinnell College is committed to compliance with Title IX and to supporting
the academic success of pregnant and parenting students and students
with pregnancy related conditions. If you are a pregnant student,
have pregnancy related conditions, or are a parenting student (child
under one-year needs documented medical care) who wishes to request
reasonable related supportive measures from the College under Title
IX, please email the Title IX Coordinator at titleix@grinnell.edu.
The Title IX Coordinator will work with Disability Resources and your
professors to provide reasonable supportive measures in support of
your education while pregnant or as a parent under Title IX.
2 Overview
The
official
catalog description reads:
This section of CSC 161 will utilize robotics as an application domain
in studying imperative problem solving, data representation, and memory
management. Additional topics will include assertions and invariants,
data abstraction, linked data structures, an introduction to the GNU/Linux
operating system, and programming the low-level, imperative language
C. The course will utilize a workshop style, in which students will
frequently work collaboratively on a series of problems. Includes
formal laboratory work.
This means that you'll be introduced to the C programming language,
learning how to adequately describe and decompose problems of a computational
nature so that you can effectively tell a computer the steps it should
take to solve the problem. We will study some beginning concepts that
make this process possible, easier to undertake, and often elegant.
Our major objectives for this course include:
- Understanding more fundamentals of computer science:
algorithms, data structures, and abstraction.
- Developing proficiency with the practice of computer programming
(design, documentation, development, testing, and debugging) in a
low-level programming language, C.
- Learning about solving problems in the imperative paradigm.
- Enhancing general thinking and learning skills.
Practically speaking, our topics will include:
- imperative problem solving: top-down design, common algorithms,
assertions
- C programming: syntax and semantics, control structures, functions,
parameters, macro processing, compiling, linking, program organization
- data concepts: data abstraction, integer and floating-point
representation, string representation, arrays, structures, linked
list data structures, stacks, and queues
- machine-level issues: data representation, pointers, memory
management
- GNU/Linux operating system: terminal commands and software
development tools
* Why take it?
Understanding another computational paradigm will increase your problem-solving
abilities. Learning how your programs connect to the underlying representation
and physical machine will give insight to their behaviors and limits.
Oh, and programming robots is fun.
3 Textbooks
Students in this course should have a ready reference for the C programming
language. Some labs include only a brief discussion of a topic, and
students will need to do additional reading to understand the general
context and the details of the material. Use of the textbook can be
an effective means to study this material in appropriate depth.
Copies are available in the CS Learning Center (Noyce 3828) as well
as on reserve in the Kistle Science Library (Noyce 2102).
The course web page provides a significant list of additional
important
references.
4 Schedule of topics
We will work through eight primary modules, each with an integrative
project. See the web page schedule for additional details.
- Module 0:
- Getting Started: Linux terminal environment, C language,
Scribbler 2 Robots, and Program Development (Weeks 0-2)
- Module 1:
- Conditionals, Loops, and Robot Motion (Weeks
2-3)
- Module 10:
- Arrays, Pointers, Functions, and Testing (Weeks
4-6)
- Data Representation:
- Bits, Positive and Negative Integers, and
Floating Point Numbers (Week 6)
- Module 11:
- Characters, Strings, and Input/Output (Weeks
7-8)
- Module 100:
- Structures and 2D Arrays (Weeks 8-9)
- Module 101:
- Dynamic Memory Management, Linked Lists, and Program
Management (Weeks 9-11)
- Module 110:
- Abstract Data Types, Stacks, and Queues (Weeks
11-13)
- Module 111:
- Command-line Arguments and File I/O (Weeks
13-14)
5 Assignments and activities
Grinnell College defines a 4 credit class as an expected
minimum
of 12 hours of academic work per week (including class time).
1 With 4 hours of class per week, you should plan to spend approximately
one hour per class on preparatory reading
5.1, perhaps
another half hour finishing daily lab activities
5.2.1,
with the remaining time (at least 4-5 hours) for collaborative projects
5.2.2
or individual homework
5.4. Your time may vary and, notably,
may be more than this. If you are experiencing difficulties in keeping
up with the course material in a timely fashion, please consult with
the instructor as soon as possible.
This class is taught in a collaborative workshop style. Some days
we will work through problems or concepts in an interactive fashion.
Most days you'll work on laboratory problems on the computer with
another student.
To make class time most valuable for you, I do not plan to lecture
on material that is covered in the reading. Instead, because experimenting
and practicing is the best way to learn, you'll have the opportunity
to answer and ask questions and then begin working collaboratively
on the day's lab exercises with the instructor and a class mentor
available to provide assistance.
By studying the day's topics beforehand, we can concentrate the beginning
of class on areas of confusion. Because our class time is limited,
you must come prepared to each class, meaning you should:
- Check the schedule for the day's meeting to find out the topic.
- Study the assigned material before class.
- Come to class on time, with your textbook, paper, and something to
write with, ready to participate.
5.1 Reading
Nearly every day there will be brief readings assigned, some from
the textbook and some from course web pages. No later than the night
before each class, you should check the course schedule for the readings.
Reading the material may entail the following:
- Overview
- You should look over each reading once to get an overview
of the material to be covered (e.g., summary and section headers).
- In-depth
- Next, study the material closely. Perhaps not everything
will make sense at this point, but hopefully many or most things will.
- Final notes
- After carefully reading the material, make a few
notes to yourself about what you think are the most important concepts
being covered, as well as any questions you have.
These important readings are often brief, but dense, introducing non-trivial
ideas. You should plan to spend about an hour working on the material
in the readings before class. At the end of the hour, you should be
ready to discuss in class the material from the reading that is most
important and most confusing to you. Thus, you should consider answering
the following questions to be part of your daily preparation:
- Identify the section or concept from today's reading that you find
most confusing.
- Briefly explain what you find confusing about it.
It is also extremely helpful to read the material
no later
than the
night before class. Studies have shown that a
little
bit of forgetting between when you try to recall the information (like
we will do at the beginning in class), can actually help you remember
it
better in the long run.
2
5.2 Module Laboratories and Projects
Topics in this course are organized into eight modules and a few supplementary
labs. Modules include laboratory sessions and conclude with a integrative
project.
5.2.1 Laboratory sessions
Most class days will involve collaborative laboratory work; I randomly
assign in-class lab partners that rotate every module. Labs introduce
specific features of Grinnell's computing environment, highlight concepts
and constructs introduced in class, allow instructor assistance in
a "hands-on" setting, and supplement normal office hours.
You might not complete the labs during class, but it is important
to finish these outside of class to be sure you are engaging in all
the course material. Like playing an instrument or speaking a foreign
language, the only way to become proficient is to practice, practice,
practice!
You should keep a careful record of your work as you progress through
the lab.
As a special incentive for mastering the laboratory exercises, 30-50%
of the problems on each test and on the final exam will be taken from
the laboratory exercises (with only slight editing).
5.2.2 Projects
Each of the eight modules concludes with a project involving a computer
program and associated commentary. These projects require you to integrate
the material from the module by meeting several somewhat open-ended
specifications.
Deadlines
Deadlines for the projects vary throughout the semester and are posted
on the course schedule.
Collaboration
Collaboration on projects is
required.
Grading
All projects are evaluated under the
general rubric
for the course; additional specific grading criteria are applied to
each project individually.
5.3 Short Quizzes
At the end of each module, we will have a short quiz to help practice
recall for the later exams and upcoming project. These will take ten
minutes at the beginning of class and will be short answer, fill-in
the blank, and/or multiple choice questions designed to help reinforce
your learning of important elements from the module. Quizzes count
for relatively little in your overall grade and are not designed to
cause significant stress. Rather, they should help you
learn.
Even if you don't ace every quiz, studies show that just
taking
it will help you learn more in the long run, which can improve your
exam scores.
3
The following are the tentative quiz dates, scheduled either the same
day as the project or the class day before.
| Module | Week | Date |
| 0 | 1 | Fri 6 Sep |
| 1 | 3 | Wed 18 Sep |
| 10 | 6 | Mon 7 Oct |
| 11 | 8 | Wed 30 Oct |
| 100 | 9 | Fri 8 Nov |
| 101 | 11 | Fri 22 Nov |
| 110 & 111 | 14 | Mon 9 Dec |
No make up or advance quizzes will be scheduled. The two lowest quiz
scores will be dropped.
5.4 Homework assignments
Homework assignment problems extend the range of problems considered
in the course and help sharpen problem-solving skills. To support
this objective,
all homework problems are to be done individually.
You may ask the instructor about any part of the course (including
any homework problem) at any time. However, you must not discuss any
homework problem with other students (e.g., students from the class,
CS majors, or other students). For homeworks, allowable help from
peer educators is limited. See
Allowable Help from
Peer Educators
Deadlines
Deadlines for the homework vary throughout the semester and are posted
on the course schedule.
Collaboration
Collaboration on homework is
forbidden.
Grading
All assignments are evaluated under the
general rubric
for the course; additional specific grading criteria are applied to
each homework assignment individually.
5.5 Exams
As opportunities for you to demonstrate your grasp of the course material,
there will be two midterm hour exams, and a final exam, all in-class.
| Exam | Week | Date |
| 1 | 5 | Monday 30 September |
| 2 | 11 | Wednesday 20 November |
| Final | - | 2 pm, Friday 20 December |
Exams will have questions requiring short answers, reading code (e.g.,
to determine its outcome), and writing a short, complete functions
and/or programs.
Exams are closed book and closed notes. The signatures of any MyroC
functions you may need will be provided, but no other references will
be provided. You are expected to write C programs using the basic
C syntax and libraries learned thus far.
4
You will not be penalized for simple syntax errors you could easily
fix with a compiler, such as a missing semicolon or mismatched parentheses;
grading emphasis will be on clear and correct logic, as well as a
clear, demonstrated knowledge of the use of basic elements of C.
6 Electronic Devices
With the exception of collaborative computer-based lab activities
that use the existing MathLAN computers,
the use of electronic
devices (smartwatches, phones, tablets, or laptops) will be prohibited
during class.
Why?
- Taking notes on laptops is generally less effective for learning than
writing longhand, which forces you to consolidate information as you
process it.5
- Distractions (email, messages, social media, etc.) hinder your own
learning67 as well as that of those around you.8
- Remarkably, even the mere presence of such devices impedes
cognition.9
When class begins, please put your electronic devices away until after
the conclusion of the class hour.
Violations of this policy will negatively impact a student's grade.
Exceptions to this policy can be made as an accomodation for those
with documented disabilities.
An exception may be made at the conclusion of some classes, when you
may wish to trade contact information with your partner or establish
a schedule to meet for out-of-class collaboration.
7 Partner responsibilities and Collegiality
Work on labs and projects in this course is often done collaboratively
(in pairs, occasionally in a group of three). Many studies suggest
substantial benefits to learning with this type of group work. However,
to be successful, collaboration requires partners to participate actively.
Expectations for collegial behavior include:
- being present in class (physically and mentally)
- coming to class on time
- coming to class prepared
- asking questions when appropriate
- making positive contributions to class discussion by volunteering
and when called upon
- staying on task during in-class lab exercises, and
- working effectively with your lab partner(s)
Students who regularly fail to meet these expectations should expect
to have a conversation with the instructor. Egregious violations may
result in a petition for dismissal from the course.
As noted above, partners should actively participate throughout class
sessions and make arrangements to meet in the lab outside of class
to finish labs or projects, as needed. Each partner has an
obligation
to attend and contribute during planned out-of-class sessions.
Failure to meet one's responsibilities to a group negatively impacts
the individual and impedes the partner's education. Thus, except in
exceptional circumstances (e.g., illness, family emergencies, serious
injury), failure to follow through with one's responsibilities as
a partner may have a significant impact on one's course grade and/or
one's standing in the course.
For more details and suggestions on how to be an effective pair programmer,
please read the following article.
8 Grading
My goal is for everyone taking this course to be able to demonstrate
familiarity, fluency, and excellence with the course concepts. I would
be very happy if you all met the goals above and received "A"s.
The following weighting of individual activities will provide a basis
for evaluation.
| Homework problems (4) | 25% |
| Projects (8) | 20% |
| Midterm Exams (2) | 25% |
| Final exam | 15% |
| Best of homework and midterms | 5% |
| Quizzes (7) | 10% |
Some work may be graded by someone other than the instructor. However,
all questions or concerns about grading should only be directed to
the instructor.
The following is proposed as the grading scale for the course.
| Average % | Receives | Grade Points | Definition |
| 93-100 | A | 4.00 | Excellent |
| 88-92 | A- | 3.67 | Excellent |
| 85-87 | B+ | 3.33 | Good |
| 81-84 | B | 3.00 | Good |
| 78-80 | B- | 2.67 | Good |
| 74-77 | C+ | 2.33 | Satisfactory |
| 68-73 | C | 2.00 | Satisfactory |
| 55-67 | D | 1.00 | Passing |
| 0-54 | F | 0.00 | Failing |
To compensate for the unpredictability of learning exercises' outcomes,
the brackets (left column)
may be adjusted upward (but not
downward).
9 Attendance
Because is a collaborative, discussion-based course, your presence
is integral to your learning. Thus, 1.5% will be deducted from your
overall grade for each unexcused absence. I know that sometimes
"things happen." Therefore, you are granted
one unexcused
absence from class without penalty. However, this rebate is cancelled
upon a second unexcused absence.
Tardiness is indistinguishable from absence (until you arrive),
and this causes problems in ensuring everyone has a partner for the
day's work. Therefore, if you are more than five minutes late to class
or arrive
after we start the lab (when I will have needed to
resituate your partner) you will be marked absent. Please plan to
arrive by the start of class.
If you will be absent, you must send a written explanation (email
is acceptable)
before class except in the (rare) case of
dire emergency. (Consider the analogy for phoning in sick for work;
you wouldn't do it at 4 PM the day you missed work.)
Because I do not wish you to risk harm to yourself or
others, I am likely to moderate penalties in case of illness.
If you know in advance that you will be absent for any reason, you
must notify me in writing (again, email is fine) at least 7 days in
advance to make arrangements for considering your absence excused.
If you do miss a class, you must first talk to a classmate about any
material that you may have missed. After that, you may follow up with
me about any further questions or concerns.
You should complete the lab assigned for any days you are absent and
be sure you understand the material.
10 Academic honesty
As students, you are members of the academic community. Both the College
and I expect the highest standards of academic honesty, as explained
in the Grinnell College Catalog,
https://catalog.grinnell.edu/content.php?catoid=34&navoid=5483\#honest-academic.
Among other things, this means clearly distinguishing between work
that is your own, and work that should be attributed to others. This
includes ideas, examples, and code that you draw from labs and readings.
It is expected that the collaboration policies given in this syllabus,
on particular assignments, and in the
allowable
help from peer educators will be followed. In particular:
- When you explicitly work as part of a group or team, you need not
identify the work of each individual (unless I specify otherwise).
- You may discuss concepts (algorithms, ideas, approaches, etc.)
described in the readings, lab exercises, or during class with anyone.
- You may only discuss homework assignments with the instructor.
- You may only discuss project assignments (algorithms, solutions, write-ups,
code, debugging, etc.) with your group members, computer science tutors,
CSC 161 mentors, or the CSC 161 instructors.
-
All the work submitted (code, experimental
data, write-ups, etc.) must be your own or that of your group. Code
or documentation provided by the instructor must be attributed, including
code that you copy and subsequently modify.
-
All non-syntax consultations (i.e., ideas
about algorithms) from any source, including the readings, labs, provided
code, and internal or external language references, require formal
citation within the related program or write-up.
- Any conceptual contributions by individuals not in your group
must be acknowledged and attributed in your report. That is you must
give specific attribution for any assistance you receive.
(This includes assistance from tutors or mentors.) The suggested acknowledgment
format is
- "[Person X] helped me to do [thing Y] by [explaining
Z]."
- Any program results or output must be faithfully recorded, not forged.
(A thoughtful explanation of unexpected behavior can often be a worthwhile
submission and is much better than the alternative.)
- You are responsible for safeguarding your work from being copied by
others. This requires you to take reasonable precautions with hard
copy printouts as well as file system permissions. (Note that MathLAN's
default permissions prevent others from viewing your files.)
As an instructor, I will meet my obligation to bring any work suspected
to be in violation of the College's Academic Honesty Policy to the
attention of the Committee on Academic Standing, after which there
can be no recourse with me.
10.1 Policy on AI-based Tools
You are not permitted to use ChatGPT, GitHub Copilot, or
any
other programming assistance tool that is trained on others' code
for this course. If you aren t already aware, GitHub
Copilot is a machine learning system that suggests code as you type
in VSCode. Copilot is trained on code hosted by GitHub, and offers
suggestions that go far beyond the usual API-based autocomplete suggestions
many programming editors produce (e.g., VSCode's Intellisense, which
you are welcome to use for this course). There are major legal questions
around Copilot's use of other code, particularly as it connects to
open source licenses that place restrictions on the licensing of derivative
works.
10
For the purposes of this class, there is no ambiguity about the use
of AI tools: code suggested by AI tools (e.g., Copilot, ChatGPT, etc.)
is a direct violation of honesty policy item #
5
above.
If you happen to use your own computer for any programming in this
class I ask that you do not install GitHub Copilot, or uninstall it
if you have already done so. If you prefer not to remove Copilot from
your computer you are welcome to complete all work for this course
on MathLAN machines, which will not have Copilot installed.
11 Deadlines
Work is due at the time and date specified in the assignment. Unless
otherwise specified, the deadline for a project or homework problem
is 10:30 PM on the date specified.
Assignments due on days for which you have a prior excused absence
must still be submitted by the deadline.
A late penalty of approximately one letter grade will be deducted
in each subsequent twenty-four hour period after the deadline.
Exception: Deadlines for assignments involving programming will
automatically be extended by at least one class period if MathLAN
is down for an unscheduled period of 3 or more hours during the two
days preceding the assignment due date.
Absolute deadline: All work (except the final) must be submitted
by Monday 16 December at 5 p.m. (Note that this is earlier than the
institutional deadline).
12 Getting help
12.1 Peer educators
Our course mentors will hold weekly evening mentor sessions to go
review, connect, and/or go further in-depth on the course topics.
The Computer Science Department makes tutors for CSC 161 available
for drop-in help in the open laboratory, SCI 3815 (Sunday-Thursday,
7-10 PM). Peer tutors may also be available for regular, more intensive
one-on-one tutoring. As the course gets underway, please let me know
if you are interested in regular weekly individual tutoring. I may
also recommend individual tutoring.
12.2 Discussion with Piazza
For online class discussion or Q&A we will use Piazza, which is designed
to get you help fast and efficiently from your classmates, mentors,
and myself. Rather than emailing questions, please to post your questions
on Piazza:
https://piazza.com/grinnell/fall2024/csc161/home.
You must ensure your queries and responses respect the academic honesty
and collaboration policies for the course and specific problem. (In
general, you should not post your code for projects or assignments.)
12.3 Office hours
Please come by during my office hours to discuss the course content,
get any extra assistance, or just talk about how the course is going.
Note that if multiple students have similar questions or issues, we
may work together as a group. If you cannot attend a scheduled office
hour, you may also email me to schedule an appointment; please include
3-4 possible meeting times so that I can pick one that works for
me.
Half of my office hours are open, "drop-in" times for students
with quick or unplanned questions. If there is anyone waiting, I try
to will limit our time to fifteen minutes to respect others' time.
The other half may be reserved by signing up for a 15 minute slot.
I enjoy getting to know my students, but I prefer to reserve office
hours for academic matters. If you would like to have a more informal
conversation, I would be delighted to accept an invitation to eat
lunch with you at the Marketplace.
12.4 Email
Email is also a reliable way to contact me, but please allow 24 hours
for a response (except on weekends, when I do not regularly read email).
You may also call me in my office (x9812) for more urgent matters
(e.g., you will be missing a lab due to illness).
Thanks to Janet Davis, Sam Rebelsky, and Henry Walker for many
elements of this syllabus. Henry Walker wrote the original Textbook
(3) section, the topics list of the Overview (2),
and most of the Module Laboratories and Projects (5.2), and
partner responsibilities (7) in CSC
161: Imperative Problem Solving and Data Structures under a Creative
Commons Attribution-NonCommercial-Share Alike 4.0 International License.
This work is licensed under
a Creative
Commons Attribution-Noncommercial-Share Alike 4.0 International License.
Footnotes:
1Grinnell College. (2016) Grinnell College Semester Credit Definition.
https://grinco.sharepoint.com/sites/Registrar/Shared Documents/semester credit definition RESOLUTION.pdf
2Soderstrom, N.C., & Bjork, R.A.
Learning
versus performance, in Dunn, D.S. (ed.). Oxford Bibliographies in
Psychology (New York: Oxford University Press).
3Roediger, H.L., & Karpicke, J.D. (2006).
Test-enhanced
learning: Taking memory tests improves long-term retention. Psychological
science 17(3), 249-25.
4This is an important and realistic skill. Your productivity as a software
developer depends on your fluency in the language (consulting syntax
references slows you down). Technical job interviews frequently require
you to solve a complex problem with code on a whiteboard.
5Mueller, P. A., & Oppenheimer, D. M. (2014).
The
pen is mightier than the keyboard: Advantages of longhand over laptop
note taking.
Psychological science,
25(6), 1159-1168.
6Carter, S. P., Greenberg, K., & Walker, M. S. (2017).
The
impact of computer usage on academic performance: Evidence from a
randomized trial at the United States Military Academy.
Economics
of Education Review,
56, 118-132.
7Glass, A. L., & Kang, M. (2018).
Dividing
attention in the classroom reduces exam performance.
Educational
Psychology, 1-14.
8Sana, F., Weston, T., & Cepeda, N. J. (2013).
Laptop
multitasking hinders classroom learning for both users and nearby
peers.
Computers & Education,
62, 24-31.
9Ward, A. F., Duke, K., Gneezy, A., & Bos, M. W. (2017).
Brain
drain: the mere presence of one's own smartphone reduces available
cognitive capacity.
Journal of the Association for Consumer
Research,
2(2), 140-154.
10You can read more about these issues at
https://www.plagiarismtoday.com/2021/07/08/github-copilot-and-the-copyright-around-ai/.