NEW: For a prettier blog interface, see the Wordpress version!

Tasks
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
A1XSend their work so far {{Tasks:269}} (Teaching.Perl)
A2XCreate user accounts {{Tasks:268}} (Teaching.Perl)
A3XPrepare exercises for language basics {{Tasks:267}} (Teaching.Perl)
A4XMake fake data {{Tasks:263}} (Teaching.Perl)
A5XPut up project description on CS161 page {{Tasks:262}}
A6XPrepare rough outline of course notes {{Tasks:260}} (Teaching.Perl)
Schedule
Notes

7. Revised sacha/perl-training/suck-data-in : 22:56

(defun sacha/perl-training/suck-data-in ()
  "Insert BBDB records for all the Perl trainees."
  (interactive)
  (goto-char (point-min))
  (while (re-search-forward "^\\([[:digit:]]+\\)" nil t)
    (let ((data (split-string (buffer-substring-no-properties (line-beginning-position) (line-end-position)) "|"))
          record)
      (setq record
            (bbdb-create-internal (elt data 1) ; Name
                                  "PLDT" ; Company
                                  (elt data 2) ; E-mail
                                  nil
                                  nil
                                  (concat "Perl training 2003.12.17 - 2003.12.19; " (elt data 3))))
      (bbdb-record-set-aka record (list (concat "pldt" (elt data 0))))
      (bbdb-change-record record nil))))

6. Elisp code to insert all : 22:38

Data is of the form
number|Name|e-mail|Expectations
(defun sacha/perl-training/suck-data-in ()
  "Insert BBDB records for all the Perl trainees."
  (interactive)
  (goto-char (point-min))
  (while (re-search-forward "^\\([[:digit:]]+\\)" nil t)
    (let ((data (split-string (buffer-substring-no-properties (line-beginning-position) (line-end-position)) "|"))
          record)
      (bbdb-record-set-aka
            (bbdb-create-internal (elt data 1) ; Name
                                  "PLDT" ; Company
                                  (elt data 2) ; E-mail
                                  nil
                                  nil
                                  (concat "Perl training 2003.12.17 - 2003.12.19; " (elt data 3)))
            (list (concat "pldt" (elt data 0)))))))

5. Extracting the trainees' files and packaging them : 22:13

Shell scripting to the rescue!
# Zip their work up
for DIR in *; do ( cd $DIR; zip perl-day1.zip * ); done

# Realize that I have to get rid of the archives temporarily because
# I might want to insert all the files into a buffer, so back it up first
tar zcvf archive.tar.gz $(find -name \*.zip)

# Remove all the zip files
find -name \*.zip -exec rm {} \;

4. Extracting all the mail addresses from the programs : 22:12

grep -ri 'mail' * -A 10 -B 10 | less

This displays enough context information around the data so that I can grab it easily.

3. Project ideas : 08:48

Categories: Teaching.Perl#5 -- Permalink
Rating system - they've got this already

2. Perl focus : 08:46

Categories: Teaching.Perl#4 -- Permalink
- Reading source code, testing, adapting software to their own needs - 4 programmers

1. Stuff at [[../learn/perl/training/day1]] so far : 00:05

Categories: None -- Permalink
Oh no, it's 12:05 and I haven't even started on Real Text Processing...

Teaching.Perl

Previous day | Next day

I'd love to hear about any questions, comments, suggestions or links that you might have. Your comments will not be posted on this website immediately, but will be e-mailed to me first. You can use this form to get in touch with me, or e-mail me at [email protected] .

Page: 2003.12.17
Updated: 2004-11-2106:44:1406:44:14-0500
NOTE: ANTI-SPAM MEASURE NOW IN PLACE. Please answer the following question with the right number in order to send me your comment.
What is two minus one? (hint: one ;) )
Name:
E-mail:
URL:
Comments: