Archive for the ‘Projects’ Category

JAOO

Thursday, October 2nd, 2008

IMG_9115.JPG

With a colleague of mine, I went to the JAOO conference in Arhus. Quite an interesting conference; kind of small, not specifically technology focused, very interesting speakers and a lot of discussions about the major issues in the IT field: Architecture // Cloud // Agile // Component Models // DSL.

We rented an ancient small house in the most picturesque street of town. So much better than a hotel without atmosphere…

IMG_9092.JPGIMG_9086.JPGIMG_9100.JPG

The session I liked most I can summarize as: everything you know is dead and crap — but here comes DCI. It was James O. Coplien that held a talk called Not your Grandfather’s Architecture: Taking Architecture into the Agile World – take 2. The talk was highly unstructured, but so entertaining. It’s not so much that I agree with the content or think it was the best contribution for new ideas as well that I liked what his talk did with the (over over crowded) crowd!

The presenter declared a lot of concepts to be crap and/or dead; such as runtime-polymorphism, class diagrams, Java, and aspect orientation. E.g., class diagrams was declared waste of time, because the end user doesn’t care about classes — however, object diagrams were somehow very good (like users care about objects). Much of the criticism was highly appropriate, but unclearly motivated. Next, James described a paradigm which was presented as brand new and the way to “save” object orientation: DCI, short for Data, Context, Interaction. The paradigm was illustrated through C++ code examples, and seemed to rely on a special way of combining C++ class templates with multiple inheritance — mixins, effectively. The goal of the new paradigm is allegedly to increase code readability. However confusingly the concepts were illustrated, I left with a feeling DCI may actually be something we will see more of.

Skype

Tuesday, December 6th, 2005

A few days ago I tried to get Skype running on linux. The installation process was just as easy as on Windows (rpm -i skype-rpm-url), and I was amazed that it worked that quickly. My real purpose for getting it running on my server, was that I hoped to get it working without GUI (this was easy) and to control it with some scripts (this turned out to be the hard part eventually), for instance activated by some key pressed on my remote control, and possibly couple it to a phone to call for free.

And the guys at Skype thought about this as well! It’s possible to interface with Skype through the DBus protocol. Actually, this seems to be an interesting standard for interprocess communication. It’s an efficient IPC mechanism, hiding the transport protocol, allowing you to discover and lookup services, and it allows you to communicate on a higher level than many of the low level methods do (e.g. sockets, signals, fifos, shared memory); it allows you to define interfaces and call methods. It’s not as bloated as Corba is or Web Services are (containing functionality hardly required for interprocess communication limited to one machine).

The downside is that it is yet another unix/linux standard. In Windows, a decent OLE COM DCOM ActiveX standard (or whatever the marketing department calls it today) exists for this purpose (and more).

A real downside of this new protocol is that it is still evolving fast, and this got me into troubles. Skype works with DBUS version 0.22. On my system (Fedora Core 4 distribution) I’m stuck with version 0.33 (which is already over a year old), and the latest DBUS release is 0.60. In the new DBus python API, somehow the dbus.get_service call disapeared (giving an error like AttributeError: SystemBus instance has no attribute 'get_service'). This method is used to discover a running instance of a service. Also some changes were made in the API to list the available services; dbus.ListServices() disappeared. I couldn’t fix this problem as the python API didn’t seem to have an alternative method.

For a while I tried to downgrade my rpms, but as I went into the muddy dll rpm dependency hell, I gave up. Hopefully the next Skype linux release will support a recent DBus version, or maybe I should look at how to build a real PBX ;-)

mp3act drag and drop support

Wednesday, July 27th, 2005
I added drag and drop support to the mp3act music system I’ve been using intensively lately, and it looks really cool (sorry, no demo on this site yet). It’s now possible to smoothly sort files in the playlist, and drag and drop albums or songs into the current playlist.

The patch (based on mp3act1.1) has been sent to the author (no concurrent versioning system setup yet). He liked it a lot so hopefully we can see it in one of the next versions. (you could also download the full version)

The drag-and-drop support is based on the script.aculo.us-library; an elegant javascript library based on the ruby on rails project. During this two-day project, I learned that javascript can be used to write neat code (see the script.aculo.us-library source) and worked on my sajax, css, dhtml and dom skills. Firefox adds great support for web development (javascript console & debugger, plus a DOM inspector…)

Voicemail in database

Tuesday, March 8th, 2005

The dutch national phone company KPN on request delivers voicemails in your mailbox. I like the service and want to keep my voicemails hanging around for a while. However, the huge wav files flood my mailbox. Therefore I wanted to shrink them to mp3, and store them in a database. This way I can access them from any place I want. This process should of course be automated, and that’s where some software pieces come in (two scripts).

Overview of how it works

When a voicemail message for your phone is recorded, an emailmessage containing the voicemail is sent to the emailadress as configured at your KPN account. This email contains voice data and some additional info (like time and caller-id). As soon as the email is delivered at the (unix/linux) emailaccount server, it is identified as a voicemail message (by the subject and sender). The message information is extracted, encoded into mp3 and inserted into a database. After succesfull insertion, an optional (small) notification email can be send to any number of email adresses.
All recorded voicemails can be viewed and manipulated trough a web interface.

voicemail workflow

Realization

This process is mapped to the following software pieces. The identification process is executed with a procmail filter. The message is parsed with the supplied voicemail script. The extracted information is inserted into a mysql database table. This information can be displayed with the index.php script.

voicemail software mapping

Installation requirements

The software requirements consists of quite common unix software.

  • A mail receiving host with procmail configured.
  • PHP, (the webinterface currently works with php, but could easily be ported)
  • Mysql, (this should be portable)
  • Perl5 (the parsing script requires perl)
  • mimencode from Metamail (or any program that decodes uuencoded data). For metamail installation: download and build metamail. You only need the mimencode binary.
  • lame mp3 encoder (or any other sound encoder).

Installation of the voicemail in database software

  • Download the two scripts (voicemail and index.php
    )
  • Rename them. Leave out the .txt extension I added to facilitate downloading). _php should (normally) be renamed to .php.
  • Copy voicemail to your ~/bin directory (or any directory in your $PATH environment variable. Copy the index.php script into a location accessible with your web-server (e.g. ~/public_html/voicemail/).
  • Please make sure this directory is htaccess protected (either ip-based or with a username/password combination).
  • Configure both scripts. Only the parts between <configure> have to be configured.
  • Run voicemail -m once to create the database table and configure the procmail filter
  • Test the setup by leaving a message after the beep
  • Good luck! Please leave any feedback here or at the supplied

MicroSoft eXtended Linux (Epia in msx)

Wednesday, February 23rd, 2005
In august 2002, I took up the idea of building a small, light-weight, and more important, low power-consuming server. The Via epia 800 motherboard had just arrived, and it sounded like the ideal choice. With a left-over harddisk, some memory, and a power supply to go, the only thing I needed for the small motherboard was a nice looking case.

For that purpose, I demolished an old MicroSoft eXtended (MSX)

NMS-8250 case (1). It didn’t feel that eXtended anymore I guess; ready for an MSX case mod! I never used the machine to begin with as it was given to me at a time I even didn’t use my own MSX anymore. I never would give up my own though! No, that one has safely been catching dust at my parents attick for over 10 years now.

The

msx (2) linux-server (3) has been serving me for almost three years. I mostly use it for music (mp3’s and streaming radio) and movies (avi’s play just fine), and to access all my files (ssh/samba/webdav) and adresses (ldap) wherever I am.

I think it was a good choice. I like my MSX around in my living room, having a server up and running always comes in handy. It’s quiet and doesn’t use a lot of energy. After seeing a friends energy-bill (he had a scsi-enabled, dual-everything, hot-swappable, heavy-duty-cooling server), I think the EPIA or pentium-M servers are the way to go for a personal server at home.

setting up a multi-card reader for Fedora Core 2

Tuesday, February 8th, 2005

Maybe with the a new kernel (>2.6.10) and a new distribution (>FC2), this info becomes outdated. I however, had quite a bit of work getting a multi-(memory)-card reader to work on this versioning of (GNU/)linux. This post consists of a bunch of links I used, giving guidance (and assuming you know how to recompile your kernel).

I started out using www.linux-sxs.org/hardware/flashreaders.html, which got me somewhere (scsi support running), but not where I wanted. The mini-howto on www.fedoraforum.org/forum/showthread.php?t=15737 got me bit further. I made sure my device was supported by looking up the USB device ID
(lsusb) which gave “ID 0aec:3260 Neodio Technologies Corp”. Googling
assured this one was on the white list for linux support.

Finally, this link told me I had to compile and probe/insert the sd_mod.o and sg.o kernel modules (now .ko, but that’s detail)

After reconfiguring the kernel, compiling and installing modules, I got the support I wanted. But then, the wish was to insert and download my photos. So, here
comes the trick. See www.buberel.org/linux/usb-automounter.php for automatically starting scripts on insertion.

Good luck!

MicroLCD patch for hd44780

Monday, March 1st, 2004
When I play music in my living room, I usually use a remote xmms instance (my server is connected to the stereo set). I wanted to have the files shown on my built-in LCD display and after some googling I found MicroLCD; an lcdproc based xmms-plugin. As my hd44780 LCD contains more than one line, I extended the plugin a little bit to fit my purpose. I like it a lot! You can download the changed version.