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
A1XCheck out Guiding students through programming puzzles: value and examples of Java game assignments {{Tasks:74}} (TeachingIdeas) (TeachingIdeas)
A2XReview Levitin, A. and Papalaskari, M.-A., "Using Puzzles in Teaching Algorithms," Technical Symposium on Computer Science Education, Covington, Kentucky 2002 {{Tasks:27}} (TeachingIdeas)
B1XReply from E-Mail from Joe Corneli {{Tasks:803}} (PlannerModeCompletedTasks)
BXReflect on the past semester {{Tasks:867}}
B3XFind a quotation for a bar code scanner {{Tasks:875}} (Adphoto)
BXWrite an appeal for Mark Tecson from E-Mail from maRk teCson {{Tasks:873}}
B5XFeature: Make a new variable that controls adding tasks at end instead of beginning from E-Mail from Paul Lussier {{Tasks:865}} (2004.04.21)
A3CFind Terry, R. E. and Harb, J. N., "Using Learning Style Theory to Improve Learning and Teaching in the Engineering Classroom," Frontiers in Education 1993 (TeachingIdeas)
A4CReview Herr, N., "The Sourcebook for Teaching Science: Strategies, Activities, and Internet Resources," California State University, Northridge, Available at http://www.csun.edu/~vceed002/ (TeachingIdeas)
A5CCheck out Vexed puzzle solver: developing a program incrementally {{Tasks:73}} (TeachingIdeas)
B6CTesting from E-Mail from John Sullivan {{Tasks:861}} (2004.04.21)

~/.diary schedule


9. EClass

Categories: None -- Permalink
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.

8. Using puzzles in teaching algorithms

Categories: None -- Permalink

These ideas are perfect for CS110! I can't wait to discuss the general algorithm strategies in terms of real-life puzzles.

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

Categories: None -- Permalink

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.

6. Fancy striped tables

Categories: EmacsWikiMode#5 -- Permalink
Ephrem wrote: <blockquote> 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. <ol> <li> Edit emacs-wiki-publishing-header and add this javascript somewhere within the head tag:
<script type=\"text/javascript\">
      // this function is need to work around
      // a bug in IE related to element attributes
      function hasClass(obj) {
         var result = false;
         if (obj.getAttributeNode(\"class\") != null) {
             result = obj.getAttributeNode(\"class\").value;
         return result;

     function stripe(id) {
        // the flag we'll use to keep track of
        // whether the current row is odd or even
        var even = false;

        // if arguments are provided to specify the colours
        // of the even & odd rows, then use the them;
        // otherwise use the following defaults:
        var evenColor = arguments[1] ? arguments[1] : \"#fff\";
        var oddColor = arguments[2] ? arguments[2] : \"#eee\";

        // obtain a reference to the desired table
        // if no such table exists, abort
        var table = document.getElementById(id);
        if (! table) { return; }

        // by definition, tables can have more than one tbody
        // element, so we'll have to get the list of child
        // &lt;tbody&gt;s
        var tbodies = table.getElementsByTagName(\"tbody\");

        // and iterate through them...
        for (var h = 0; h < tbodies.length; h++) {

         // find all the &lt;tr&gt; elements...
          var trs = tbodies[h].getElementsByTagName(\"tr\");

          // ... and iterate through them
          for (var i = 0; i < trs.length; i++) {

    	    // avoid rows that have a class attribute
            // or backgroundColor style
    	    if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {

             // get all the cells in this row...
              var tds = trs[i].getElementsByTagName(\"td\");

              // and iterate through them...
              for (var j = 0; j < tds.length; j++) {

                var mytd = tds[j];

                // avoid cells that have a class attribute
                // or backgroundColor style
    	        if (! hasClass(mytd) && ! mytd.style.backgroundColor) {

    		      mytd.style.backgroundColor = even ? evenColor : oddColor;

            // flip from odd to even, or vice-versa
            even =  ! even;
    // -->
<li> Edit emacs-wiki-publishing-header so that the body tag has an onload attribute as follows:
    <body onload=\"stripe('tabular', '#fff', '#edf3fe');\">
<li> Edit emacs-wiki-table-attributes so that it includes id="tabular":
    (setq emacs-wiki-table-attributes "id=\"tabular\" border=\"0\"
cellpadding=\"2\" cellspacing=0")
<li> 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 ephrem@tuirgin.com

5. Reflections from 2nd sem 2003-2004

- <b>CS21A: Introduction to Computing I.</b> Experimented with

<nop>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.

- <b>CS21B: Introduction to Computing II.</b> 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.

- <b>CS161: Operating Systems.</b> 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:

- <b>Heterogenity.</b> 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.

- <b>Progress.</b> 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.

- <b>Exercises.</b> 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.

- <b>Drills.</b> 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.

4. Kathy Chua's photo galleries

Categories: None -- Permalink

Drop by my sister's photo album and leave her a note! =)

3. CSS rocks (AdphotoScheduler#1)

Categories: None -- Permalink
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 hassle.

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

2. Ignoring orkut addresses in BBDB (EmacsHacks#21)

Categories: None -- Permalink
(defun sacha/bbdb-canonicalize-net-hook (addr)
  "Do not notice member@orkut.com addresses."
  (cond ((null addr) addr)
        ((string-match "member@orkut\\.com" addr) nil)
        (t addr)))
(setq bbdb-canonicalize-net-hook 'sacha/bbdb-canonicalize-net-hook)


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

Categories: EmacsHacks#20 -- Permalink
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))