Computer Science 109:
Computers in Our World

Fall 2004

Princeton University

Brian Kernighan

Computer Science Dept.


Wed Jan 26 13:36:18 EST 2005

Answers to final exam

Lecture notes:    9/13    9/15    9/20-27    9/29-10/4    10/4-6    10/11    10/13    10/18    10/20    11/1-3    11/8    11/10-15    11/17    11/22-24    11/29    12/1    12/6    12/8   

Problem sets:    1     2     3     4     5     6     7     8    

Labs:    1     2     3     4     5     6     7     8    

Old stuff:    Playlist     summary of what we covered     practice problems     answers     last year's final exam     last year's answers     Rip, Mix, Burn, Sue     anti-spyware test     what Grokster gives you     hoax picture     Novell suit     midterm answers     Dyson lecture     what computers can do     Lab 4 pages     2003 midterm     2003 midterm answers     Javascript examples     ASCII code chart     home pages from lab 2     Javascript binary converter     VB binary converter     VB colormap program     digital watches     survey results     phishing quiz    

Problem sets, labs and announcements will be posted only on the web page.
You are responsible for monitoring the web page frequently.


Course summary, schedule and syllabus    What was covered in 2003
      Comparison of COS 109, 111 and 126
Administrivia:    Labs   Problem Sets   Exams   Lateness Policy   Collaboration Policy   Textbook
Bibliography


Course Summary

Computers, computing, and many things enabled by them are all around us. Some of this is highly visible, like personal computers and the Internet; much is invisible, like the microprocessors in cars and appliances, or the programs that fly our planes and keep our telephones and power systems and medical equipment working, or the myriad systems that quietly collect and share personal data about us.

Even though most people will not be directly involved with creating such systems, everyone is strongly affected by them. COS109 is intended to provide a broad, if rather high level, understanding of how computer hardware, software, networks, and systems operate. Topics will be motivated by current issues and events, and will include discussion of how computers work; what programming is and why it is hard; how the Internet and the Web operate; security, privacy, and property rights. We will also touch on fundamental ideas from computer science, and some of the inherent limitations of computers.

This course is meant for humanities and social sciences students who want to understand how computing works and how it affects the world they live in. No prior experience with computers is assumed. There are no prerequisites.

The laboratory is complementary to the classroom work, and is based on the Internet and the web. Students will construct their own home pages in the first few weeks. They will then add to them throughout the semester, while exploring a spectrum of practical applications, including graphics and digital sound. Two of the labs are a gentle introduction to programming in Javascript.

The course will have fundamentally the same structure as in previous years, but lectures, case studies and examples will change according to what's happening. For example, Napster has died and been reborn, but file-sharing is still a hot topic. The Microsoft case is long over, but open-source software is much in the news. Privacy and security are of increasing importance. And electronic voting promises to be a major issue.

Schedule

	 S  M Tu  W Th  F  S
Sep	 5  6  7  8  9 10 11
	12 13 14 15 16 17 18	first class
	19 20 21 22 23 24 25	problem set 1 due; lab 1 due
	26 27 28 29 30		problem set 2 due; lab 2 due
Oct	                1  2
	 3  4  5  6  7  8  9	problem set 3 due; lab 3 due
	10 11 12 13 14 15 16	problem set 4 due; lab 4 due
	17 18 19 20 21 22 23	takehome midterm due (no lab or problem set)
	24 25 26 27 28 29 30	fall break
	31
Nov	    1  2  3  4  5  6	problem set 5 due; lab 5 due
	 7  8  9 10 11 12 13	problem set 6 due; lab 6 due
	14 15 16 17 18 19 20	problem set 7 due; lab 7 due
	21 22 23 24 25 26 27	Thanksgiving (starts Thu, not Wed)
	28 29 30
Dec	          1  2  3  4	problem set 8 due; lab 8 due
	 5  6  7  8  9 10 11	last class
	12 13 14 15 16 17 18	winter break
	19 20 21 22 23 24 25
	26 27 28 29 30 31
Jan                        1
	 2  3  4  5  6  7  8
	 9 10 11 12 13 14 15	Q/A session
	16 17 18 19 20 21 22	final exam 1:30 PM Frist 302
	23 24 25 26 27 28 29

Syllabus

This will change somewhat over the semester, so check it out from time to time.

Sep 13, 15:    Introduction. What's in a computer

  • Reading: something old, something new.
    A famous 1945 article by Vannevar Bush,
    As we may think, is often cited as predicting the Internet and the web. Think about how Bush's "Memex" relates to Google and your PC.
    Much more recently (August 19, 2004), Metro-Goldwyn-Mayer v. Grokster is an interesting, relevant, and very clearly written legal decision involving old issues in a modern setting. Skim it to get the essence of the technical description and the legal reasoning; the former is what we talk about in this class, and the latter is why it matters.
  • Problem set 1, due Sep 22

    Sep 20, 22:    How machines work. How machines are made.

  • Reading: Preliminary discussion of the logical design of an electronic computing instrument Original article by Burks, Goldstine and von Neumann. The first page is a remarkably clear description of how computers are organized, though in archaic terminology. No need to read much beyond that.
    Intel web pages on How microprocessors work, how chips are made, and Moore's Law.
  • Lab 1: Windows, Netscape, SSH, mail, file transfer, a first web page
  • Problem set 2, due Sep 29

    Sep 27, 29:    Bits, bytes, and representation of information.

  • Reading: Whatis has some very short articles on bits, bytes, and binary; How Stuff Works has a useful longer article, but their site is littered with ads.
  • Lab 2: HTML and web page design
  • Problem set 3, due Oct 6

    Oct 4, 6:    Software and algorithms

  • Reading: Suggested readings on algorithms
  • Lab 3: Advanced HTML
  • Problem set 4, due Oct 13

    Oct 11, 13:    Languages, programming; Javascript

  • Reading: an essay about operating systems, the first quarter of which is fun, though it's now getting a bit dusty.
  • Lab 4: Graphics
  • Problem set 5, due Nov 3

    Oct 18, 20:    Javascript. Operating systems

  • Reading: Professor Michael Mahoney's 1998 Freshman seminar on The World of the Computer points to a good collection of interesting reading, including an oral history of Unix.
  • Neal Stephenson's essay on operating systems has been updated: The Command Line in 2004. It's still entertaining, and has fewer dusty bits.
  • Take-home midterm, due Oct 22 at 5 PM. To be handed out in class on Oct 18.   
  • No lab, no problem set due this week.

    [fall break]

    Nov 1, 3:    File systems, information storage. Applications.

  • Reading: some Javascript tutorials, out of many: one, two. three. These articles describe some of the realities of software development: Patriot missile defense system failure, a GAO report; A Bug and a Crash, by James Gleick (who has written numerous other fine technical articles).
  • Lab 5: Introduction to Javascript / Programming fundamentals
  • Problem set 6, due Nov 10

    Nov 8, 10:    Networks & communications, Internet

  • Reading: Skim some of the Internet history papers
  • Lab 6: More Javascript / user interfaces
  • Problem set 7, due Nov 17:   

    Nov 15, 17:    World Wide Web;

  • Reading: browse around in some ancient Web history
  • Lab 7: Spreadsheets
  • Problem set 8, due Dec 1

    Nov 22, 24:    Cookies and viruses; security and privacy

  • No problem set or lab this week, but there is class on Nov 24.
  • Reading: what do they know about you? -- general information on privacy; the Electronic Privacy Information Center is also informative.

    Nov 29, Dec 1:    Cryptography. Intellectual Property; Compression & error detection.

  • Reading: FAQ on cryptography. The Heavenly Jukebox, by Charles Mann, an excellent article from the middle of the Napster era, circa 2000. Music everywhere, a good article about digital audio from IEEE Spectrum.
  • Lab 8: Sound

    Dec 6, 8:    Intellectual property. Case studies. Wrapup

  • Reading: The Chilling Effects Clearinghouse is an excellent, authoritative site dealing with the legal issues around free speech, intellectual property, and online activities. The Electronic Frontier Foundation and Greplaw also have good coverage of these issues. Finally, Your Rights Online at Slashdot points to numerous stories about online rights.
  • No more labs or problem sets!

    [winter break]

    Jan 10:    Q/A session at regular class time.

    Jan 19:    Final exam 1:30 pm, Frist Campus Center 302   

  • Registrar's Official Exam Schedule page


    Administrative Information

    Lectures: Monday and Wednesday 11:00-12:20, Friend Center  006.

    Professor: Brian Kernighan, 311 CS Building, 609-258-2089, bwk@cs.princeton.edu. Office hours Monday and Tuesday 2:30-4:00, or by appointment, or just drop in if my door is open, which it usually is.

    Teaching Assistants:
        Michael Burns, 103B CS, 258-0944, mburns@cs, Tue 1:30-2:30
        Elad Hazan, 413 CS, 258-1797, ehazan@cs, Wed 4-5
        KyoungSoo Park, 316 CS, 258-5386, kyoungso@cs, Fri 1:30-2:30

    Send mail to cos109@princeton.edu with any questions any time.

    Labs:

    There will be eight labs to give hands-on practice in important aspects of computing. The labs are designed to be easily completed within three hours, if you have read through the instructions beforehand, which should take at most an hour. Assistants will be available to help out during scheduled lab sections. Labs are held in the Friend Center; many can be done in dorm rooms or campus clusters, but there will be lab assistants to help out in Friend, and no help elsewhere.

    Labs are together worth about 20 percent of the course grade. To receive credit, students must complete labs by 5:00 PM Friday of the week they are assigned, unless there are extraordinary circumstances.

    Labs start the week of Monday, September 20. There will be no labs in the week before Fall recess or in the last week of classes. Lab sessions are Monday and Tuesday at 1:30 and Monday through Wednesday at 7:30 in Friend 005.

    Problem sets:

    Eight weekly problem sets, together worth about 20 percent of the course grade, will be assigned. Problems are intended to be straightforward, reinforcing material covered in class and providing practice in quantitative reasoning, and should take 1-2 hours to complete.

    Problem set solutions will be due by 5:00 PM Wednesday, one week after they are assigned. Turn in solutions in the box outside room 311 on the third floor of the CS building, or at the beginning of class. There will be no problem set due in the week before Fall recess (midterm instead) or the last week of the term. No credit can be given for late submissions unless there are extraordinary circumstances, and in no case after solutions have been discussed in class.

    Lateness Policy

    For both labs and problem sets, extracurricular activities and heavy workloads in other classes don't count as "extraordinary", no matter how unexpected or important or time-consuming. Nevertheless, everyone gets truly behind from time to time. In recognition of this, you are allowed two late submissions (no more than 4 days late in each case). Please let us know that you will be submitting late so we can keep track of things more easily.

    Students must complete all labs and assignments to pass the course.

    Collaboration Policy

    You are encouraged to collaborate on problem sets, but must turn in separate solutions; the names of your collaborators must appear on each submission.

    (This elaboration of the policy on collaboration is paraphrased from COS 126:) You must reach your own understanding of the problem and discover a path to its solution. During this time, discussions with friends are encouraged. However, when the time comes to write down the solution to the problem, such discussions are no longer appropriate -- the solution must be your own work, so you must work on the written assignment on your own. If you have a question, you can certainly ask friends or teaching assistants, but do not, under any circumstances, copy another person's work or present it as your own. This is a violation of academic regulations.

    Examinations

    There may well be short, unannounced, in-class quizzes to verify your existence and test your understanding. These will be worth 5-10 percent of the course grade. Regular class attendance is expected; frequent absences are grounds for a failing grade regardless of other performance.

    A take-home, open-book midterm examination will be given during the week before fall break. It will cover material presented and discussed in class and any relevant reading through Monday, October 18. It will be worth 20 percent of the course grade.

    An open-book final examination will be given during the fall-term exam period. It will cover all of the relevant readings and material presented and discussed in class. It will be worth 35-40 percent of the course grade.

    Sorry: no collaboration on take-home exams or the final.

    Textbook

    There is no assigned text for this course; I have never found anything that seems right. Fluency with Information Technology by Larry Snyder (Addison-Wesley, 2004) is the closest so far, but it's amazingly expensive. Notes will be posted online, and occasional readings will be handed out in class or found on the Web.

    I have half a dozen books that purport to cover the same area as the course. None feels right to me, but among them there is coverage of many class topics, so you might find it helpful to browse in them a bit. Available for loan; drop in to take a look.

    Meanwhile, check out the bibliography for other suggestions.