Out of time, out of composite

Gah this so sucks….I really can’t find the time to do any serious coding. With vanRijn bussy coding for vmware and [ade] doing java magic this seems to mean that kpilot is bleeding to dead at this moment. Currently I’m bussy with some master courses which don’t only consume a good deal of my time but also of my energy.

However I did write some small tests for libplasma, even fixed a small bug and have another test in the running. Those are not too hard to do and even inspire some people. I hope to commit some more in the near future.

Some people seem to think that the web is lazy and that it’s time for the web to get to work. So…. let me add to the workload then. LazyWeb could you please inform me about this issue I have with the Composite extension of X? I have KDE4 compiled with Composite support but it seems that only the X instance at X :0 has composite enable. When I start a new session (let’s say at X :1) it doesn’t have dri and composite. The strange thing is that the new instance makes use of the same xorg.conf file so one should expect that it loads the same modules and stuf. I have an intel 915GM.

p.s. Aaron cheer up mate, I really appreciate all the work you do for KDE4

Posted in coding | 8 Comments

Some ideas about XML.

For a project I work on so now and then I work a lot with several XML standards like XSLT, XForms, XML-Schema and XHTML. I mostly use <oXygen/> XML Editor and XSLT Debugger for this. However this is a commercial tool and I don’t have a license for it so I’m not able to use it at home. It came to me that it’s really a shame that there isn’t an open source tool (at least I didn’t found it) for working with XML with the same quality. I think that this is really a shame because XML is a technology we shouldn’t ignore. In fact, we don’t ignore it because we use it in KDE in several places already, like in the KConfigXT framework and to describe user interfaces. Not only on the desktop XML is used more and more but a more important field (I think) is that of the service oriented software components, where XML makes it really possible to create loosly coupled software components which can be combined easily.

For a long time now I’ve been thinking that it would be really cool to haven a *really* good XML editor. Some features i’d like to see include:

  • autocompletion when given a schema or dtd
  • An editor which creates a skeleton of obligatory elements given a schema or dtd
  • An editor which behaves as a skeleton filler in stead of a normal text editor when given a schema. With this i mean for example that pressing arrow-right moves to next attribute or element value in stead of moving a character to the right.
  • Validating the elements of a specific namespace in a document containing more namespaces (for example validating XForms elements in a XHTML document
  • Support for XSLT transformations.
  • Fill in your favorite feature here….

Kate does offer some plugins for XML but they’re very basic in my opinion. As you see I started thinking about what I want, I even created an *very* (*very very*) rough sketch with some ideas of what might be needed at first. I really like to hear if there’s somebody out there with the same (or similar needs) and comments about the sketch. (Please keep in mind it’s really a first sketch not a serious attempt to lay down a complete design for a XML-Completion library.

Klik to enlarge:


A first very rough sketh for a XML completion and validation library.

Posted in coding | 8 Comments

Clean, finally clean

Finally after a lot of work the KPilot gui code is finally free from Qt3 and KDE4 support. I think that the porting did introduced some issues which needs to get solved. However the major part of the job is finished right now.

The problem I had with the QListWidget seems to be a bug in Qt. They reacted quite quickly on my bug report so lets hope that the issue is fixed soon. Now the porting is “finished” ™ I feel a bit obliged start working on more complicated things…. *sigh* more thinking. We still haven’t syncing categories solved out yet in the base conduit. We want this get done before we start porting the other conduits. I hope we can solve this out soon (yes vanRijn this is a hint =:), so that we can start working on the other conduits.

Posted in coding | Comments Off

Study, KPilot and weird selection behavior.

Time to make some noise again. My master courses are absorbing a good deal of my time at the moment. Not that this is in particular a bad case because they’re quite interesting. I’m doing a software architecting course for which we have to write an architecture document. This is quite fun to do, I really feel like an architect. Every iteration the architecture gets a more clear shape. From a vague vission in the beginning to an architecture which must be able to hold up for a year or twenty. I was quite surprised that there actually exists such architectures. The prof came up with some examples from the industry. This also made me wonder if and by whom software architecting is done in the freesoftware world. Drop me a message if you have some examples of it.

Another course I have is called advanced webtechnologies. This one is about the world behind search engines and searching in large amounts of linked documents in general. On the semantic web and on webservices. It was the first time to hear a bit about the inner parts of Google. One part of this course is to do a related project. I took this as a opportunity to take a look at QtJambi and eclipse integration. I was quite surprised by the ease of use of it. Also having the good things Java brings combined with the qualities of Qt is a very nice to have. One disadvantage is that eclipse became quite slow even on a 2.8 GHz machine with 1GB of ram.

I might not have had the time to blog in the meantime but I did see the change to work on KPilot a bit so now and then. We’re steadily working to get things done. There are quite some issues to solve yet. As a follow up of my summer of code project vanRijn and I are looking into a better way to do category syncing, which seems to be quite a complex problem. We’re also looking into a good way to detect at synctime if the previous sync failed or was done on another pc. And when I’m braindead I try to clean up the GUI code. This mostly means moving GUI code out of sourcefiles and create appropriate ui files for it. It’s quite a lot of work to do this, which I didn’t expect on first hand. Currently I have an issue with the {Q|K}ListWidget. I’ve set it’s viewMode to IconMode but it has some problems with selection behaviour. It doesn’t always unselect the selected icons. Maybe I do something wrong but it feels like a bug to me. To conclude this blog I’ll show you a pretty picture of this amazing selectionbehavior =:).

Oh as a sidenote, it’s extremely cool to read that the next Akademy will be in Belgium. This raises the change significantly that I’ll be able to attend.

Selection error in QListWidget

Posted in coding | 2 Comments

New study season started

Our holiday seems long time ago already. We had a great week, relaxed a lot, read a lot and did some nice walking and cycling tours. Short impression. However that was two weeks ago already and between now and then the academic year of our university has started and I’ve had the first lectures already. One of the courses is new and seems pretty cool. It’s called advanced webtechnologies and it’s about modelling the web, the properties of such models. It’s also about pageranking algorithms so it promisses at lot of fun stuff. Cool lectures have one disadvantage, they take time. Reading the material for the lectures takes even more time and the labcourses will take a lot of time also…. *sigh*. But in the spare time that remains I’m still hacking on kpilot. Currently I do a dull job. Mostly because I don’t want to think much when working on it and besides that after 8 weeks or so coding on the base conduit I don’t want to see that thing anymore for a while. Sorry vanRijn =:). I’m cleaning up the code in kpilot/kpilot. It contains a lot of Qt3/KDE3 support stuff which I want to get out. This mostly means moving UI stuff into UI files. If that was done earlier a lot of porting stuff would be a lot easier I think. Most of this is easy and well documented in the Qt documentation. However I now have a small annoyance which I can’t solve with a QTableWidget. This is what I get when I run the program:

However in Designer I’ve set the table headers to something different.

 

As I did not yet receive the book of Johan Thelin I won, I hoped someone could give some hints on this.

Posted in coding | 8 Comments

Committed revision 702504.

That revision is actually the finishing touch for my GSoC project. It contains the last work that was needed to get syncing of categories done. Now we have a fairly complete base framework and a working conduit for gnukeyring. At least for the version 4 databaseformat. I’ll not go in further detail here because vanRijn did that quite well in the last commit-digest. There are a couple of things left to wrap up the project, like the final evaluation and uploading the code to the google website.

Now the project has finished I really like to thank Google for making this possible. First of all it was a great way to get deeply involved in open source. Although I already was contributing to KPilot, this project gave me much more insight in the code then I ever had before. Working on open source isn’t be about the money in the first place for me. However, it was really great that we got paid for this. Otherwise I had too look for some other job (which most probably would be some dull cleaning job or so) because I really need to pay my study and the rental of our house and so.

Of course I also want to thank Jason “vanRijn” Kasper. He has been my mentor for the project and I only can say that he did a great job. It was him who insisted to have a long design period which was one of the best moves we did together in the project I think. Besides his technical skills and knowledges of the KPilot source he was always around in irc to cheer me up, or to use his whip to make me work harder. vanRijn thanks a lot, it was a real pleasure to work with you! I hope that much fruitfull years of collaboration will follow.

Last but not least I’d like to thank the KDE developers community. You’re a bunch of very helpfull guys and it was always a pleasure to hang around in #kde4-devel.

So what are the plans now? First of all I’ll take a week holiday next week. I’ll go with my wife to campground at Mechelen. When I’m back my study will start so I won’t be as active as I was this summer. But I’ll keep hanging around and keep continuing work on kpilot as much as I can.

Posted in coding | 4 Comments

Farewell Gentoo, hello openSuse

Yesterday was the big day. After a package update of my Gentoo system, which took way too long anyway, libexpat seemed to get an update also. What’s the deal? I see you think. Well that there where around 35 packages which linked to it and needed to get recompiled. *Sigh* and that after hours of waiting to get the update finished. So I started revdep-rebuild and wanted to do some development underwhile. Not possible! about every app I needed was linked to that lib so i had to wait while my system was completly unusable for that time.

Ok that was it. I was tired of all that waiting and besides that I needed a new harddrive anyway (had 40G, now 160G weee!). I figured out that this might be a good moment to try another distro. After some threads of vanRijn I decided to go for openSuse. Because I don’t have an dvd burner I did the network-install-dance. This went quite ok except that http sources didn’t work for me. After waiting another half a day I had a ready-to-use opensuse system. With some extra nice goodies working out of the box which I coudn’t or didn’t try to install on Gentoo.

Drifting away from Gentoo made me think about it. It came to me that I use Gentoo as long as I use linux. I started using it when I started my bachelor degree in software engineering, 5 years ago now. It has some very nice qualtities. For example the docs are outstanding for starting Linux users. There’s a lot of documentation on their official website and besides that there is a wiki which contains another bunch of usefull information. Also the user base is quite helpfull in the forums. I also liked the possibilities of useflags and splitted kde packages. Install only what I need and also install only the parts of the installed software you need. Quite cool, I’m gonna miss that. However waiting hours to get your system updates is just not what one wants (at least I don’t want that anymore). Also the developer community is something I dislike, or at least the way they communicate with eachother. They should become more aware of the fact that not only devs, but also users read their mailinglists. However I’m gonna miss some of that devs a bit! Yes guys I read your weblogs all that years. No hard feelings, just time to move on.

Now I’ve copied my mail and stuff back, set up a kde4 development environment and actually compiled (*sigh* does it ever end? =;) I should be able again to get some work done.

So farewell Gentoo and hello openSuse 10.2!

Posted in coding | 42 Comments

Run Keyring…… run!

Wooohoo! After a lot of fidling and fudzing with bytes, the pilot-link classes and the KPilot classes I was earlier this day finaly able to create a new database for the Keyring conduit. But even better was that my little creation just ran for the first time as a real conduit. Although a lot of polishing is needed, it seems that the first rough implementation doesn’t crash and actualy syncs some information. What for sure works is the reading and decryption of the database on the handheld. This is a good thing because it’s the first time I actualy tried a database that is created with the keyring application on my handheld. Of course there is a lot to fix before we have a completely working Keyring conduit for KPilot, but i’m very glad with the results I have now.

One of the issues I have is with the wallet system. To open a wallet a window id is needed and I don’t know what the right way is to get the right window id. First I tried this:

WId window = qApp->activeWindow()->winId();

But that didn’t work quit well. activeWindow() returns a 0 sometimes. Asking in #kde4-devel dfaure told me that it indeed isn’t a good id to use this. He told me to use widget->topLevelWidget()->wId(). However in the conduit code I don’t have garanteed access to a widget. After a bit looking in the Qt docs i found: QApplication::topLevelWidgets() but the problem here is that I get a widgetlist with 5 items or so and I don’t know which WId is actualy from KPilot. I tried to print the objectNames and the windowTitles of the widgets but they are all empty. Any help on this would be appreciated.

Posted in coding | 11 Comments

QCA enters kpilot

<edit>First post on plannet. Hi planet! I’m the guy who’s doing the kpilot summer of code project.</edit>

A lot of work happened since my last blog. The base conduit is in a pretty good shape already. It has a nice testsuite which test a lot of important cases. I started working now on the keyring conduit. First I had to read through the keyring code and some sample applications to get some idea how the data is encrypted. I discoverd that there are two database versions for the gnukeyring application. The latest stable has version 4 and the latest beta has version 5. The most important difference is the encryption methods used. For now I decided to go for the stable version.

This lead me to investigate on how to encrypt/decrypt the records. My first plan was to copy as much as code as possible from the J-pilot keyring conduit. But this lead very soon to troubles because it uses OpenSSL to encrypt/decrypt the records. Thiago pointed me to QCA which resides in the kdesupport module. After some wrestling with it I got it decrypting and encrypting a keyring database. I have to say that (like the rest of Qt api) it’s a very nice library. Quite easy to use and only a couple of lines of code to do the job.

On of the things I encountered with it is that it’s not very well documented (or I didn’t read well enough) that when using QCA::SecureArray you must have a QCA::Initializer object. If there isn’t such an object you’ll get segfaults and if you don’t know where to look it’s quite hard to find out why. Another thing is that a QCA::SecureArray gets cleared when the QCA::Initializer object gets out of scope. Safety wise this is a good thing, secret data gets whiped out from memory. But it makes it a bit hard to pass QCA::SecureArrays to methods without losing the overview when an array gets erased. It took me some time before I discoverd that I was trying to decrypt records with an empty key, which of course was not valid. However, things are going quite well now, if you want to see QCA working take a look at the Keyring conduit.

Other news: I won a Qt book =:). And it’s quite nice to see vanRijn and [ade] working on kpilot.

Posted in coding | Comments Off

It’s a complex world

It seemed that I was thinking that the world was less complex then it really is. *Sigh*. How could I? I was discussing some code with vanRijn and we came to the conclusion that I over simplified Records. I was thinking about records as entities which have an Id, some fields and a value for each field. This is still true but…. What I wanted is something like this:

syncFields( Record from, Record to )
{
    QStringList fields = from.fields();
    QStringListIterator it( fields );

    while( it.hasNext() ) {
       it.next();
       to.setValue( it, from.value( it ) );
    }
}

A same sort piece of code I would use for checking the equality of two records. This would be really nice because it would mean that implementing classes could be really simple. Even this sort of things (syncing fields and checking equality) could be done at top-level. However things are a bit more complicated then I thought. The address book conduit serves as an example here. The address book on the pda has place for five emails, phones, fax etc. So when you ask phones() from a hand held record you can get one but also five phone numbers. And also you won’t know at which place which number is stored. So just walking over fields from both sides won’t work here, and of course checking equality suffers the same problem.

Now I abstracted both methods, syncFields() and equal() but that means a lot of work on the test cases again. So….. let’s fix that.

Posted in coding | Comments Off