I must apologize to my keen readers who I have no doubt have been wondering what had transpired since my last correspondence. It might come as a great disappointment to some of you that the rumour of me spending four weeks writing a social apocalyptical novel where humanity is forced by an exploding star to relocate is a complete fabrication. On the contrary, my untimely hiatus has been the consequence of a separation and formation of attachment of an affectionate nature, which is to me a source of both melancholy and contentment.
The sharp-witted ones among you would certainly recall the swap of roles between Geofrey and I about one month ago. To be sure, letting go of Web-CAT is heart-breaking, given the weeks I spent with it. On the other hand, working with Java/SWT in Eclipse and doodling UI designs is a welcome change.
I’ve spent the last month building on top of Geofrey’s unfinished prototype, and the progress has been absolutely gratifying, with a small but key exception. The WebAPI component of Web-CAT server which is the prerequisite for the plugin to converse with the server, has yet to be updated in 4 weeks. The current implementation of the API, allowing logging in and loading of assignment info, is incomplete. With most of the GUI already in place, little work has being done on the API and some of the related backend model. We had hoped that Stephen would be able to complete more of the WebAPI component for our using, however clearly he was not expecting to work so closely by our schedule. In our initial correspondence regarding the plugin project he did mention that presently they do not have the manpower or time to implement such a component.
The plugin is far from fully functional in its current form, so it’s my best interest that some enterprising individual (from Virginia Tech probably, as we just decided not to use Web-CAT at UofT) would be willing to finish it. In two weeks the project will come to a coda, my intention is to clean up the existing code and prepare documentation so that the person who inherits it would be able to set it up with the effortlessness that is much in wanting of with Web-CAT itself.
Now that the warm-up is finally over, it’s time to roll up my sleeve and start tearing Web-CAT apart down to its database core. Next on the agenda is to integrate partner and group associations into assignment submissions. The plan is to add the ability for users to setup groups and use it to collectively organize individual student submissions.
Currently, partner associations in Web-CAT is – excuse my language – practically unusable. For one thing, partners are done on a per-submission basis and only has a one-way relationship, which means that student A’s submission might be partnered up with student B, but student B’s submissions aren’t. This can both be tedious and can create duplicates, where it’s possible to have two groups with the same members. Also, the fact that the grader is responsible for specifying partners manually (without any automation tools) would certainly make a grown man (or woman) cry if done on a course with 300 students on a span of typically four assignments.
Overhauling the entire workflow on group submissions is a daunting task, which is what I’ve been doing for the past week. Since Karen is away, I’ve been working closely with Jennifer Campbell and Paul Gries to solicit very useful feedback on what they think would be useful for courses that involve group assignments. With the design we have so far, students take charge of creating their groups instead of the instructors, based on an invite model similar to Facebook. However, groups would be decentralized, meaning that an actual Group entity doesn’t exist, and is only formed according to students requesting and accepting invites. Implementing it this way allows us to impose restrictions such as no student can create and be in more than one group.
One of the major difficulties right now is handling group merging and taking into account all the different cases of how invites and joins should be handled. Putting control of group assignments in student’s hands involves some serious restrictions on what they’re allowed and not allowed to do. Privacy and sharing issues also presents problems that we’re looking into as well. The good news is that we should be able to reuse some of the underlying database for submissions to merge user submissions into group submissions. However this would still take a lot of non-trivial work to fully implement, while considering how our changes would affect existing Web-CAT installations. There’s a lot more to figure out along the way but with what we have so far, I think Web-CAT has a promising and bright future to look forward to.
After building Brett Cannon’s security work for securing the python interpreter on Linux, I got an error that cost me two days of debugging.
The error that I got from running the new “secure_python.exe” interpreter was: import of controlled_importlib failed!
Debugging the problem while stepping into python core functions started to look hopeless… So I decided that I should give a try and send an email to the one that actually wrote the code (make sense right?) but unfortunately I was answered that he has not touched that branch in about a year.
After googling the problem a while and reading some blogs I figured out that Brett Cannon actually used a Mac so why not giving a try and installing it on one. I headed to Keren Reid’s office and we tried together to install it on her machine. As expected it worked just fine…..
Trying to debug the error, and to understand from where the NULL that breaks everything is returned, started to seem like a trip to an infinite loop inside the deep Python source code of bytes set…… That why we decided to ask “the one that knows everyone”, Greg Wilson, what should we do next. Few seconds after asking him my mailbox had a new email waiting to be replied from David Wolever (that was staying in Brazil meanwhile…). David was so professional that in one hour he already analyzed the problem and told me what should be my next step. The problem was actually found where the functools library is imported (as the strace tool suggested) and an undefined symbol was found: PyExc_TypeError.
Meanwhile I didn’t notice that Jeff Balogh had tried to debug the problem himself and he actually got to the same conclusion but also to the solution.
Do you know the feeling of spending few days on a debugging a problem that could be solved in less than ten second?
Exactly, it is simpler than building Web-CAT:
Adding the “-Xlinker -export-dynamic” option while building secure_python.exe with gcc supplies system specific linker options which GCC does not know how to recognize. (sounds complicated? well, just add the option at the build_secure_python.sh file where secure_python.exe is built)
So after a lot of hours, a lot of source code and a lot of computer scientists, I can proudly announce:
And the winner is…………..
Jeff Balogh !!!!
After a very eventful meeting with Gene Amdur last week, we’ve finally figured out what to do for the rest of the summer. Karen decided to switch Qi and I, where Qi will now be working on the Eclipse plug-in while I get the reins of Web-CAT, and everything else that comes with it.
We’ve decided to tread slowly, fixing minor bugs to get us familiarized with the innards of Web-CAT. This week, I’ve fixed the bugs regarding releasing of assignment results and viewing permissions of students. Apparently, students can see comments and marks added by the TA that is still being marked and has not been released yet (a big no-no). Interestingly enough, even if marks added by the TA are not explicitly shown if assignments are unreleased, it is still included in the calculation of final mark shown when students view their feedback, which is just a matter of simple arithmetic to find out the “hidden” TA mark.
Next week, I would then start doing more major surgery on Web-CAT, now adding a complete and release mechanism to marking assignments, typical to the way instructors here are used to OLM. This would provide capabilities for markers to change the status of the student as complete, indicating that it is ready to be released by the instructor for student viewing. We would then transfer the release capability to the instructor, rather than the TA, of making the completed submission result available to students. This would involve more changes internally as it would mean adding attributes to the tables that is accessible only through WebObject’s EOF – which is like SQLAlchemy in python, except that it’s meaner and eats children.
Another problem that I have is providing granular restrictions on components in a WebObject page. As far as we know, Web-CAT only provides access level restrictions on a per-page level and not on individual components. What this probably means is that we can’t have conditions on components like “display this button only to instructors”, but rather create a whole new page with just that one change and put restrictions accordingly on the page. This still requires investigation that I’m looking forward to next week.
I read as much material as I could so I could start to have more
knowledge about the structure and the ideas behind Brett Cannon’s
Jeff Balogh helped me a lot and introduced me to some tools for python
that made my life so easy in a second. Now I use IPython instead of the
regular python, it is a plugin that warps the regular distribution and
create new commands and much more features that makes a developers
life like heaven.
In addition I checked out two of Brett Cannon’s project from the python
svn reposatory: bcannon-objcap/, bcannon-sandboxing/.
Despite the names the sandboxing project actually deals with memory allocation
and usage and the objcap project is the security for python.
I spent some time also going over his personal blog and I found out some
post that are very interesting for us:
As you can see in one of the blog’s post nobody has tried the sandox except
Brett Cannon himself, although he mantioned that he finished the security work!
My plan for the next days is to continue to look at the code until I will understand
good enough the implementation.
Luke started to test the plug-in with some test cases that I transfered him and
also some of his own. Although he already found some bugs, all the bugs found are
currently not related to the plug-in but to Web-CAT. Everything will be recorded
but all the bugs that are not related to our work will currently remain unfixed.
If we will have additional time after the projects will be ready, we will go over the records
and fix the Web-CAT bugs (after talking to Stephen about it, of course).