Archived news items from October 2004
Since this is old news, some links may be broken.
newer old news from November 2004
Actually late Tuesday night....
First of all, I'd like to point out that thanks to the Web Developer Extension for Firefox, this page now validates under HTML 4.01.
This was brought on by the new GHOST image in my classroom computer lab, which was rolled out this morning. I'd forgotten I'd asked Judi to install the Web Developer Extension along with Firefox, but there it was. And of course a student immediately used it to check my classroom page, which didn't validate. In fact, the "assignments" page had close to 80 errors!
Well, mostly it was a wrong DOCTYPE and me doing the same wrong thing over and over, so it wasn't that hard to fix. And so after school I started on a bug hunt, and got all the CS pages validating (except the programming assignments page, which isn't my fault; I've got masses of HTML from my student teacher that I just don't feel like correcting all the minor errors in).
Then I started playing around with the style sheet(s) and got them redesigned and tightened up quite a bit. They're much smaller now, and though I'm not sure I'm completely satisfied with the look, it's easy enough to change. (Being a stylesheet and all.)
For the rest of the past two weeks, I've basically been working exclusively on my "100 Facts" quizzer. Let me tell you about it.
About five years ago during Leander I.S.D.'s February "Continuous Improvement" conference, I attended a session by a local teacher on so-called "100 Facts" and was intrigued. The next year, I attended the same session by the originator of the technique, Jeff Burgard and got excited. Here was a system that held students accountable for certain things in the classroom which it's not okay not to learn. And further, it's not okay to forget them once learned.
I really liked the idea, but was unsure how to apply it to a computer science classroom. Another year or two passed, and I attended a few more similar sessions, and still had no clear plan for implementation.
Then, it occurred to me the crucial difference. Where his system was optimized for teaching and drilling fundamental facts in a particular subject, my course is more about fundamental skills. It's about what you can do rather than what you know.
So I realized what I needed was some system whereby I could drill students with randomized fundamental tasks, and have the computer figure out whether or not they'd done them correctly. (It should be noted that this is a key component of all my new innovations in my classroom; they must be self-grading whenever possible.) However, I couldn't see quite how to go about creating such a system.
I wanted to be able to generate task-based questions from a question template of some sort, but yet still know what the correct answer should be. I also needed to be able to compare a student's "response" code with the correct code, without getting confused by acceptable differences in coding style or spacing.
For about two years, this stumped me. But then during the last few weeks of this summer, I had a brainstorm. I was able to write a simple scripting language and associated parser in Perl, and in surprisingly little code. This would allow me to, in effect, "code" a question programmatically, and also programmatically generate the correct response.
After this, I hacked up a sample database of certain types of questions I knew I'd want to be able to ask, and then starting working on a quizzer that would be able to parse that database, and serve up randomly-generated questions (and their answers) from it.
This part also needed the bits I use to compare two sections of code (the student's and the "correct" answer) to see if they're the same. (Which accounts for about half the code of that part and more than half of the coding time.)
Then, all I needed was a web page that would request certain questions from the database, solicit responses from the student, and show if they are right or wrong. This needed a generalized HTTP session management module, and some "fascist logging" code to make sure students aren't trying to cheat on the quizzes somehow.
Overall, I'd say I spent 50-60 hours on it, three solid days of which happened back in the last week of July and the rest of which happened between my last update and this past Sunday night.
So now I've got several discrete things I've created. The question database is a combination of HTML for questions and descriptions, Java for answers, custom HTMLish tags to give it structure, and sections of my custom scripting language to flesh out the templates. Everything else is in Perl.
Scripter.pm, which was the "breakthrough" part.
It allows me to embed a simple scripting language into arbitrary text
and parse it easily with just a couple of commands. 373 lines.
Quizzer.pm, which reads a question database
and serves out individual questions and answers any way you
like. There's also a large bit devoted to figuring out if two
pieces of Java code are "equivalent". 595 lines.
Session.pm, which handles HTTP session management
as transparently as I know how. By adding two lines of code at
the top of another CGI script, this module will authenticate them,
set a cookie, and then provide details about the now logged-in
user if the CGI script wants them. Very smooth to use, so far.
RandCount.pm, which was a last-minute hack
(that didn't turn out so badly after all). I'd been refactoring
some code in
Quizzer.pm to support better random
questions when I suddenly broke something and lost the ability
to get repeatable random numbers. (Which is fine unless I wanted
to ever grade the questions, which I did.) This little
module just wraps around Perl's library
rand to keep
track of how many times it's called, and can report and/or reset
that number at any time. Only 139 lines, but had me stumped for more
than a day before I finally figured out what I was going to do.
skills_quiz.pl, the "user interface" CGI script.
Can generate and grade random quizzes, tests, and worksheets
from the question database. Shows the kids what they got wrong
and why. Also allows the kids to do any of the above "for a
grade", which saves their results to the server and incorporates
session management and fascist logging to prevent and/or detect any
cheating or related shenanigans. Currently 518 lines, but will be
100 lines shorter when I get around to combining three large sections
of almost-identical code into one well-designed section. And...
java1.qdb, the question database. Currently
contains templates for 8 skills from the first-year course,
with anywhere from just one to four variants of each skill, and
some descriptive text about each skill. Currently at 482 lines.
Quizzer.pm can parcel it out into individual questions,
Scripter.pm fills in the blanks in the template.
Overall that's just under 2500 lines of code total. And now you know why I haven't updated my web page in that time.
In non-coding news, I dusted off my bike over the weekend and biked to school (and back) twice. That's a ten mile round-trip. And that was nice. I also saw the Theatre Department put on Big Love, "Charles Mee's outrageously hip comedy." It's abstract theatre, and was worth the watch, although it's no Shakespeare. Maybe not even Aeschylus, though I might have understood it better if I'd seen/read his first.
And I've told some folks that I'm really nonplussed by the P.A.T.R.I.O.T. Act and it's effect on our civil liberties. Similarly the DMCA. Well, I just read a great article by Paul Graham (no relation) which hits the nail on the head. Here's a relevant excerpt:
To hackers the recent contraction in civil liberties seems especially ominous. That must also mystify outsiders. Why should we care especially about civil liberties? Why programmers, more than dentists or salesmen or landscapers? ...
The government spying on people doesn't literally make programmers write worse code. It just leads eventually to a world in which bad ideas will win. And because this is so important to hackers, they're especially sensitive to it. They can sense totalitarianism approaching from a distance, as animals can sense an approaching thunderstorm.
Check out the rest of the article here:
Anyway, I've got a surprise TAKS administration in the morning, so I'd better get home. And try not the think about all the grading I haven't done the past two weeks....
Some fun programming things lately. First is the automatic seating-chart generator. Basically all I have to tell it is which period I want and how to order the names (alphabetically by last name? alpha by first name? in order by student id number? in random order?), and it'll automatically create a new seating chart for me, and even draw a picture of it which I can print from my web browser. An example is here. There are 4 rows of six desks in the center of the classroom, and 24 computers in a U-shape around the outer wall. Students have both an assigned desk and an assigned computer.
So now instead of it taking me half an hour to hand-write one copy of a seating chart for each of my classes, I can generate and print them in well under a minute. And I can also print multiple copies just as easily if it suits me. Go automation.
Next on the programming docket: this evening I finally got tired of my blacklister not working. This is the "don't play the same song twice" system I added to my classroom jukebox nearly four years ago, which had unfortunately mysteriously quit working a year later when I upgraded the server to RedHat 9. I think it had something to do with differences in mySQL.
Anyway, though it had only worked for a year and hasn't been working for over twice that long, I wanted it back, so I rewrote the relevant portions to store the blacklist in a plain text file rather than a database. There were a couple of subtle bugs, but now everything appears to be working well. And it only took roughly two and a half hours, which isn't bad to substantially modify modules of two different programs, debug them, and write and debug a third from scratch.
I also got to listen to Cake's Pressure Chief, which was just released yesterday. Since I'm a fan (I'm still bummed I didn't get to see them at ACL Fest), I picked it up at Best Buy last night after school, and was surprised to find that it was on sale for $10.
The album is pretty darned good. With Cake albums, their basic sound's been pretty consistent over the last ten years, so although each album has a slightly different feel to it, it's hard to say if they've had any really great albums in the sense that one is noticeably better than average. Conversely, they don't seem to have any "bad" albums, either. All five albums are just... Cake. And that's a good thing.
Anyway, time to get home. I've got my monthly 6am Starbucks meeting with my pastor tomorrow.
Well, I had planned on doing an "unplugged" set at church this morning, since we didn't have a drummer available. I was going to use my drum machine a little, and mostly go without.
But then one of my lead guitarists came up to me about a week ago and said, "I haven't gotten a chance to play with Carl (our other lead guitarist) yet. Let me be on this week with him." He was talking about playing drums, because even though he's no Neil Peart, he's not bad at it, either, and a heck of a lot better than no drummer at all, so he's been filling in some lately.
But I said, "No, I'd rather have no drummer this week, because if we're never missing a drummer, they'll never know we're looking for one. How about you both play acoustic guitar instead. I'm going for an unplugged thing anyway." He agreed.
As I got to thinking about it, though, with two acoustic guitars already on stage, there'd be no need for a third acoustic guitar. So I thought I'd see if I could borrow a djembe or some congas from someone, and try my hand at playing those myself.
By Thursday night, I hadn't found any, and so I practiced with the band just hitting a snare drum with the snares off. It made sort-of a tom sound, but was pretty unsatisfying.
So by Friday night, faced with needed to drum up something before Sunday, I drove down to Guitar Center, where I picked up a djembe of my own (the "earth" 16-incher, by the way), along with a hat trick, and another egg shaker, since mine keep wandering away.
So using the hat trick on a high-hat stand by itself, the shaker and my new djembe mounted in a broken stool turned upside-down, I was able to bang out a pretty decent percussion accompaniment for my band and still sing well enough for folks to follow. Practice was marginal, but the first service went well enough, and by the second service things were actually starting to sound pretty good.
So now I own a djembe, which has been on my wish list for years. I probably can't play it in my apartment without bothering the neighbors, but it'll be cool to be able to pull it out once in a while.
For those who might have been wondering, today is my quarter birthday; I am officially thirty and one-quarter at 9ish this evening.
To celebrate, my friend Mackenzie finally got around to giving me my birthday present, which she'd been promising since sometime in July. It turns out to have been the first season of the Simpson's on DVD, and some custom stamps from PhotoStamps and Stamps.com! Nice!
And while I'm talking about Mackenzie, I should finally get around to posting the cartoon that she had drawn about a year-and-a-half ago, inspired by an update about my bowling handle on one of my first dates with then-girlfriend Robin. I finally scanned the cartoon in this morning:
Recently reminded of this cartoon, and further inspired by a section on my school website where students have photoshopped digital photos of me, she hacked together another photo on the same theme.
In other news, I've been catching up on sleep and general relaxation time the past couple of days. I finally got back out Pattern Recognition, a novel I'd been given back at Christmas, I think, and started reading during the end of the summer. However, once school started it got thrown on the back burner and I hadn't touched it. So Wednesday night I got it out again, backed up four chapters, and then read for probably close to three hours. I finished it up last night, and it was very good, as is everything I've read by William Gibson.
So I got out another novel which has long been on the waiting list, Stephen King's Wolves of the Calla, and read the first 30 pages or so. Go reading.
Well, class is going to start here in a few minutes, so I should get ready.
archive index (for dates back to March 1998)