Agree Due date (11 October) corrected---lesson learned from error 

Forum: U Chicago, Com Sci 221 old messages, autumn 2000
Re: News Assignment #2, due 11 October (Mike O'Donnell)
Re: Warning Untitled (Jake Bartolone)
Date: 2000, Oct 08
From: <Anonymous>

Oops! Thanks for sending the correction. This illustrates the importance of the single data entry principle, which I violated very badly in my Web pages. I entered the due date at least 3 different times, and I got one of them wrong.

I am in the process of converting my Web pages so that they are generated by PHP, a language that is particularly nice for generating HTML. Although a lot of people use PHP to make their Web pages more dynamic, I want it just to improve the structure of information in my static HTML. My pages with white background, and an elegant white header with the text ``Computer Science The University of Chicago'' are generated from PHP code. Other pages, with no background color set, and with a maroonish header ``The University of Chicago Department of Computer Science,'' are plain HTML. I haven't converted course pages yet.

Very soon, I will work out a way to let everybody view my PHP code through Web browsers. If you use the ``Page Source'' button on the ``View'' window in Netscape, or the corresponding trick in another browser, you'll see the HTML generated by the PHP code. Since the HTTP server invokes the PHP interpreter on all PHP code, there's no direct way to get at the PHP source just by exercising your browser. When I've solved the problem, I'll post an invitation to view the source.

In the future, when my course pages are generated by PHP, I will enter something like $ASSIGNMENT_DUE_DATE[2] instead of the date itself, and I will present the actual date precisely once, in a global setting of the $ASSIGNMENT_DUE_DATE[2] array entry. Of course, this will not save me from accidentally referring to $ASSIGNMENT_DUE_DATE[1] where I intend assignment #2. But it will make such errors a bit more obvious and less likely.

The next improvement will be to incorporate assignments in a relational database, probably using MySQL. Then I will provide PHP code (I haven't looked up the form yet) to read database values directly into the HTML for my Web pages. This won't improve the structure of the PHP code that refers to values, such as due dates. But it will improve the structure in which those values are entered and stored quite a bit, and make it much easier to insert interesting combinations of data derived by corellating different entries in the database.

The final improvement (that is, the best one that I can think of now) will be to identify common operations, such as posting a new assignment, and implement them with scripts (possibly in PHP, possibly in some other language that proves more convenient) that produce, e.g., the database entries, the HyperNews posting, the note at the head of the course entry page, the schedule entry on the Homework contents page, and the page describing the assignment in a co-ordinated fashion. At this point I will eliminate all errors of inconsistent numbering and dating. I will still be exposed to entering the date wrong in its unique location, to posting an assignment to the wrong course, to posting a research paper as an assignment instead of sending it to a journal, ... As long as we enter data, we will make errors, but we can reduce the opportunity for error a lot.

So, it's great to learn from your own mistakes, but here's a chance to do even better, and learn from my mistake. It may sound ho-hum at first, but if you ponder my Web-page problem a bit, you can learn a lot about the structure of all informational documents, including programs.



Mike O'D.


Messages

1. None Still a small problem by Sam TH, 2000, Oct 08
1. Sad Fixed that one, too by Mike O'Donnell, 2000, Oct 08
2. More PHP source for Web pages is available to view by Mike O'Donnell, 2000, Oct 10

to: "Due date (11 October) corrected---lesson learned from error"