Computer science is no more about computers than astronomy is about telescopes.
—Edsger W. Dijkstra
This lecture course is a rigorous introduction to computer science and the art of computer programming, using the elegant, eminently practical, yet easy-to-learn programming language Python. We will learn the principles of problem solving with a computer while gaining the programming skills necessary for further study in the discipline. We will emphasize the power of abstraction and the benefits of clearly written, well-structured programs, beginning with imperative programming and working our way up to object-oriented concepts such as classes, methods, and inheritance. Along the way, we will explore the fundamental idea of an algorithm; how computers represent and manipulate numbers, text, and other data (such as images and sound) in binary; Boolean logic; conditional, iterative, and recursive programming; functional abstraction; file processing; and basic data structures such as lists and dictionaries. We will also learn introductory computer graphics, how to process simple user interactions via mouse and keyboard, and some principles of game design and implementation. All students will complete a final programming project of their own design. Weekly hands-on laboratory sessions will reinforce the concepts covered in class through extensive practice at the computer.
Open to any interested student.
Prof. Jim Marshall
Office: Ilchman Science Center 100
Phone: 2673 (from off campus: 914-395-2673)
Email: j + my last name + @sarahlawrence.edu
Online format: Our course this semester will be conducted synchronously online via Zoom. Fortunately, as a Computer Science course on programming, the transition to an online format should work pretty well. Lectures will be recorded for students who cannot participate synchronously. Links to all class meetings and recordings will be available through MySLC. Online interactive lab sessions designed to reinforce the material presented in lecture will be conducted synchronously each week, and will make full use of the features of remote learning to provide equitable experiences for all students. The lecture and lab content will not be diminished in any way by the online format.
Lab sessions: In addition to the lectures, you will have an online lab session each week on Wednesday, starting either at 12:05pm or 4:35pm (Eastern time). You only need to attend one lab session per week. The purpose of the labs is to give you time for hands-on, structured practice with Python programming, and the opportunity to ask questions and receive individualized help. At the beginning of each lab session, I will hand out a set of programming exercises for you to work on at your own pace or with a partner. The lab exercises will typically be due the following week as part of your homework assignment.
Group conferences: In addition to the labs, two group conferences will be held each week, one on Thursday and one on Friday, for students desiring extra practice and discussion of the course concepts. These group conferences will usually be optional, unless I tell you that you must attend, which will depend on your own rate of progress with the course material as the semester proceeds. In any case, all students must ensure that their schedule allows them to attend at least one of the group conference sessions each week, if needed.
Overall course rhythm: Learning to program in Python is like climbing a staircase. You can't reach the higher steps if you don't first make it up the lower steps. Each week, we will take the next step up the staircase by studying a new set of programming concepts, but the new concepts will always build on concepts from previous weeks. Each Tuesday in class, I will introduce the new concepts for that week. On Wednesday, you will practice these concepts during your lab session. On Thursday, we will go more in depth and see further examples, and toward the end of the week I will post your homework assignment, which will be due the following Tuesday night. This weekly rhythm will continue throughout the semester. During the final three weeks, you will have the opportunity to create a substantial program of your own design.
On-time attendance is expected for all lectures and lab sessions. Each lecture will be recorded and posted on MySLC, typically within 24 hours of class, but the lab sessions and group conferences will not be recorded. If you are unable to attend a lecture synchronously, you must watch the recording within 3 days of the time that it is posted online. Unfortunately, storage space for class recordings is limited this semester, therefore recordings older than two weeks will be permanently deleted as the semester progresses.
Given the fast-paced, cumulative nature of the course material, students who miss class risk quickly falling behind, and catching up can be difficult. Although I realize that missing class sometimes cannot be avoided, you may receive reduced course credit if you miss more than 2 lab sessions, for any reason. If you are unable to attend class or lab, please contact me about it as soon as possible. No student will be admitted to the course after the add/drop period ends.
This course will be conducted online via Zoom, so you should read through the Zoom information for students provided by the SLC Help Desk. Most of the time, I will encourage everyone to keep their web camera turned on during class. This will help me to get to know everyone more quickly. If you would prefer that others not see your local surroundings, you might consider using a Zoom virtual background or customizing your Zoom profile to show a picture of yourself. Other things to keep in mind:
Please keep your microphone muted until you want to speak. This will help cut down on distracting background noise and make it easier for everyone to focus. An easy way to temporarily un-mute yourself is to just hold down the space bar while you speak.
Test out your microphone and audio before class starts.
When your web camera is on, please avoid having a distracting background or wearing clothes you wouldn't typically want the general public to see.
Since I've been known to forget to un-mute myself or turn on screen-sharing when attempting to present something, please don't be shy about letting me know when you can't see or hear what I'm trying to show you!
To ask me a question, either type it into the public chat or just speak up and say "question" to get my attention. Although I try to monitor the chat, it can sometimes take me a while to notice, especially when I'm sharing my screen (which I will be doing often), so the quickest way to get my attention is usually to just speak up.
Work in surroundings that are as quiet and undisturbed as possible to minimize distractions around you, stay off your mobile phone or other devices, and avoid having extraneous side conversations with others while you are in class.
Together we will strive to make the classroom an open and welcoming environment where everyone is mutually respected no matter their race, gender, age, disability, religion, sexual orientation, or national origin. If you feel this goal is not being met or you have any suggestions as to how to create a more positive and open classroom environment, please do not hesitate to contact me.
Python Programming, 3rd Edition
by John Zelle
Think Python, 2nd Edition
by Allen B. Downey
I will often send out announcements to the class through email, so you are required to check your Sarah Lawrence email account at least once per day. I will use your @gm.slc.edu address because it is reliable and easy to remember. You should also check the course web page frequently for code examples discussed in lecture, and for the homework assignments. I will be happy to answer your questions by email and will try to respond as quickly as possible to messages that pertain to the course.
We will have a brief, timed quiz at the beginning of class every other Thursday during weeks 3-11 of the course, typically consisting of 2-3 questions that will ask you to read, write, and understand short pieces of Python code. The quizzes are intended to serve as a "reality check" to assess how well you have understood basic programming concepts, but they will not count for much in your final grade. However, based on your performance on the quizzes (or homeworks), I may ask you to begin attending one of the weekly group conference sessions. By far the best way to prepare for the quizzes is to do the lab and homework assignments consistently each week. At the end of the semester, I will drop your lowest quiz score. No make-up quizzes will be given, so plan accordingly.
The weekly homework assignments are the heart of the course. Assignments will be posted toward the end of each week, usually by Friday evening, and will be due the following Tuesday by 11:59pm. Most assignments will involve writing, testing, and debugging Python code. We will start out writing many small, simple programs, and gradually progress to larger-scale and more challenging tasks. You should expect to spend a substantial amount of time — several hours, at least — outside of class each week working on the assignments. Fortunately, programming is a lot of fun, and many students are surprised to find that they eagerly look forward to doing their Python homework each week!
You should start each assignment as early as possible. Don't wait until the day before it is due. "I can't get Python to work on my computer!" or "My computer crashed!" or "I accidentally deleted my files!" are not acceptable excuses for failing to complete an assignment on time. You should always make frequent backups of your work, to avoid this type of situation!
Assignments submitted by the Tuesday midnight deadline will receive full credit. However, if you are unable to complete your assignment by the Tuesday deadline, you can still receive most of the credit if you complete it and submit it during the 3-day "grace period" from Wednesday up to Friday midnight. This will give you some extra time to seek further help or clarification from me, either by contacting me directly or coming to group conference (or both). Assignments received after the grace period expires may be substantially penalized.
You will use a web-based submission system to turn in your Python files for each assignment. More details about using this system will be provided in class. Please do NOT email your homework to me!
You should always include your name and the assignment number in a comment at the top of each file that you turn in.
On some homework assignments, you may work with a partner if you wish, but you must talk to me in advance about this and obtain my permission. No more than two people may work together, and you and your partner are required to participate equally in designing, writing, and debugging your code. Furthermore, you must agree to work as a team before starting on an assignment. When working with a partner, please submit only one copy of your files. However, make sure to include both of your names in a comment at the top of each file. If you forget to include both names, only one person will receive credit.
The code that you submit must load into Python without generating any syntax errors. Code that cannot be loaded will not be accepted.
Toward the end of the semester, you will have an opportunity to go beyond the assigned homework exercises by developing and implementing a substantial program of your own design. This will allow you to synthesize the programming concepts you've learned in class in a more creative and personal way, according to your own interests. There are many possibilities: games, graphics, simulations, etc. — your imagination is the limit. You will have three weeks to work on your mini-project. A short written project proposal will be due by the end of Thanksgiving break, and your completed program in final working form, along with a short project writeup, will be due on the last day of the semester (Friday, December 18). More information about the mini-project will be provided in class.
Your programs will be evaluated on both functionality and style. As expert programmers know, programming is about more than just getting your code to run correctly on a computer. It is a highly creative activity akin to an art form, which relies as much on a sense of aesthetics and style as on technical mastery of the programming language. Programs should be written primarily for other programmers to read and understand, and only incidentally for machines to execute. Thus it is very important for you to develop a clear and consistent programming style, making good use of comments, white space, and well-chosen variable names. Your code should follow these general stylistic guidelines:
Homework assignment scores are based on both the functionality and style of your code, according to the following scale. Please be aware that even if your code works completely correctly, your assignment could still receive a 4 due to stylistic issues. To receive a 5, your code must work completely correctly, and be well-organized and easy to read (see the stylistic guidelines above).
|5||Work of excellent quality that clearly meets or exceeds all of the assignment expectations. All programs work correctly on all of the input data, and are well-written, exhibiting good programming style.|
|4||Work of very good quality that meets most of the assignment expectations. Programs work correctly or mostly correctly for most of the input data, though some programs may have a few minor deficiencies or stylistic problems.|
|3||Work of satisfactory quality that meets some of the assignment expectations and reflects a good effort overall, despite some deficiencies. Some programs work correctly or mostly correctly for most of the input data, but may have significant stylistic problems or other shortcomings.|
|2||Work of subpar quality that falls short of assignment expectations and needs improvement. Some programs have serious deficiencies, and work incorrectly for a significant portion of the input data. Nevertheless, the work shows some degree of effort and understanding.|
|1||Work of poor quality that exhibits severe problems, reflecting minimal effort or understanding. Many programs crash or work incorrectly for most or all of the input data.|
At times you may find some of the course material to be quite daunting. But don't be discouraged! If you find it difficult, most likely so does the rest of the class. This is just a normal part of the process of learning to program. You are strongly encouraged to contact me as soon as possible whenever you are having difficulty with the material. You should also be sure to attend one (or even both) of the weekly group conference sessions, during which we will discuss whatever concepts students are having trouble with, and work on practice exercises together. In short, if you are confused about something, don't stay that way! Staying confused will only make things worse later (remember the staircase metaphor). Contact me as soon as possible so that we can clear up the problem. There is no point in staring at the computer screen for hours trying to figure out why your code won't work, when just a few minutes is often all it takes to track down the problem together. I'll also be happy to answer questions over email or schedule a one-on-one meeting with you on Zoom.
Our lab assistants will be available online this semester for informal help and tutoring with Python programming, according to the following schedule. All times shown are Eastern Time. No appointment is necessary. Click here to access the Zoom links for the tutoring sessions, and any additional schedule changes or announcements.
Do the reading before you come to class. Don't worry about total comprehension, but at least get a feel for what we will be covering. If you have some understanding of the material coming in, it will be easier for you to ask questions during class, rather than later, when I might not be available. Additionally, I will often discuss code examples in detail during class. If you have already done the assigned textbook reading, the examples will be much easier to follow.
Ask questions if you don't understand. This means both during class and while doing your homework. This course continually builds on previous material (the staircase metaphor again), so if you don't understand something one week, it will continue to be a problem the next week, and the week after that, and so on...until you finally do understand it. If you need help, contact me by email, come to group conference, ask me about it during lab or after class, or ask your classmates — but first read the Academic Honesty Policy below.
Start the homework assignments early. I realize this one is not always easy to do, but if you can get into the habit of doing this, you will be much better off. Here are two reasons to start early: (1) if you get stuck early (i.e., not two hours before the deadline), there will be time to ask for help; (2) if you get stuck, you can always walk away, go do something else (like sleep), and come back later. I find I always have at least a few new ideas when I come back to something like this. If you wait until the last minute, you can't do this.
Practice, practice, practice. The only effective way to learn this material is to consistently do the lab and homework assignments. Finish all of the assigned programs (and maybe even do some extra ones for fun!). Even if you don't get them done on time, they will still help you learn the material.
The highest level of academic integrity is expected of every student. You are strongly encouraged to discuss ideas and approaches to solving problems, on a general level, with your fellow classmates, but you are not allowed to share your program files, code, or solutions with others. I can almost always tell when two different programs derive from the same original source code, even if cosmetic changes have been made to it. The code you hand in under your name must have been written by you from scratch, with the following permitted exceptions: code provided in class by me, code from the textbook, or code developed together in lab with your lab partner. Effective learning is compromised when this is not the case.
In all cases, if you make use of any code that was written by someone else in your assignment, you must clearly acknowledge this in your code. This also goes for any help obtained via the Internet. When in doubt, include a comment in your code crediting the people or sources from whom you got help. If you are ever unsure about what constitutes acceptable collaboration, just ask. You are also responsible for carefully reading the College's official Policy on Academic Integrity in your Student Handbook. Failure to abide by these rules is considered plagiarism, and will result in severe penalties, including possible failure in the course. Please do not put me, yourself, or anyone else in this unpleasant situation!