Weekly Summary

Weekly Summary One

Welcome to the first weekly summary for this blog: Programming by Robert Massaioli. The layout of the weekly summaries are simple:

  1. I will provide bullet points for each of the things that I did this week and call it the ‘Digest of Events’ or the DOE.
  2. Then I will make note of everything that is important but that I did not blog; this section will be known as ‘New News’.
  3. This will be followed by some concluding notes and a vague idea of what I will be doing over the following week, which will be known as ‘Future Planning’.

Digest of Events (DOE)

  • Debian Collab-Maint has begun. Now people can help me package Fuppes for Debian based systems by going to git.debian.org.
  • I talked about the Fuppes Database and using SOCI as the ORM for Fuppes.
  • I announced that I would be making these weekly summaries along with any other posts that I deemed would be interesting.
  • I talked about the web-interface and how that is being abstracted for multiple interface use via a SOAP interface.

New News

Tracking Contributers

For the past few days I have personally been tracking contributers to the Fuppes project when I come across them. I currently have 11 people on the list who I believe have contributed to Fuppes, and at-least half of those are still actively contributing. There are three main sections in the file that people come under; ‘coding’, ‘packaging’ and ‘documentation’. There is also an extra section called ‘Everything’ which means that you have a hand in every other group; currently only Uli and myself exist in that section. I do not plan to make this list public for the sake of privacy and because I do not have people’s consent to publish such a list but I think it will act as a great way for me to remember what people have done and where I have seen them before. If you believe you have contributed to Fuppes and should be on the list then please leave a comment; I’ll be happy to add you.

Ubuntu GitDeb Package For Fuppes

One good man, Christoph Korn, has made a GetDeb package of Fuppes which you can download for Ubuntu Karmic Koala. That was really nice of him and he is to be commended for that. However, I will still be trying to make an Official Fuppes package at git.debian.org because GitDeb is not very rigorous in making sure that Fuppes is packaged properly for everybody that runs on Ubuntu.

Future Planning

  • I am planning of continuing to talk to people and continue the packaging effort. It is going well with Eva offering her help on the debian Fuppes ITP.
  • I am going to continue the database work on fuppes and try and work towards replacing everything with SOCI and making database rebuilds faster.
Fuppes, Presentation

Fuppes: Webinterface

This post is here to discuss the presentation interface of Fuppes. Currently it is a web-interface; a bunch of HTML pages that are generated by the fuppes program itself to server some basic configuration. However, to anyone that has looked at the current source code you will realise that that much HTML in C++ code begins to look a little messy. That is why Ulrich suggested something with a few more layers of abstraction. Who says that fuppes configuration must be restricted to a web interface; what if you don’t have a browser, or you have a headless server and no other computer to access fuppes from? What if you prefer the command line? Or a nice GUI application (made for your window manager of choice)?

So how do you solve the problem where people may want a variety of ways to get and set Fuppes configuration? Our solution is to create an abstraction layer that accepts get / set requests over the network. It will use SOAP Requests to send data back and forth between the two programs with fuppes acting as the back-end and the addition acting as the front-end in whatever manner it sees fit.

Work on this abstraction layer has begun but is moving slowly and there are also other things to consider while we are rewriting the abstraction layer. Proper login forms so that we do not have to filter and provide ‘security’ using IP addresses would be a good start. There are also some todo list items that could be read while that is going on. It is also a good excuse to double check configuration again.

Once I finish work on the database side of Fuppes then I plan to work of the interfaces to accessing the configuration.

N.B. Packaging Fuppes is still underway too. You can find it at git.debian.org under collab-maint/fuppes.git.

Global Announcement


Posting by Robert Massaioli

For the first week or so I ensured that I would post to this blog once per day; to give it substantial content and really put readers in my shoes. However, now that a week has passed I am contemplating a few options for my blog’s posting structure; as in, how often exactly will I post new posts? These are my options:

  1. Once per week.
    It sounds nice and methodical but that may be it’s failing. It lacks the spontaneity of “Hey guys! Look at what I just did!!!” and I like exciting people by knowing that something I just posted was something I just did.
  2. Randomly
    So why not just post randomly, when I feel like it and off the top of my head. That sounds like a good idea doesn’t it? People will be on the edge of their seats waiting for posts…but I’m not kidding anyone and I dream that this blog will receive that much attention. No, readers need to have some consistency to fall back on.
  3. A guaranteed weekly summary and random posts when I have something cutting edge to say.
    This is what I’m leaning towards. It suits all readers. There are the surprise posts and the weekly summary. If you did not read the previous posts for the week then the weekly summary will keep you up-to date and you’ll be good. And then you can read all of the in-depth comments at your leisure.

As a result I think I am going to pick option three. But then what time will the weekly summary be released? Where I live the working week begins on Monday so I think that I will post the summary every Sunday night from 8pm-12pm my time, that way it is ready for people to read come Monday morning. You can expect the first weekly summary this coming Sunday, 31st of July.

SOCI Support

While I have some space here I thought I would mention that I managed to compile SOCI properly on my machine and get it to access postgresql, myql and sqlite very easily. It is a really nice library and I was thinking that I might even write a post here which is a guide to SOCI complete with an example of how it all works together with many different databases. In the process I even provided a really minor patch. Because of this success, it only took one day, and also because SOCI compiles on Microsoft Windows I now feel confident to argue the case to make Fuppes use SOCI. This means that when the database for Fuppes gets rewritten then you can expect to see it using SOCI. I think this freedom of database choice will be a really useful move in the right direction.

Database, Fuppes

Fuppes Databases and ORM

While looking at the database structure of fuppes I decided to see if it was actually possible to get fuppes to work with mysql and found out that for the average user (and even myself, a developer) it cannot be done with the current revision without serious changes to the source code. I know this because the plugin is not even loaded as an option in ‘src/lib/libmain.cpp’ of fuppes which means that more work needs to be done before it is ready to use by general users.

It is difficult to write a framework where many different DB’s can be all used as the backend to the same program; unless you use some type of ORM of course. I was thinking that since I was planning on doing a little bit of a database overhaul for fuppes that I might look into using SOCI (http://soci.sourceforge.net/) for all of our database work. SOCI has many positives that make it attractive for fuppes:

  • It supports Oracle, PostgreSQL, MySQL and Sqlite which is three more DB’s than fuppes currently uses for the price of one API.
  • It works on Windows and *nix operating systems. I discovered that it has packages in Ubuntu too.
  • It is rather easy to read compared to the other C++ ORM’s.
  • Integration with the STL is also supported; which got me excited. I love the STL.

And those are just the benefits for fuppes, it has more features that I have not mentioned here. If you want to know more you should go check them out.

Even if we decide not to use it for some reason then I will be still happy knowing that I tried. I think I will be doing a fair amount of database work over the coming weeks trying to improve not only database speed but the range of databases that fuppes can use.

Fuppes, Packaging

Collaborative Maintenance for Fuppes

This is really just a short post to let everybody know that fuppes v660 now exists in the debian collab-main project: http://git.debian.org/?p=collab-maint/fuppes.git;a=summary

Anybody and everybody can now join the project, make changes, and generally help package Fuppes for Debian based systems. If it makes it into Debian then it will filter down into other distributions like Ubuntu soon enough. I hope everybody takes this opportunity to go have a look. We can also use this to package fuppes for every different architecture and gain the advice of seasoned packaging veterans.

The fuppes-git that is present in git.debian.org is the development repository upto release version 660 with my Debian packaging changes on-top of it. That means that the version that we are packaging for Debian is version 660; which has a few noted bugs but is solid. If you have been feeling like you wanted to help develop fuppes this is a prime oppourtunity; packaging a piece of software is a good way to learn more about it.

However, if you don’t want to code but still want to help then I have started up The Documentation Project on the fuppes wiki. Please feel free to go there and help document Fuppes.

Fuppes, Packaging

Packaging Fuppes: Debian Collab-Maint Project

Things have started getting busy lately. Packaging fuppes is going very well; all of the errors are now past history and the only one remaining is warning me that the ‘S’ run level should not be included in the init.d script and it is right. It should not; it is meant for other Linux distributions. With that in mind all is going very well for packaging fuppes however there have been some other people that have shown interest in packaging fuppes and I want to let them have input and let them help. The more the merrier I say; and they seem to have more experience than myself at packaging for debian. To see what I am talking about you may want to check out the Fuppes Debian ITP (Intent To Package).

As a result I have applied to the Debian Alioth collab-maint project for a space for fuppes. The collab-maint project, as the name suggests, is a place for people that are all working on the same debian package to go and develop for it. That way the packaging effort can be made by many people and there are no branches as everybody attempts to make their own package. Not only that but helping out with the packaging of a program is a really good way to learn about it. Even though there is no compulsion whatsoever, I am hoping that some people might help package fuppes, see what it like, and realise that they could contribute code every now and then.

In the downtime, waiting for the collab-maint project to get back to me, I have been looking over the database structure of the fuppes project. I actually have many pages of information now, handwritten if you believe it, on the fuppes database: the purpose of each table and also the purpose and usage of each field in each database. As it turns out a few things need to be reconsidered:

  • The Details for the Objects could really be separated into three tables (Video, Audio and Image) but currently they are all mashed into the one table. This results in many ‘NULL’ fields.
  • The Objects database has about five fields that simply don’t get used; it could be half the size of the code needs to be written to use that functionality.
  • Playlists seem to be represented as a hack; the playlist is represented as an item in the Map Objects table and all of its children have it as a parent. But this completely breaks the order of the playlist (which is apart of every playlist spec) and is the cause of one of the bugs that I have seen in the bugtracker.

There are more items to consider but essentially I am trying to make the database fast. I want it to be such that if you have 20,000 media items and you open up fuppes, in five minutes everything is in order, the database is full and you can watch whatever video you want to. I think this will involve some sort of lazy evaluation, like only getting the details of an object when somebody looks inside its folder. That way alot of processing can be delayed; I’m not sure yet and it’s still early days but I look forward to increasing database speeds for fuppes and I hope you do too.


Kindle for PC (And probably for Linux too)

Through the tangle of links that make up my daily browsing routine I came accross this gem from howtogeek which describes the windows beta for ‘Kindle for PC’. I had not heard about it before but I am very excited; when I first heard about the Amazon kindle i really wanted to get one. A cool little device that would allow me to read many and varied books? That seems like a winner to me. But alas, the price of the device drove me away, it was just to expensive to be worth considering as I would have to buy a large number of books via kindle for it to have been worth it. But now with the ‘Kindle for PC’ look at the benefits:

  • The device is completely FREE
    The ‘device’ as I called it, is just a piece of software that they will be giving away for free. You’ll essentially turn your computer into a kindle and I know that in my case it certainly has a bigger screen (though reduced battery life compared to a kindle). This also means that when you buy a book for the ‘kindle reduced’ price you immediately get the cost benefits.
  • You can have upto six kindle devices at any one time
    This means that if you want to share your books with a partner or your family then you merely have to all use the same account. So just setup a family kindle account and you can all benefit from each others purchases, each on your own PC. No more do you have to buy one book that everybody wants to read (like Harry Potter or Eragon in my families case) and read it one at a time; you can all read it at once with no more cost than that of buying one book.
  • You retain all of the other Kindle Benefits
    You have portability, guaranteed ownership of books and every other positive of owning the original Kindle.

With all these benefits I was spell-wrapped, here is a piece of software that I could now feel free using for all my book purchases; but will a version be made for linux? That was my one worry. I checked with the Kindle webpage and it said that there would be a version for Windows and that a Mac version was coming soon: but nothing about linux. I could try and get the Windows version and run it under wine but I would always be doing a little bit of fighting to get it to work correctly. So I just asked them directly if they were going to produce a version for linux and this is there response:


Thanks for writing about Kindle for PC for Linux.

Kindle for PC is compatible with PCs running Windows XP, Windows Vista, or Windows 7.

We’re working on a Kindle for PC for operating systems like Linux, Mac which is expected to be available soon.

Strong customer feedback like yours helps us continue to improve the service we provide, and we’re glad you took time to write to us. I’ll send your comments to the Kindle team.

Well that’s a start (please note that that is only the head of the message; the rest looked auto-generated). They are working on a version for linux. If that is true then we may have something to hope for; if they have started work on it then all we have to do is show interest and we can hopefully see a version for Linux in the future. I for one know that I am really looking forward to it; I promise that should a version of the ‘Kindle for PC’ come out on Linux then every time I goto buy a book I will choose the Linux ‘Kindle for PC’ version first; that’s how much I love this idea.