423B Sieg Hall
smunson at uw dot edu
cfchung at uw dot edu
This course will cover the basics of programming in the Python language. This course has been designed for students with no or limited prior programming experience. Weekly assignments provide a venue for applying programming concepts. Assignments will focus on data manipulation and the creation of small applications that leverage data and computational resources from larger, publicly available sources. The course culminates in a final project.
If you have substantial prior programming experience, some of this course — particularly the key programming concepts — will likely be review. Compared to other UW prgramming courses, HCDE310 will focus on developing good practices for pulling, processing, and presenting web data.
If you are concerned that you'll be bored with the weekly assignments, there is an option to opt out of all weekly assignments (but not the exam!) and work on a larger project in their place. If you think this is right for you, please come talk with me.
This version of HCDE310 is a new effort. We'll be learning Python. Once you have the basics down, you can pick up other languages, but if you are new to programming, Python is a pretty good starting point. For example, in Python, the following can be typed and immediately executed:
2 + 3You get
5printed out as the answer. In C++, the corresponding program has multiple lines and they require much more explanation.
Python is a wonderful language for general applications and prototyping. It has been used extensively for data analysis (more flexible than spreadsheets), data plotting, building dynamic web sites, games, etc. It is used in many organizations, companies, and applications, incuding NASA, Mozilla, Yelp, Pinterest, Path, Reddit, the National Labs, Google (in fact, Google hired the developer of Python), Eve Online, and Civilization IV.
While all computer languages can largely do all tasks that other computer languages can do, sometimes one language is better than another for a specific task (e.g., C programs often provide better performance but Python programs take less time to write and can be more reliable). Thus, it is useful to be exposed to multiple languages if you are going to take multiple computer science classes. Recruiters often look for experience in a variety of languages. If you plan to take just one programming course, Python is a great language to learn. You will find it to be a very versatile language with a good developer community and many resources available that you can use to continue to learn.
If you have previously taken CSE142, you'll find that Python is a bit different than Java. You'll also find that the first part of this course covers many of the same basic principles, but at an accelerated pace. This is a chance to reinforce these concepts by covering them in a different language, and also teaching your classmates who haven't had quite the same exposure. If you find that this course is moving too slowly for you, please let me know.
If you are new to programming, you will likely find that the first part of the course brings new topics each week. It is important that you keep up with the assignments and that you seek help — from the teaching team or your classmates — if you are struggling.
At the end of this course, students should be able to:
Use the two books as references. Zelle is better to get a quick overview of the language. Downey's book is better when it comes to understanding the details. We will refer to both books during the course and point to the readings from the two books. In general, there is significant overlap in the material between the books. We will generally have required reading from one book and optional reading from the other one. Memorization is not required in this course.
The instructional team is supporting a virtual environment in which you will edit programs and run them. You will need to install:
As an alternative, you may choose to install Python and a text editor natively on your laptop. It's definitely doable — everyone had to when I have taught similar courses — and, for some, preferable. But weeks into the semester I was finding strange differences in the environments students had set up, and it was very hard to help them when things didn't work as expected.
The instructional team is supporting only the VMWare/Mint environment this semester. If you try to run things natively, you're on your own.
If you do decide to do things on your own, we suggest NotePad++ on Windows and TextWrangler on Mac for editing Python programs. Standard text editors, such as Notepad or TextEdit, are not good, though they can be used in a pinch. Word processing programs like MS Word will not work because they add lots of unwanted formatting characters.
We will show you how to run your Python programs from a command-line and to edit and debug using Eclipse.
If you have something of a private nature that you don't want to share with the other students, feel free to send a message to one of us individually.
It is highly recommended you bring a laptop to each class session. This is not a requirement, and all of the work in the course can be completed on a desktop computer or on lab computers. However, you will find parts of the course more valuable if you can play with code examples as we demonstrate them in class. A laptop will also make it easier for you to work on your assignments and projects in your spare time.
If you do not bring a laptop, you'll need to bring a memory stick or external hard drive, of at least 10GB — preferably 16 — in size. You may find that things run faster with an external hard drive than with a USB stick, but I haven't tested it on the lab computers.
The first time you learn technical material it is often challenging. We are going to cover a wide range of topics in the course and we will move quickly between topics. Because it is our goal for you to succeed in the course, we encourage you to get help from anyone you like, especially in the portion of the course before the midterm and even for the completion of assignments.
However, you are responsible for learning the material, and you should make sure that all of the assistance you are getting is focused on gaining knowledge, not just on getting through the assignments. If you receive too much help and/or fail to master the material, you will crash and burn at the exam when all of a sudden you must perform on your own. The final submission of each assignment must be in your own "words."
If you receive assistance on an assignment, please indicate the nature and the amount of assistance you received. If the assignment is computer code, add a comment indicating who helped you and how. Any excerpts from the work of others must be clearly identified as a quotation, and a proper citation provided (e.g., in the comments of the code if it is a code fragment you have borrowed). If you are a more advanced student and are willing to help other students, please feel free to do so. Just remember that your goal is to help teach the material to the student receiving the help. It is acceptable for this class to ask for and provide help on an assignment via the Facebook group, including posting code fragments. Just don't post complete answers. If it seems like you've posted too much, one of the instructional staff will contact you to let you know, so don't worry about it.
Course conduct is governed by the University of Washington Student Conduct Code and the College of Engineering Academic Misconduct Policy. You should also acquaint yourself with the HCDE Plagiarism Policy.
To reiterate, the collaboration policy is as follows. Collaboration in the class is encouraged for assignments — you can get help from anyone as long as it is clearly acknowledged. Collaboration or outside help is not allowed on exams, though you will be allowed to use the book or any other resources (including Google and web). Use of solutions from previous quarters is not allowed. The authorship of any assignments must be in your own style and done by you, even if you get help. Any significant help must be acknowledged in writing.
I like a relaxed classroom where everyone feels comfortable. You are welcome to bring drinks or snacks to class (assuming it is allowed in the room we are in). You can (and should) bring your laptop to class. I would rather have you come to class and listen with one ear than not come to class at all. As a courtesy to others, be sure to put your phone on silence/vibrate. Coming late to and/or leaving early from class is okay, as long as you don't disturb your classmates. Ask questions at any time, and if you have some expertise in a particular topic, please to raise you hand and share it with the class.
Our primary purpose in the classroom is to interact and learn from each other. While non-participation (sleeping; checking email) is permitted, we urge you to consider its impact on your fellow students. Class is a lot more fun when everyone is engaged; a few visibly disengaged people can suck the energy out of a room. We reserve the right to ask you a question to try to reengage you if you seem to have checked out, but will try not to do this in an embarrassing way.
There will be assignments throughout the course (pretty much every week and sometimes mini exercises during a lecture). Regular assignments allow you to learn the material in small "chunks" and to keep a close eye on how well you understand the material. In some cases, we will do part or all of the assignments during a lecture, though you will submit it later.
Generally, part of the sessions will be lab time. The teaching staff will be there and will circulate. You can confer with other students and the instructors. This is a great time to work on assignments, and you may be able to finish the weekly assignment in the lab — but don't count on it. The previous assignments are typically discussed in the class and we like some time to review your submissions. For this reason, late assignments will receive a zero. You can submit late assignments to get feedback, but no points will be given for an assignment that is turned in after the deadline, unless you have made prior arrangements.
There will be one project in the last 3-4 weeks of the quarter, where you bring all the skills you have learned on one significant problem solving task. You will learn debugging skills, modularity skills, and testing skills. We think the project will be interesting to do and help you pick up life-long problem solving skills that will be useful even beyond programming.
As a supplement to the project, you will write up a description of an interesting data source or API that other students might want to use in their final project, or an interesting python module or package. More about this later in the quarter. You are free to use any online module or package to talk about, but one list of many of the Python modules can be found at: Python Global Module Index.
There will be one exam, most of the way through the course. The first part is a traditional written exam intended to measure mastery of the course material, including programming knowledge; the second is a practical exam, intended to measure programming skills. The exam will be administered during class to allow approximately 2 hours. The exam date is announced well in advance (see the dates at the end of this document). If you have a conflict, please let me know at least 2 weeks in advance so that I can arrange a different time for you.
There's a chance that I will decide to add in-class quizzes to supplement the exam; if so, the quizzes will be announced in advance.
Class participation, helping others, interacting on the email list and answering questions, asking good questions that lead to interesting discussions, and pointing out corrections to lectures or code will contribute to bonus points, which you can use to help boost your grade.
In addition, there are optional challenge problems at pythonchallenge.com. I encourage you to try to solve the problems there when you have time and discuss approaches or even code on the email list — that all contributes to class participation points. If you are not able to solve them initially, don't worry. Treat them as optional and fun part of the course. The good thing about the Python challenges is that once you submit a solution to a challenge, you can see several solutions to the previous challenge. It is a learning experience to see how other people approached the same problem.
If you think you need an accommodation for a disability, please let us know at your earliest convenience. Some aspects of this course, the assignments, the in-class activities, and the way we teach may be modified to facilitate your participation and progress. To request accommodations due to a disability, please contact the Disability Student Services Office at 206.543.6450 (voice), 206.543.6452 (TTY), 206.685.7264 (fax), or email at firstname.lastname@example.org. If you have a letter from the DSS office indicating that you have a disability that requires academic accommodations, please present the letter to me so we can discuss the accommodations that you might need in this class.
The graded work in the course will be weighted roughly as follows to determine a final percentage grade. (Note that bonus points could allow you to get above 100%):
|Python module/package or data source writeup ("resource writeup")||5%|
(I reserve the option to add quizes, which will reduce exam's weight)
Also see the HCDE grading policy.
The course effectively consists of two parts. In the first part we march through the textbook in quick fashion. In the second part, once we have learned the basics of programming, we will focus on data analysis and other applications. Since this is the first time we are teaching Python in 310, we will keep some flexibility in the schedule. If it seems like we need to spend more time on a particular topic, we will shuffle the schedule. It is important for you to let us know when you are having problems. This will help us pace the material appropriately, cover some material in greater depth, and revisit material if necessary.
The course is designed for students with no programming experience. If you stick with the course and invest the necessary time, you will be amazed at how much you will learn in 10 weeks and at the doors opened by a basic familiarity with programming and computational thinking.
If you do not have any programming experience, some concepts will take some time to sink in. Do not worry too much if you feel like you are in a fog at times. The assignments are the best way to track your progress through the material.
Usually the biggest problem students encounter in the course is trying to do everything in a few hours right before an assignment is due or right before an exam. If you only think about the course a few hours each week, you will get some of the details but they will not mesh together to provide the big picture. Programming is easy once you get the big picture. The textbook will become an easily scanned reference for you once you know what to look for and why you are looking for it.
Cramming does not work very well when dealing with the material in this course. This is because the material in the course is actually fairly straightforward once you "get it" — once you understand some basic principles. No amount of memorization will make up for not having the big picture. Try not to get stuck on any one thing; it is all easy once you "get it." If you do get stuck on something and feel like you are going in circles, ask for help, look at something else, or come at the problem from a different direction. Remember that exam is open notes, and open book for the practical portion.
Good luck and welcome aboard!
|Week||Dates||Topic||Reading (optional in parens)||Homework|
|1||Sept 24, 26 Sep 25, 27||
Introduction to the Course, Computers, and Python.
Operations on strings and lists. Version control.
Zelle ch 1
Downey ch 2
HW0: SW installation; writing your first program
HW1: String and list operations; setting up an svn repository.
|2||Oct 1, 3 Oct 2, 4||
File operations; Iteration on sequences
Supplement: Expressions and operator precedence; More on strings
Zelle ch 3
Zelle ch 7
|HW2: Count chars, words, lines in a file.|
|3||Oct 8, 10 Oct 9, 11||
Dictionary data structure
Mashups & APIs
(Downey ch 5)
HW3: Contributor counts
P0: Adding value to data
|4||Oct 15, 17 Oct 16, 18||
Functions. Parameter passing and returning values
Indefinite iteration; nested data structure, and nested iteration
|Zelle ch 6
(Downey ch 6 & 7)
|HW4: Refactor HW3 using functions; output as .csv files; generate charts in Google Docs, Excel, or D3|
|5||Oct 22, 24 Oct 23, 25||
Objects and Classes
Zelle ch 8
Zelle ch 10
|HW5: Calculate likes and comment frequencies from a JSON feed|
|6||Oct 29, 31 Oct 30, Nov 1||
URL lib; Try/except; REST APIs;
Mid-quarter course feedback
Project intro (30 min)
Tutorial on urllib2;
|HW6: Refactor HW5 using classes—some extra methods needed.|
|7||Nov 5, 7 Nov 6, 8||
Tuples; Sorting; list comprehensions; enumerate; zip
List comprehensions: Wikipedia; another explanation w/ nice examples
P1: Project proposal.
HW7: Fetching and processing a live feed.
|8||Nov 14, 19 Nov 13, 15||TBD||TBD|
HW8: Sorting; more data processing.
|9||Nov 21, 26 Nov 20, 27||
HTML & CSS
Severance ch 2;
Review: exercises from Downey & Zelle.
|10||Nov 28, Dec 3 Nov 29, Dec 4||
Exam (in class)
Project time / app engine?
R1: Resource writeup
HW9: Create a feed processor that displays a tag cloud as a web page
|11||Dec 5 Dec 6||flex day||—||Project time|
|F||P2: Final projects due|
This course is based on SI/EECS182 at the University of Michigan, which I redesigned with Paul Resnick in Winter 2009. Chuck Severance, Eytan Bakshy, and Atul Prakash have substantially improved the course before and since, and I have included many of their innovations in this syllabus.