University of Michigan › Computer Science and Engineering
DiVISION
SI 182 (EECS 182): Building Applications for Information
Environments
Syllabus
Term: |
Winter 2009 |
Lectures
and Lab: |
Thurs.
2-5PM; Friday 2-4PM |
Location: |
1250 USB |
Instructor: |
Prof. Paul
Resnick |
In this course, we will work together to learn
the basics of programming in the Python language. Python is free software, and
you will install it on your computer to keep and use during the course and
beyond. This course has been designed for students with no prior programming
experience. We will learn the basics of programming, taking our time to
understand the basic concepts of programming and revisiting topics as
necessary. Weekly assignments will be key, as they
will 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.
We recommend this course to all students who
want some exposure to computer programming and software design skills. In the
information age, these skills are essential, irrespective of the degree you
plan to pursue. More specifically, this
course is an appropriate prerequisite to EECS 282 (required course for
Informatics concentration) or EECS 280 (required course for CS concentration).
Furthermore, students in other concentrations where data analysis is required
(e.g., statistics, economics, business) are likely to pick up valuable
life-long skills.
EECS 183 and Engin 101
are alternative programming courses to 182 – they are interchangeable as far as
subsequent computer science courses are concerned. Good programmers can pick up new languages
easily (usually a few weeks of effort), once they know basic principles of
programming. EECS 182 is a new effort
with Python as the first programming language. EECS 183 and Engin
101 use a more traditional language, C++, which has more pitfalls for
first-time programmers. For example, in Python, the following can be typed and
immediately executed:
2 + 3
(You get 5 printed 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 one of the three languages used at Google. (In fact, Google hired the
developer of Python!).
If you want to learn C++ later, you can take
EECS 280 after 182. Alternatively, you can go on to take EECS 282 (in Java)
followed by EECS 382 (in C++). 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 and similar in spirit to other
popular languages, such as Perl, Ruby, and Javascript.
At the end of this course, students should be able to:
· Understand the following programming concepts:
o Data types
o Variables
o Functions
o Conditional statements
o Iteration
o List and dictionary data structures
o Mapping a function onto a list
o APIs
· Write programs in python that demonstrate understanding of all of the above concepts and that use the following features:
o File operations
o String processing operations
o An XML processing library
· Manipulate data to
o Extract and summarize desired elements
o Output the processed data in .csv and XML formats
· Create a web service that performs data manipulation
· Create a gadget that displays the output of a web service as a component of a web page
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.
Students in the course will use a number of
tools including Python and a text editor. It is possible to complete all the
work in the course using 100% free tools. There are sufficient free tools to do
the work on a PC or a Macintosh. We will talk about these tools and their
installation in the labs. These include JEdit for
editing Python programs (alternative editors, such as IDLE, vim, or Emacs are also fine) and the Python 2.6 interpreter.
Standard text editors, such as Notepad or TextEdit,
are not good, though they can be used in a pinch.
Below are some links and videos to help you set
up the JEdit (www.jedit.org) and Python (http://www.python.org) environments. JEdit is a nice editor because it is cross-platform and can
also be used to edit HTML, CSS, etc. We also show you how to run your Python
programs in a command-line. Our experience shows that you will understand what
is going on much better this way, using a command line rather than an
integrated development environment.
Please check out the resources
folder for handouts on installing and using the software.
·
Installing Python
·
Installing jEdit
·
Using the command line
·
Executing python programs
·
Taking screenshots
There are also some platform-specific podcasts
shown below.
You will need Quicktime
(or iTunes) installed on your computer to view the podcasts.
You should probably download podcast files to
your computer and view/play them locally as they are rather large files and you
will want to move back and forth as well as start and stop the podcasts so you
can perform the steps as indicated.
It is highly recommended that every participant
in the course 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.
For backup purposes I suggest you buy a flash
drive. This will also allow you to store applications you use in case you are
without a laptop and available computers do not have what you need installed.
While the instructor likes his Windows laptop
very much, the GSI likes his Mac laptop at least as much. You can do the course
on either a PC or a Macintosh (or even Linux!). All the tools that we will use
are portable across all operating systems.
In addition to the main instructor, Sean Munson, who is a
Ph.D. student at the School of Information, will be available to help you
throughout the semester. Ryan Michelli is the grader.
Below are the office hours and contact information for us. Though we have given
individual email IDs, you can also send email to SI182instructors@umich.edu, which
will reach all the teaching staff.
Professor: Paul Resnick |
GSI: Sean Munson |
Grader: Ryan Michelli |
Email ID: presnick Office hours: Thursdays 11-12 417B West Hall |
Email ID: samunson Office hours: Mondays 4:15-5:30 Location: B138 (Basement) Shapiro
Library |
Email ID: rymich |
Please send an
email request to SI182instructors@umich.edu
at least 15 minutes prior to the start of any of the office hours if you are
planning to be there and the approximate time you are going to show up. If there are no such emails or all students
who sent emails have been seen, the teaching staff reserves the right to not be
there or to leave early! An email will ensure that we are around to meet you
and we can also try to inform you if there is likely to be a significant wait.
The course’s public page is at
http://www.si.umich.edu/~presnick/courses/winter09/SI182 The internal site, which is what you
will primarily use, is accessed via http://ctools.umich.edu.
The site will require authentication using your umich
ID and password. If you do not have a umich ID and password, you will need to ask me for guest
access. After that, you should see EECS
(or SI) 182 in the list of your sites.
We will demonstrate the use of ctools site to
you in the class and point to you where to find relevant information. All the homeworks and announcements will be posted at the ctools site.
You will be submitting your assignments via ctools as well (though that may change during the semester).
Also see A
Crash Course on Ctools
The best way to get help during the course will
be via email to the whole class via ctools: SI182W09@ctools.umich.edu. You are
encouraged to respond via email to other students’ messages. Don’t worry about
giving wrong information: the instructors will post corrections if necessary.
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
SI182instructors@umich.edu or
to one of us individually.
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 my goal for you
to succeed in the course, I 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 midterm when all of a sudden you must perform on your own. The
final submission of each homework exercise 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 email list, including posting code fragments.
The Engineering Honors Code will govern the
course. This code originated in the
College of Engineering, and basically says that students are expected to work
with honor (i.e., no cheating), according to the course policies. As students,
you are expected to follow the code and report any violations of the Honor
Code. As instructors, we generally trust that students will follow the code
(violations are reported to an Honor Council). For example, during an exam, the
instructor may decide to sit outside the classroom, trusting that you will not
cheat. We will use the Engineering Honor Code in this class since the class is
cross-listed with the College of Engineering. It applies to you even if you are
not an Engineering student or are taking the course as SI 182.
To reiterate, the collaboration policy is as
follows. Collaboration in the class is allowed (and even 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 semesters 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.
We are all here to learn. 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 PDA and cell phone on silence/vibrate. Coming late to and/or
leaving early from class is fine as long as you don't disturb your classmates.
I sometimes forget to schedule a break during a long lecture, so feel free to
suggest a break if it appears that I have forgotten to do so. Ask questions at
any time, and if you have some expertise in a particular topic, feel free to
raise you hand and share it with the class. I will
not be offended and in fact am here to learn just like you are. Sleeping in
class is OK too, but I will do my best to keep you awake for the whole class
period.
Our primary purpose in the classroom is to
interact and learn from each other. While non-participation (sleeping; checking
email) is permitted, I 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. I reserve the right to ask you a
question to try to reengage you if you seem to have checked out—I 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 Thursday and part of the
Friday 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 on Friday in the lab. If you are not able to complete an assignment
in the lab, it will be due by the following Tuesday, 5 PM. The previous
assignments are typically discussed in the class on Thursday (or Friday if we
do not have sufficient time) and we like some time to review your submissions.
For this reason, late assignments beyond Tuesdays, 5 PM will receive a zero.
You can submit late assignments in order to get feedback, but no points will be
given for an assignment that is turned in after that.
There will be one “capstone” project in the last
3-4 weeks of the semester, 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 will assign you a project that we
think will be interesting to do and help you pick up life-long problem solving
skills, which will be useful even beyond programming.
There will be a midterm and a final exam. Each
exam will consist of two parts. 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 exams are administered during a lab session or the final exam
period to allow approximately 2 hours. The exam dates are 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.
Another relatively painless way to get points in
the class is to write up a description of an interesting data source that other
students might want to use in their final project, or an interesting python
module or package. More about this later in the semester.
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: http://docs.python.org/modindex.html
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 my 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 http://www.pythonchallenge.com . The
site is not the easiest one to use, but I will show you the basic steps. 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 me 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. As soon as you make
me aware of your needs, we can work with the Office of Services for Students
with Disabilities (SSD) to help us determine appropriate accommodations. SSD
(734-763-3000; http://www.umich.edu/ sswd/) typically
recommends accommodations through a Verified Individualized Services and
Accommodations (VISA) form. I will treat any information you provide as private
and confidential.
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%):
Weekly Assignments |
40% |
Exams: |
40% (Midterm: 15% and
Final: 25%) |
Capstone project: |
15% |
Python module/package or
data source writeup |
5% |
Class Participation: |
3% bonus points |
Grades will be awarded as follows:
A+ 97% ← You have to work really hard to get this
A 92%
A- 87%
B+ 82%
B 77%
B- 72%
C+ 67%
C 62%
C- 57%
D 52% ← You also have to work really hard to get this
F 47% ←
Or this
The course effectively consists of two
parts. In the first part we march
through the textbook in quick fashion.
We might even skip bits and pieces here and there so we can move
quickly. 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 I am teaching
Python, I will keep some flexibility in the following 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 me know when
you are having problems. This will help me pace the material appropriately and
cover some material in greater depth.
I am perfectly happy to loop back and review
material if it appears we went through something too quickly. Just let me know when you need me to do this.
This course covers a lot of interesting topics.
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 15 weeks.
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 very easy 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 exams are open book. So,
understanding the material is more important than memorizing it.
Good
luck and welcome aboard!
Course Schedule and Important Dates
WEEK |
DATES |
TOPIC |
READING |
Homework (due date) |
1 |
Jan 8, 9 |
Introduction to the
Course and Computers. Quick overview of computing and Python. |
Chapter 1, Zelle. Chapter 2. Zelle (Chapter 1, Downey) |
HW1 (1/13): SW installation;
data processing without a computer |
2 |
Jan 15,
16 |
Expressions; Operator
precedence; Operations on strings and lists; File operations |
Chapter 2 Downey. Zelle., 4.1-4.4 and 4.6 (Chapter 3 Zelle. Ch. 8 and 10 in Downey.) |
HW2 (1/20): Count chars,
words, lines in a file |
3 |
Jan 22,
23 |
Dictionary data
structure; |
Zelle 11.6; Zelle Chapter 7 Zelle 4.5 (Downey chapter 5) |
HW3 (1/27): Extract the Twitter
messages; print them; count them |
4 |
Jan 29,
30 |
Functions. Parameter
passing and returning values |
Zelle Chapter 6 (Chapter 3 Downey) |
HW4 (2/3): Extract poll
data from file; generate .csv files; generate pie
graphs in Excel |
5 |
Feb 5, 6 |
Iteration; the map
operator; nested iteration |
Zelle Chapter 8 (Downey chapters 6 and 7) |
HW5 (2/10): Most frequent
contributors; shortest average message length |
6 |
Feb 12,
13 |
URL lib; Try/except HTML |
Zelle 7.4 |
HW6 (2/20): Fetching the
live feed; generating a tag cloud |
7 |
Feb 19,
20 |
Google App Engine |
TBD |
|
WINTER BREAK |
|
|
||
8 |
Mar 5, 6 |
Recap week. Midterm Exam (approx. 30 mins. written and 1.5 hour practical) |
Review. We will try out exercises from Downey (Chapters 1-10) and Zelle
(Chapters 1-8) to assess our understanding |
Exam in class 3/6 |
9 |
Mar 12,
13 |
More on making a dynamic
web site; |
HW7 (3/17): Create a twitter
feed processor that displays as a web page |
|
10 |
Mar 19,
20 |
HTML forms; Reading API
Documentation; Useful resources for
projects; |
Optional readings: W3Schools tutorial on HTML
forms; Chuck
Severance’s chapter on processing HTML forms in python with AppEngine (pages 7-20) |
3/24: Project proposal
due; resource writeup due |
11 |
Mar 26,
27 |
Objects |
Zelle chapter 10 (Downey chapters 15-18) |
HW8 (3/31): display
author tweet clouds using Objects |
12 |
Apr 2, 3 |
BeautifulSoup; regular expressions |
Regular
expressions tutorial from “Dive into Python”, sections 1, 2, 3, and 7 |
HW9 (up to 5 bonus
points) (due 4/7): single tag cloud for all authors; let user specify a
search term; omit stopwords |
13 |
Apr 9,
10 |
Datastore;
Javascript |
|
|
14 |
Apr 16,
17 |
Project presentations
(3-5 minutes); course review |
Final projects due 4/17 |
|
Final
Exam April 28 |
April 28, 4-6PM(written
and practical) – Final exam period |
|
|