April 15, 2004

Bulk view


I can’t quite get EClass to work. It looks rather promising, though.
Do you know of anything similar? I’d like to be able to write and
publish my courseware with a neat interface for browsers – collapsible
tables of contents, that sort of thing.

Guiding students through programming puzzles: value and examples of Java game assignments


The paper describes three puzzles. Students are expected to code
programs that try to find solutions to these puzzles. Hmmm… I think
that’s a bit too advanced for CS21, but I should be able to structure
some exercises like higher/lower, rock-paper-scissors and tic-tac-toe
for simple AI.

Fancy striped tables

Ephrem wrote:

Here’s a bit of magic to make fancy striped tables. The javascript is from
http://alistapart.com/articles/zebratables/. 4 steps. One caveat, if you have
multiple tables on a page (not including headers and footers) this
could result in multiple instances of id=”tabular”. If anyone knows how to adapt the
javascript to identify class instead of id, that would be an improvement.

  1. Edit emacs-wiki-publishing-header and add this javascript somewhere within
    the head tag:

  2. Edit emacs-wiki-publishing-header so that the body tag has an onload attribute as follows:
  3. Edit emacs-wiki-table-attributes so that it includes id=”tabular”:
        (setq emacs-wiki-table-attributes "id=\"tabular\" border=\"0\"
    cellpadding=\"2\" cellspacing=0")
  4. Add something like the following to your stylesheet:
        // Only tables with the "tabular" id, thereby avoiding header
        // and footer tables.
        table#tabular {
            border: 3px solid #555;
        // Apply border to all td elements which are not in the first row.
        table#tabular tr + tr>td {
            border-top: 1px solid #aaa;
        table#tabular td {
            padding: .5ex .5em;
        // Apply left border to all columns except the first.
        table#tabular td + td {
            border-left: 1px dotted #aaa;

E-Mail from [email protected]

Reflections from 2nd sem 2003-2004

CS21A: Introduction to Computing I. Experimented with BlueJ and an objects-first approach. Students liked the interactive environment and had fun with the graphical and game-based exercises. Reading exercises helped build confidence and the students inferred the use of control structures from them. The programming exercises also helped them appreciate methods. However, I need to give them more opportunities for practice and I should challenge them more.

CS21B: Introduction to Computing II. Students continued working on their projects from last semester, with a twist: they did _other_ people’s projects. Some groups had a hard time working with
old code, but it looked like a pretty good learning experience for everyone. Making reviewers for the final exam was also a fun activity. They also picked up data structures easily, and their advanced studies in threads and files last semester paid off. Downside: Networking still difficult to test.

CS161: Operating Systems. I was initially worried about teaching a traditionally book-centered course, but managed to survive a semester of Powerpoint slides and departmental tests. Weird analogies helped out. Made the CS finals more computation-based, but students lacked practice. If I ever teach
CS161 again, I’d like to emphasize that aspect over the memorization currently required.

Plans for next semester:

Heterogenity. Students come with different backgrounds and proceed at different paces. I want to take advantage of that by providing many exercises and examples for students to learn from so that they can go at their own pace.

Progress. I want to be able to monitor student progress in a spreadsheet or a website. I’d like to keep track of their self-evaluation as well as my own evaluation.

Exercises. Students responded well to the fun and creative exercises I came up with for CS21A and CS21B. I think I’ve collected enough games and puzzles to demonstrate most of the major points in CS21. Over the summer, I plan to write up these exercises in a lab manual. The exercises will vary in difficulty so that beginners can still find fun and exciting projects to work on.

Drills. I would like to spend 5-10 minutes on speed drills to accustom students to solving written problems quickly. This will help them prepare for the midterms and the final examinations. Practicing for these drills will also keep them busy just in case they have nothing else scheduled.

CSS rocks (AdphotoScheduler#1)

In a fit of filial piety, I decided to sit down and start working on a
job scheduler for my mom. After briefly considering Java and the
attendant hassles of a client-server application, I decided to go with
PHP. I wanted it to be more graphical than my students’ submissions,
though. Browsed through projects on Freshmeat but didn’t really see
anything worth changing.

Listed a few user stories and decided to spike the graphical display.
Started out with a PNG produced by libgd. That went pretty well.
Translating time to world coordinates was easy. I wanted to limit the
view by start-time and end-time, but it turned out to be too much of a

Wondered if I could pull it off in HTML and CSS. Picked up a few
tutorials on absolute positioning and managed to pull it off quite
elegantly. Like new design.


– Schedule overview of resources
– Day view of resources

Next steps:

– Resource view
– Job view
– Unfake the data

bbdb: prefix for sacha/try-expand-factoid-from-bbdb

To control expansion further, I’ve made a bbdb: prefix required. This
will allow me to still properly use dabbrev expansion.

;; Particularly fun with ERC. I am now a bot!
(defun sacha/try-expand-factoid-from-bbdb (old)
  "Try to expand from BBDB. If OLD is non-nil, cycle through other possibilites."
  (unless old
      ;; First time, so search through the BBDB records for the factoid.
      (he-init-string (he-dabbrev-beg) (point))
      (setq he-expand-list nil)
      (when (string-match "bbdb:\\(.+\\)" he-search-string)
        (setq he-search-string (match-string 1 he-search-string))
         (lambda (item)
           (setq he-expand-list (append he-expand-list (list (bbdb-record-getprop item 'blog))))
           (setq he-expand-list (append he-expand-list (list (bbdb-record-getprop item 'web))))
           (setq he-expand-list (append he-expand-list (list (car (bbdb-record-net item)))))
           (setq he-expand-list (append he-expand-list (list (bbdb-record-getprop item 'notes)))))
         (let ((notes (cons '* he-search-string)))
           (bbdb-search (bbdb-records)
                        he-search-string he-search-string he-search-string
                        notes nil)))
        (setq he-expand-list (delq nil he-expand-list)))))
  (while (and he-expand-list
              (or (not (car he-expand-list))
                  (he-string-member (car he-expand-list) he-tried-table t)))
    (setq he-expand-list (cdr he-expand-list)))
  (if (null he-expand-list)
        (if old (he-reset-string))
      (he-substitute-string (car he-expand-list) t)
      (setq he-expand-list (cdr he-expand-list))