Free DNS provides easy shared DNS hosting & URL forwarding

Saturday, August 22, 2009

Gardening





I had some spare time two days ago, so I went in the garden to do some cleaning. We ignored it a lot this summer due to our GSoC projects, PhD and papers research, and other activities. Of course, during this outdoors activity, I had the invaluable support of Elena (taking pictures and making fun of me), our cat - Yahoo (ignoring me completely) and the four kittens that showed up in our garden since spring (meowing at me and begging for food).

Sunday, August 16, 2009

GSoC 2009 sum-up

After I finished my previous post, I recalled a few moments when things didn't work the way I wanted (or didn't work at all). One thing led to another and I start thinking what were the main challenges I faced during this project. If I was to make such a list, it would be probably look like this:

  • missing documentation for the recording widgets:
    • for riffly, I had some help from their support team regarding their API and metadata services (thanks Steven) and some I had to find out by myself through try-and-error (and Firebug and Wireshark and XDegug and so on);
    • for nanogong, I had to go through their applet java code to find out how it works. Maybe I'm missing the big picture (since nanogong is only a piece of a larger project), but it seems to me that this code was unnecesary complicated in some places, and missing a lot in others (some said: "so what, it's code that works").
  • working on still in development code (both repository and Moodle 2.0):
    • there have been quite a few occasions in which I updated my CVS only to find out it contains broken code which was commited in by mistake;
    • the repository code is still going through some changes and the coding style felt in some parts a bit rough; this feeling was in part due to the particular tasks and contraints that I was facing with my plugins; however, the documentation pages and the existing plugins proved a valueable source of information in many case (thanks dongsheng).
    • less important, but still a tiny problem was that the repository code is missing comments in some places (especially in Javascript, filepicker and webservice code), has out of date comments in other places, and has in a few places comments like this:
      Don't modify this file unless you know how it works

Anyway, even with all these issues, finishing this project was never at risk, because Jerome was very helpfull and quick in response, providing me with usefull tips, coding help and great feedback, and occasionally collecting feedback and advices on my befalf from other Moodle developers. He's also very pacient and he gave me a lot of freedom to work on the project on my own pace.

Dongsheng (who designed and developed the repository API) was also very supportive, helping me when I got stuck with the repository API and quickly fixing repository bugs so that I can move on.

Last, but not least, Helen was very helpful with the administrative part, keeping me (and the others) informed and focused on my schedule, stepping in on a few occations to make sure I have a great (and complete) GSoC experience.

Saturday, August 15, 2009

Completed audio repository plugins

During Google Summer of Code 2009 project I worked on implementing repository plugins that would allow users to record audio files directly into Moodle. Initially, the plan was to provide a single recording only, but things went a bit further, and I also implemented a collection management feature.

Both plugins have integrated help pages for all their features, but additional help (mostly for developers) is in the Record audio repository plugin wiki page. Some discutions focused on audio and/or video recording in Moodle are in the Record audio repository plugin (was Wanted: New feature ideas for GSOC projects) and GSOC: Record Audio/Video directly into resources/activities forums. The later is more general, not only about the repository plugin. Last, but not least, there also a place for feature requests and bug reports in the MDL-18341 ticket.

The plugins are not included in the Moodle releases (not even the 2.0 dev daily build). In order to test them, you'll need to use a 2.0 dev daily build.

The Riffly plugin allows audio-only or audio-video recording inside the Moodle repositories. The flv files are stored on riffly.com servers and, optionally, they can be downloaded into Moodle (to go under Moodle File API control). Recorded files and the recording flash object is available in all places where the repository is used to select files.

After you download a Moodle 2.0 dev build, you'll have to download the plugin manually from CVS and copy the entire riffly folder inside the repository folder of your Moodle instalation. Then go to the Plugins/Repositories entry of the Administration menu, enable the plugin and make it visible. When you're done, you'll have the option to create riffly site-wide, course-wide or per-user collections. For each collection, you can choose what type of content it accepts: audio, audio-video or none of them (to get a locked collection).

The Nanogong plugin allows audio-only recording inside the Moodle repositories. The wav files are stored into Moodle using the File API. The sound files can be recorded using the ImaACPCM or Speex codecs. As for the riffly plugin, recorded files and the recording applet are available in all places where the repository is used to select files.

After you download a Moodle 2.0 dev build, you'll have to download the plugin manually from CVS and copy the entire nanogong folder inside the repository folder of your Moodle instalation. Then go to the Plugins/Repositories entry of the Administration menu, enable the plugin and make it visible. When you're done, you can select the codec used and the quality of the sound for the site-wide recording instance. This instance will be shared by all users of your site (because it only handles recording, and File API handles the rest).

Sunday, August 2, 2009

Octave files misdetected as Objective-C

As you may noticed from the previous post's screenshot, GEdit misdetects my Octave .m files as Objective-C code files (because both share the same file extension). Because I don't use Objective-C, I tried to fix this problems like this:

  1. I edited the file /usr/share/mime/packages/freedesktop.org.xml, commenting out the mime-type tag with type text/x-objcsrc (just search for text/x-objcsrc and you'll find it).
  2. After saving this file, I ran the following command:
    sudo update-mime-database /usr/share/mime/
  3. Last, I restarted GEdit.

It didn't seem to work, so I did the following thing:
sudo rm /usr/share/gtksourceview-2.0/language-specs/objc.lang.
This worked fine.

Octave taking over Matlab

I'm trying to replace my Matlab R12/Windows habit with Octave 3/Linux. I installed the QtOctave IDE, but it seems to bulky (especially because I use Gnome). I didn't liked it, so I uninstalled it.

Next I tried another approach: I installed the gedit-plugins package which contains the embeded terminal plugin and enabled the filesystem and embeded terminal plugins. My GEdit window setup looks like similar to Matlab's default view, except for the workspace and history sidepanes (which I didn't use much anyway).

I also added the file .octaverc in my home directory and added this line to it:
edit EDITOR 'gedit %s'
This command makes Octave's edit command to open files in the gedit (instead of default emacs).