Split personality

One thing I miss good support for are the different roles or identities in which one works in the virtual worlds. If one uses the same computer system for her work, her private stuff, and her FLOSS activities, she might want to hold all the data and settings apart. So her working fellows do not need to see her love letters floating on the desktop, or her friends all the secret business documents. Her soccer club mates should not be able to send instant messages to her when she is in a presentation. But then they might when she is doing boring calculations on her own, so joined roles are usefull, too. And then even subroles are usefull, e.g. when working with a business partner, who should not see his competitors in her addressbook.

Now how to map this to the user and rights system of unix? Does not look very good. It’s really time some more capable concepts get into mainstream FLOSS operating systems by default, with proper support by application(framework)s. This is 2006, not 1970. For now I use different accounts for the different roles. Still better than nothing. How do you cope with this?

As the existing support in KDE for concurrent X sessions is not too comfortable (for me), I have been experimenting with a special session applet, which tries to offer access to everything around sessions. It shares some base libraries with the contactsapplet, and yesterday I updated the applet code for the changes in those libraries.

switchsession.png

If you are interested, take a look at
KDE-Look, or check it out from trunk/playground/base/sessionapplet in the KDE repository.

Hello Planet KDE!

So I have become a kdestrial, too. Thanks Chris for planetizing me. 🙂

DokVok IconI have been in the outer spheres of KDE since 1999. That year I did my first GUI app ever, and having had been already fascinated by that free software system called Linux, I did so using KDE/Qt. Following a personal tradition with regard to new software technologies, here event-driven programs, I coded another incarnation of a vocabulary trainer, called DokVok. Sadly it did not survive the transition to KDE2.

In 2000 I joined the mailing list kde-look where a lot of interesting ideas and concepts were discussed. Like intensive usage of metadata for files, realtime collaboration on documents, etc. After some years the discussions pattered out, because the ideas started to repeat. They did, because the discussions usually did not yield any code. The coders did not follow our great advises, oh dear! 😉

Lesson learned: Scratch your itch yourself (Hm, is this also taught at the University of KDE?)

So I meanwhile tried to get myself into the position to scratch some of my itches:
I have been experimenting with the simplest of all editors, one for bytestreams, which in 2003 gave me an account for the KDE repository and the world the long-awaited (or not? Tss…) binary edit widget plugin (see also my recent blog entry). And as one of the foundation for collaboration is the concept of users/contacts/entities, I recently started to experiment in that field, too. Hopefully I can bring some of the results into all the activities which are already on their ways by my fellow KDE coders.

Summary: I will use the KDE part of this blog do give some of my views on ideas and wishes around a better virtual desktop and how it could be done perhaps by KDE. I will also report the results of my experiments and hope to get some nice discussions. So if you are interested, stay tuned 🙂

It’s about Contacts

Do you know finger, talk, write, who, etc.? You could if you had gotten in contact with unixoid computing systems. With the concept of client and server, multi users, sharing resources, connected systems, and collaboration were part of the system. Those only things everyone knows from this (ancient) world are the hypertext system called world wide web and emailing.

While with the introduction of the personal computer (PC) and it’s dumb operating system (DOS) those programs did not make it into everybodies computing experience, the concepts behind are now having their reincarnations, thanks to the internet. People are turning their personal computer into (fat) clients for servers on the internet. They register an account in the service system and start to cooperate with the other users in the system. E.g. chat and presence systems like ICQ etc.

There is not one system, but several, incompatible. In protocol, services, and account data. This is good for protection against too easy monitoring by third parties, but inconvenient also for an innocent user. She needs to know all different accounts of her friend and map them all into one data set in her mind/local addressbook. One for the email system, one for the chat system, one for the file system, one for the phone system, one for the postal system, and so on. Sometimes even more than one for a system. Alright, we are used to that for ages, thanks to the postal and phone system. But we are not used to the boost of the new service types, with new address types and entries. Where in the addressbook mask shall the user add the image gallery account of her friend? Where the feed address of the video blog? How to support these systems and their possibilites from all programs? And what to do if the support for systems is switched, like Olivier Goffart proposes?

Obvious solution (for me): Support for specific systems should not be hardcoded in contact managing/using programs. I found out about this when coding a contacts menu for kicker. Instead all the different systems need to be supported by plugins. Plugins, which deliver components for the display of the system specific address type, for the display of the status within the system, for the editing of the address, for the action services, and perhaps more. Adding some MVC to the recept, and the programs are quickly adapted to new systems, given a specific plugin for it.

So a contact card view like the following would display a set of strings and icons, without knowing about the addresses and states behind. The controller would, in reaction to LMB and RMB clicks on the entries, perhaps show the services’ display strings in the menus and call them based on id strings, without knowing what they really cause:
Contact card for Konqui

Another view could be a contact icon, which sits on Kicker, shows icons of the current state within the systems with an account for, and offers all available services, e.g. for a drop of several files, like this:
Drop menu for files

How much code there is behind these claimed-to-be mockups? Well, investigate yourself… 😛

Fun with KHexEdit

One project in KDE I work at are modules for binary editing. This is the one project that brought me to programming inside KDE. Those times I was working at a viewer for executables and libraries (stalled soon), for that I wanted a widget for displaying bytes. Looked at KHexEdit, but found nothing that could be cleanly ripped out and be reused. So I started to code a widget from scratch.

That was 2003, and when that year I joined the KDE crowd at the “Kastle” conference, I applied to have it included inside kdelibs. That was rejected, as obviously only a few programs need a binary edit widget 😉
Still those, e.g. the general database editor in KPilot, did not want an extra dependancy on a third module like kdeutlils, home of khexedit and the new widget lib. So the concept of plugin loading was applied, adding some interfaces to kdelibs and loading the plugin dynamically at runtime.
Pro: no bloat of kdelibs, in the case of the khexedit widget at least due to headers only ;).
Contra: a little more complicated code due to dynamic loading and calling of interface methods.

The good old KHexEdit program from Espen Sand was never changed to use the new widget, as I planned to write a completly new program from scratch. Well, planned, never happened for the complete span of KDE 3. The KPart I did for binary viewing of all files e.g. in Konqueror was brought offside by setting it’s service mimetype to octetstream, because it started to appear as fallback view part for all mimetypes without a special installed handler, like flash files embedded in html pages. And this did not look good for some. In fact there is a flaw in the kpart loading system, but that needs some deep thougts, so the easy way was to banish that viewer. Well, no big loss for the world, I guess. And KPilot stayed the only program to my knowledge to use that widget plugin, oh yeah. Since recently the new debugger plugin for KDevelop done by Vladimir Prus is using the binary widget, too, but I have not yet seen it in action. So, not a lot did happen to the widget for more than two years. Chances are you do not even know about it.

Now, with KDE 4 in creation, I started to work again at it. Already ported the binary edit widget library completly to Qt4 and current KDE4, all working fine (except for crashes in D’n’D, which I did not yet have a look at). And more, I am tackling the construction of a successor to KHexEdit again, projectname “Okteta”. It will be the playground for some concepts for program frameworks of mine, like controllets/toolets or repository style of working at documents/models. Nothing of this yet commited into SVN, though. I am very curious what will come out of this 🙂

A month ago Simon Hausmann blogged about
“Fun with QTextEdit”, being able to have multiple views of the same QTextDocument with Qt 4. Well, I can (now) have the very same fun also with a byte array and binary views:


// qt specific
#include [QSplitter]
// kde specific
#include [kapplication.h]
#include [kmainwindow.h]
#include [kcmdlineargs.h]
// lib specific
#include [kbytearraymodel.h]
#include [khexedit.h]

using namespace KHECore;
using namespace KHEUI;

int main( int argc, char* argv[] )
{
  KCmdLineArgs::init( argc, argv, "Example","","","" );
  KApplication app;

  KByteArrayModel sharedArray;
  sharedArray.setReadOnly( false );

  KHexEdit *he1 = new KHexEdit;
  KHexEdit *he2 = new KHexEdit;
  KHexEdit *he3 = new KHexEdit;
  he1->setDataBuffer( &sharedArray);
  he2->setDataBuffer( &sharedArray);
  he3->setDataBuffer( &sharedArray);

  KMainWindow *mw = new KMainWindow;
  QSplitter *verticalSplitter = new QSplitter(Qt::Vertical);
  QSplitter *horizontalSplitter = new QSplitter;
  horizontalSplitter->addWidget(he1);
  horizontalSplitter->addWidget(he2);

  verticalSplitter->addWidget(horizontalSplitter);
  verticalSplitter->addWidget(he3);

  mw->setCentralWidget( verticalSplitter );
  mw->show();

  return app.exec();
}

Things are moving forward 🙂

Hello world!

Welcome to my experiments with blogging. Having got in contact with the internet in 1995, then setting up some webpages, sending some posts on the usenet and “talk”ing cross the world, the only thing I have been staying with for the time following was doing email and browsing other’s websites, and that ever increasing. The last three years that has been changing again, I got friends with the wiki concept very quickly, and only recently I started chatting (Jabber), yeah 😉 Never been on an irc server, though. VoIP is something I want to get into very soon. So far for my history in communication on connected digital systems.

I want to use blogging to formulate some thoughts and ideas about developing systems, mostly in software. To have me thinking a little more about it, and perhaps to get some reflections from others than my ego 🙂 As I practise development a little by doing some coding for KDE this blog will also be used to present some projects I work at and their state. And perhaps even some personal things, if I feel the need to…