true stories from the interpreter



I just watched Stephen Colbert create a new word: wikiality. Whenever it hits youtube I'll post it on my del.icio.us.

I got a lot of work done today. Hopefully, I'll get just as much done tomorrow (in spite of having to run errands). I also added more content to the py-education wiki, but it still needs more work.



Out This Weekend

I'm leaving in about an hour to go home for my little brother's birthday party (he's seven-years-old). I'll be back in a few days.

In the mean time, check out the PyEducation Wiki I've got hosted on SourceForge. It's going to serve as the website for the py-education project.



Moving Sucks, PDF Generation Can Also, and Air Conditioners Should Blow

Moving and AC

So moving this weekend wasn't fun. It was the polar opposite of fun. But it's basically over. I still need to get a few things, like a table and wall decorations. And I still need to actually put stuff away instead of having it heaped in a pile next to my bed. I've been here for less than a week and my AC has broken twice. AC current state == Broken. So not cool, literally.

PDF Generation

So I found this nifty tool called htmldoc which can convert HTML to PDF. From what I've been told, generating HTML and then converting that to PDF is an accepted (and easy) method of generating PDF documents. I spent a few hours writing code that generated HTML (with CSS) for each question type and for the quiz overall. Viola! Dynamic HTML for quizzes. A quick call to htmldoc and... Wait, that doesn't look right. After a little searching I found out that the current version of htmldoc does not support CSS yet. Well, there goes that plan.

So I started reading reportlab documentation. Hours of tinkering and tweaking later, I have PDF generation support. I'm sure the layout needs to (and will be) tweaked as development goes along, but it works for now. I created an example quiz and generated the PDF for it.

That's my quick update for today. Now I'm off to lunch and then back to work.



One Month To Go

One Month

In a month, Summer of Code will be over and I will be back at my normal job. I'm really going to miss SoC. If I attend Graduate School I will definitely apply again.

What does the end of SoC mean for my project? Hopefully it will be included in the next Edubuntu release (The Edgy Eft). Hopefully it won't end with just Amenity and Quizzical. I already have an idea for the next program I want to build on top of the pyeducation library (a Grade Book application). Hopefully it won't just be me. SoC limits my work to just me, no help with the exception of guidance from my mentor. When SoC is over I hope that others will be interested in the pyeducation project and it will bloom into a true education suite. Only time will tell.


Progress is funny. I'm still making good progress. But if you compare the amount of progress I was making per week with Amenity to what I making now, it wouldn't look that way. The quality is about the same. I guess that's where the saying 'quality over quantity' came from. Also, Amenity is much more complex than Quizzical (development wise - in my opinion) and therefore requiring greater leaps and bounds in progress.

According to my timeline I should have the base library for Quizzical finished around August 1st. For some reason I need graphical confirmation that the library is working the way it should. So, what I've done in the past week is get most of the Quizzical Teacher Client to be functional. It wasn't very hard, considering that the interface is very similar to Amenity's (familiarity is a good thing). But I would venture a guess that the Teacher Client is about 75% complete. That includes a fully functional Quiz Editor.

I'd guess that the library itself is between 50-75% complete. I still need to write the Session class for Quizzical and any info classes it may need. I also need to write the remaining GTK displays for each question type and find a way to do PDF. I have plenty of time to finish the library (and tweak it as I finish the clients).


So my plan is to be able to create a PDF version of a quiz for printing purposes. Also, it may be useful to create PDF reports for each student, quiz, etc. I am aware of two ways to do this. The first one, that's been mentioned more than once is to create an HTML representation of the quiz and convert the HTML to PDF. That sounds easy enough, but it seems like on Linux I have to convert HTML to PS and then PS to PDF. I'm don't really like having more than one step. If I can find a way to go from HTML to PDF in one step that would be better, but I don't want to depend on some obscure tool.

The other option is to use Python's reportlab module. I've looked at the docs and it seems to be the optimal way to handle it would be to create a Document Template for a quiz and have each question generate flowables to put inside the template. It sounds easy enough, but I'll just have to play with it to see how it is.

This Weekend

I'm moving to a new apartment this weekend, so I'll be trading coding with heavy lifting for a few days. =(

I'll be back to work on Monday.


I've also been reading Chuck Palahniuk's Survivor when I get a chance. It's a very interesting book so far. I'm willing to recommend it to anyone (who isn't easily offended/shocked) based on the first 6 chapters. Of course, I've said this about all of his books (see: Fight Club, Choke, Invisible Monsters).

That's about it for today... ^D


Releases, Name Changes, User Guides, and Debs

First, I'd like to announce that new versions of all of my progress so far (pyeducation, amenity, amenity-teacher, amenity-student) have been released. For more details please see the announcements on the Pyeducation Blog or go straight to downloading at the Sourceforge Project Page.

On Friday I was confronted with a problem. The name that I chose for the quiz/exam program (Pike) is also the name of an interpreted programming language. I needed a new name! I couldn't think of anything right away, and I was mentally unable to code any more on the project until it had a new name. In the interim I started working more on the User Guide for the Amenity Teacher Client.

Saturday, we had another sprint in the URL. I dedicated the day to finishing the manual and finally figuring out how to make Debian packages. I finished the manual (this is the first manual of any type that I've ever written, so I'm sure it'll be updated and upgraded in the future).

Around noon we took a break for lunch at Subway (the meatball mozzarella sub is delish by the way). And while listening to Marc and Zap talk about Panic's software Unison, Transmit, and Desktastic, it hit me. I knew that the new name for Pike had to be good. Now, it may not be as catchy as Desktastic or Candybar, but it's good. What is this new name? Quizzical. Oh yes, I am proud of this one. I think this name is even better than the name for my Gnome Flickr Uploader (which also came to me in such a moment) - Thingr.

So after the manual was done and the name was picked, all that was left was to figure out how to make Debian Packages. I had tried to follow a few tutorials on how to make Debian packages, but something just didn't seem right. By chance I came across this blog post during a search which helped me so much.

So adapted from the post I found, here is my guide to making a Debian Package from a Python package. For this example, imaginate (in an Imaginarium if at all possible) that you are packaging "packagename" with version "version". Also remember that when I say package I am referring to a source package made with setup.py.

# cd to the directory where the Python package is and make a packaging directory
mkdir packaging

# unpack the package and cd to it
tar -xzf packagename-version.tar.gz
cd packagename-version

# build a dumb build distribution
python setup.py bdist_dumb

# copy the dumb build (whatever name it was generated with) to the packaging directory, and change to the packaging directory
cp dist/packagename-version-linux-i686.tar.gz ../packaging/
cd ../packaging/

# make a directory for the package, this also will be the name of your package
mkdir packagename-version-0ubuntu1

# unpack the dumb build and mv the unpacked contents to the package directory
tar -xzf packagename-version-linux-i686.tar.gz
mv usr packagename-version-0ubuntu1/

# make a DEBIAN directory for your package
mkdir packagename-version-0ubuntu1/DEBIAN

# use your preferred editor to create a control file
vim packagename-version-0ubuntu1/DEBIAN/control
Your control file should look something like the following, just replace the values with the appropriate info for your package.
Package: packagename
Version: version-0ubuntu1
Section: unknown
Priority: optional
Architecture: i386
Depends: python
Installed-Size: 156
Maintainer: Your name <your email>
Description: A short description of packagename
You should also create any other files your package needs (preinst, postinst, prerm, postrm, etc).

When everything is read run the command `dpkg-deb --build packagename-version-0ubuntu1`

If everything worked, packagename-version-0ubuntu1.deb should have been created in your packaging directory.

It's just that easy. Alright, I'm done for the day. Tomorrow I'll start string replacing Pike with Quizzical where I can and continue working on the code for it.




I got some work on the Pike library done. Currently, I working on the custom question system. I've also moved Amenity and Pike to their own branches amenity-devel and pike-devel. devel-main was getting too crowded. In retrospect, I probably should have named them devel-amenity and devel-pike. I was pushing a commit from devel-main and accidentially created main-devel. I would delete it if I could figure out how to do that. Oh well.

Also, I've created a blog exclusively for the pyeducation project. I'll still be posting my progress and other news here, but I hope that this project outlives Summer of Code, so I thought having a separate blog for it would be a good idea.

Back to work.



I didn't get much work done this weekend. Besides being out of town, I was also feeling pretty ill most of the weekend. Hopefully I will get a lot done today.



Amenity 0.2.0

Overnight a broken pipe error has snuck into the AmenityServer object. The actually exception is thrown in a Pyro module, so there wasn't much I could do to fix it directly. I did manage to rewrite the server's main loop to avoid using pipes. I still don't know what caused the error to appear. It had been working for a week and then it didn't. Well, the updated version (Amenity 0.2.0) is up on the SourceForge page.

I'll be out of town this weekend. I'll be working on the Pike library. I may be able to find a coffee shop with wireless somewhere and update my progress. If not expect and update on Monday.



Amenity First Release!

Today I fixed all of the UI bugs I could find. End result: the first release of the pyeducation library and Amenity!

The files are hosted at my SourceForge project page. Here are the individual files:
Amenity depends on Pyro and M2Crypto (both in the Universe I think), so running `sudo apt-get install pyro m2crypto` is required first.

Then you can install the pyeducation package and the amenity package. The amenity package includes the amenity-server script, which is useful if you want one computer to be the central Amenity host.

Then you can install amenity-teacher, amenity-client, or both to test drive the app.

Right now there are no formal instructions on how to use the program, but I'm working on that. But in general to get started you need to:
  1. Create a Class Roster
  2. Create an Activity Sequence
  3. Create a Session
  4. Start a Session
  5. Have student clients connect to your session.
I'd enjoy to hear any feedback or comments about my work so far.



Quick Update

I thought I would post a quick update to my work today.

My list of things to do from my last post now looks like:
  • Said changes to the UI
  • Hunting and fixing the bug in the Student Client that keeps the Event Listener from stopping when a student disconnects.
  • Add something so that when a session is stopped, connected clients are alerted so that they may cleanly disconnect (not hang).
  • Add a way for teachers to send a message to a single student or all students (optional)
  • Add a way for students to go back and complete activities that the teacher adds to the session's sequence (In the event that a teacher adds an activity in the middle of the sequence after students have already passed that point in the sequence).
  • Add "open dir" and "open file" to File Submission views, so that a teacher can open files that have been submitted.
  • Help files and help menu item. (newly added to list).
I've been working on the UI changes, and that will soon be crossed out. As for the message sending, I think I may postpone that until the second release. I'd like to have help files made, and I've looked into using conglomerate to make them. I think I may also save this for a second release, because I rather spend the time coding Pike than writing the help files. I can write the help files later after the applications are finished.

But a friend from Austin is in and we are going to shoot some pool for a while.


Latest Progress

I committed my latest changes this morning. The improvements made since the last commit are staggering. Long story short: Amenity works! All the activities and interactions with them are functional. I got Marc to test the student client on a separate machine yesterday. It was the coolest (and most satisfying) thing to watch Amenity transfer a file from his notebook to mine over Pyro. He gave me some good comments about the UI, which I'll be working on today.

So it works, what's left to finish (that I can remember at this moment)?
  • Said changes to the UI
  • Hunting and fixing the bug in the Student Client that keeps the Event Listener from stopping when a student disconnects.
  • Add something so that when a session is stopped, connected clients are alerted so that they may cleanly disconnect (not hang).
  • Add a way for teachers to send a message to a single student or all students (optional)
  • Add a way for students to go back and complete activities that the teacher adds to the session's sequence (In the event that a teacher adds an activity in the middle of the sequence after students have already passed that point in the sequence).
  • Add "open dir" and "open file" to File Submission views, so that a teacher can open files that have been submitted.
How long will this take? Not too long (I hope). Most of these changes are trivial. I should be able to get most of them today. Tomorrow is Independence Day so I'll only be working a half day or so. It's safe to say that I should have these changes finished by Wednesday.

I should probably start working on those changes now.