Priorities - A: high, B: medium, C: low; Status - _: unfinished, X: finished, C: cancelled, P: pending, o: in progress, >: delegated. Covey quadrants - Q1 & Q3: urgent, Q1 & Q2: important
A1XReview the minutes (E-Mail from Maria Assunta C. Cuyegkeng)
A2XSend the Synchronicity people the things they're looking for (E-Mail from Sacha Chua <[email protected]>)
A3XMake Game Na Ba Yan project (../../News/drafts/drafts/212)
A4XMake BuyAndSellApplet - JApplet version (../../News/drafts/drafts/212)
A5XStripslashes (/su:[email protected]:/usr/local/eval/current/cs21a-b/evaluations/files-and-vectors/010110.xml)

1. Perl script to suck courses files : 12:50

Categories: None -- Permalink
Back when I didn't have a Download as Archive in the courses system, I used this script to suck all the files.
use English;

open INDEX, "curl -b PHPSESSID=$SESSIONID 'http://courses.ateneo.edu/submit/index.php?project_id=$ARGV[1]' |";

while (($s = <INDEX>) && ($s !~ /select name="login"/)) { }

my @logins;
my @lnames;
my @fnames;
my $i = 0;

while (<INDEX> =~ /option value="(\w+)"> (.+?), (.+?)</)
    $logins[$i] = $1;
    $lnames[$i] = $2;
    $fnames[$i] = $3;

while (($s = <INDEX>) && ($s !~ /smaller/))

my $login; my $timestamp;
while ($s = <INDEX>)
    if ($s =~ /<td valign=top>(\w+?)</)
	$login = $1;
	<INDEX>;   # skip name
	<INDEX>;   # skip email
	<INDEX>;   # skip first part;
	if (<INDEX> =~ /^\s*(.+?)\s*$/)
	    $timestamp = $1;
	<INDEX>;   # skip </td>
	<INDEX>;   # skip </tr>
	<INDEX>;   # skip <tr>
    elsif ($s =~ /nbsp/)
	# $s nbsp;
	<INDEX>;  # td valign = top
	<INDEX>;  # files
	while (($s = <INDEX>) && ($s =~ /index\.php\?project_id=(\d+)\&login=(\w+)\&file=(.+?)\"/))
	    mkdir $1;
	    mkdir "$1/$2";
	    system "curl -b PHPSESSID=$SESSIONID 'http://courses.ateneo.edu/submit/index.php?project_id=$1&login=$2&file=$3' -o $1/$2/$3";
    elsif ($s =~ /html/)
	close INDEX;

2. Hello world, school, teaching, games --- blast from the past : 12:57

Categories: None -- Permalink
From my 2002.06.20 entry:
12:52 AM on a schoolday that starts at 10:30 AM is probably not the best time to write an S-Files, but what the heck. I haven't been writing. Stories have backed up, and the resulting chaos in my mind appears to have edged out important details like the names of people I'm supposed to know and the details of where I'm supposed to be.

Time to defrag.

I am all the more unusually loquacious because I have just finished writing a lab exercise for the introductory computer science course for which I am a teaching assistant. My pitiful effort at making "Hello, World!" fun and exciting can be found at http://courses.ateneo.edu/cs21a/lab1.html , with no guarantee that it'll actually even be used in today's CS session. I'm banking on the fact that Dr. Sarmenta probably hasn't prepared materials as detailed as this, as I haven't seen anything like it from, well, any of my CS teachers. I'm _hoping_ that he'll let me deliver the class, which is a far-out possibility but still worth considering. I also hope I'll be awake enough to do so with wit and style.

I love the project submission system I wrote last semester. After editing the postgresql start script so that the postmaster would accept TCP connections, I simply had to set up the database and run a script that obligingly extracted and included all the students in the student data files that the department forwarded to me. All 222 students of CS21A in 9 sections have been set up. How nice.

Teaching. Hmm. I had dinner with Mario Carreon (an old friend from high school competitions) the other night. He teaches at UP and is considering moving to the industry because of the pay. We talked about teaching, mainly, and in the course of our conversation I found myself declaring that yes, this is it - I cannot imagine myself in any other profession except teaching. Especially college level introductory computer science. That's it.

Naturally teaching doesn't stand on its own - I must be teaching _something_, and teaching also offers ample time for research. Enter wearable computing. I'll be getting my gear on the 23rd, if all goes well. Expect lots of files going on and on about how cool it all is.

3. More past entries : 13:08

Categories: None -- Permalink
- 2002.06.20 - 2002.06.25 - 2003.02.02 - 2003.01.12 - 2003.01.13 - 2003.12.27

4. Code for inserting student code : 13:36

Categories: None -- Permalink
(defvar sacha/project-base-path nil "*The path to the project files, excluding the ending /")
(defun sacha/insert-student-files (id)
  (interactive "MID: ")
  (if (file-directory-p (concat sacha/project-base-path "/" id))
        (cd (concat sacha/project-base-path "/" id))
        (mapcar (lambda (item)
                  (print item)
                  (insert "--------------------------------------------------------------------\n")
                  (insert "Your code: " item "\n")
                  (insert "--------------------------------------------------------------------\n")
                  (let ((retval (cadr (insert-file-contents item))))
                    (goto-char (+ (point) retval))
                    (insert "\n")))
                (file-expand-wildcards "*")))
     (insert "***********************************************************\n"
             "You have not yet submitted any files.\n"

5. Composing messages in Gnus with elisp --- emacs : 13:41

Categories: None -- Permalink
(require 'gnus-msg)
(defun dxr-group-mail (To Subject)
  "Start composing a mail."
  (gnus-setup-message 'message
  (message-mail To Subject)))

6. "How Do We Tell Truths That Might Hurt"? : 20:40

Categories: None -- Permalink