Fifth Week: Assignments
Posted 19 Sep 2005 by herman

A reading assignment and a new homework assignment.

The reading assignment is Chapter Three of the Content Networking text, and you can find some margin notes here .

The third homework assignment builds on the previous one: you are to write a python program that fetches a web page, parse the HTML, and converts URL web site addresses to IP numbers. It's described in homework3.pdf, and uses the following files as tests and examples: showIPnums.py, htmpars.py, urlpars.py, name2ip.py, and souniq.py.


Lecture Reference, posted 21 Sep 2005 by herman
During part of my lectures on web object caching, I'll refer to squid logs (see the manual if you want more detail). Examples of squid logs can be obtained from here, but we don't need all that much depth to understand what kind of things are available.

We can also look at Apache (web server) logs to see a record of what web objects were requested. Here's a log of one day's requests on the course web server: apacheLog.txt.

* * * homework bug? * * *, posted 21 Sep 2005 by herman
My original specification of the homework created some confusion because one of the web sites, www.uiowa.edu, turns out to have two IP addresses, and the unit test only checks for one of them. To address this, I changed "www.uiowa.edu" into "www.physics.uiowa.edu" in the file pytorg.html, and also changed the unit test of showIPnums.py to have the IP number expected. Who knew that the University of Iowa's web server is so busy that load balancing is needed? (Actually, this behavior is explained in Chapter 5, Section 5.1.5.)
Sample Solution, posted 28 Sep 2005 by herman
The solution to this one may have been more difficult than the earlier homeworks, so it could be useful to look at a solution: showIPnumsSoln.py. Probably a better solution would be to use an instance attribute rather than a global variable, but either technique will do the job in this case.

Home PageHelp PageView ArticlesView Public DocumentsLogin, do stuff (record diaries)List Group MembersList of Projects