Thomas Zander
KDE
News
Posted by Thomas Zander
 in KDE, News
 on Friday, May 16, 2008 @ 18:48

Its been a while since I introduced ‘Vng’. Vng is still under production and innovation is happening :)

As a quick intro can be read here, which will tell you that vng is a version control system made to be usable by humans.

So, what has happened since my last blog. Well, I’ve been polishing a lot. This means that I have added various options to the major commands. Like adding all files in a dir recursively to the repository. Which you really miss if you need it.
Another thing I added was a matcher. The most obvious place where this is visible is in watching past changes. The changes command will naturally list things like commit-message, author etc. Using the various matchers it becomes trivial to do some more intelligent interrogation of your repository.
vng changes --match zander #show all the records which ‘zander’ made.
vng changes --last 10 #show 10 records
vng changes --from-match 'fix assert' #Find the record with ‘fix assert’ in the message and start showing changes from there.
vng changes --to-patch 'Add.*Command' # show only changes until one that matches the regular expression.
Naturally you can combine all those without problems.

Most of these things you probable just have to try out to see how it works for you. I’m someone that really cares about the tiny details so you’ll find things like showing when you changed whitespace at the end of the line with a colored marker, or being able to type ‘vng what’ instead of the full command ‘vng whatsnew’ since, well, vng knows you must have meant the full one, naturally.

Back to the “what happened” point. I always get a bit excited when I have a tool that is just smart in visualization etc. But I actually started writing this blog for a reason;
The main complaint I have heard from people trying git on the Qt repository (specifically on Windows) is that its slow. Now, we know that git has some scalability problems on Windows, and the git people are working on that. But in my interviews with various perforce users that actually made the above claim I noticed a very different problem.
The way that perforce works is that your checkout has all files checked out as read-only. Whenever you want to edit a file you have to tell perforce. Which tells the server you are editing this file.
The effect of this is that doing a ‘p4 diff’ will first ask the server which files you have opened and then do a compare of only those files with your local copy. This is substantially different from git or darcs or many others which all use the file-date to check if you have edited a file. Using a filedate has the big disadvantage that for a repository the size of Qt (or KDE) you have to stat 30000 files if you ask your app to give you a diff. This is disk-access and thus slow.

So, no matter how much the file-access is optimized and duplicate statting is reduced, the concept of making the user keep track of which files to diff will always be faster then letting the tool auto-detect this.

This conclusion then lead me to investigate in what manner it would be practical to re-use this concept for the people that now have very good reason to complain about slowness. I mean; instantaneous diff, or waiting 30 seconds on cold caches to do a diff of Qt…
I have used my creative-Friday today to work on this in vng and have for the most part finished the implementation. I have added ‘vng edit’ and ‘vng opened’. Edit will ask the user if he wants to switch to the way of working that he has to mark files for editing. After which any whatsnew / record etc will only happen on the files that are being edited. The biggest change, naturally, is the speedup. The results will be on screen instantaneously since we already know which files are changed and we avoid any file listing or statting.
Next step is to make the perforce integration that virtually all tools have work for vng. This integration is in most editors, in diff and various other tools already. They will detect a file that is read-only and will call p4 edit on the file prior to writing out your changes. If we can fool those tools into doing the same but then call vng edit instead we get a huge speedup virtually for free.

Are you interrested in trying out vng; see vng.googlecode.com or just download the sources from repo.or.cz/w/vng.git. Note that the speedups are not in the downloadable executable posted on the projectpage. I’ll have to rebuild that one soon.

Have a good weekend!

Thomas Zander
Qt
KDE
News
Posted by Thomas Zander
 in Qt, KDE, News
 on Sunday, March 30, 2008 @ 12:55

Programming in groups requires you to use a source revision system. Its a fact; not doing it would be like crossing the north pole in your sunday clothes, it won’t be very successful. This shows; as long as people have collaborated in writing software, there have been systems to support this. I count 32 such systems on wikipedia .
Up until 2001 or so I used cvs exclusively. It did the job, more or less without loosing too much work. I started looking into distributed source revision systems, which looked a really cool idea that may give each individual programmer a lot more control over how he works, and how he can collaborate with his peers.
I went through TLA, got frustrated by the complexity, searched on and found Darcs. Fell in love quite quickly. Great idea, even better user interface. Unfortunately written in a language I never had the patience to go out an learn (haskell). Perfect romance setting, gives me what I need and I can never hope to fully understand it ;)

Darcs was started initially with the idea that a distributed system doesn’t have to be more complex to use, just different from a centralized system. I have been part of the development of Darcs to the extend of working on user interface issues, writing clear language in the UI and other simple things like that.
Darcs has its share of technical problem, though. It doesn’t scale up well. Its basically unusable for bigger projects.

Flash back to the present. It feels like git is going to be the winner in this battle of programmer mindshare; on a technical level it certainly is the best there is. It scales up without effort and it is incredibly fast. Here at Trolltech various people are already using it every day. There is ongoing research to make it the default system in KDE as well.
Git, in my eyes, is the absolute opposite from Darcs, where one is bad the other rocks and vice versa. Git is technically superior; its basically the next generation in its field. Its got more features then you can wave a stick at, and its got mindshare and active development. The bad is that its reinvented the user interface, the in-line documentation is weak. The choice of command names arcane and inconsistent. Discoverability of features is basically a hit-and-miss.
Darcs, on the other hand, has not been strong technically but it has been developing a user interface (command line) over the last 4 years that is coherent+consistent, easy to learn, has lots of textual feedback while still being very feature rich.

Now, what to do! I like parts of both, but using either gives me headaces. The sum of the parts is a negative number in this case :)

So, like any good hacker, I started a new project to marry the two components. My project, which I call ‘VNG’ uses a normal git repository and expects git to be installed but using ‘vng’ you will find an interface designed much more coherently. Darcs users will feel right at home.
The project is very much in alpha right now; what is there works, but you’ll be using git for more advanced things. (and some not so advanced things).
I did find it time to make a nice announcement and call for developers that want to help out work on vng.

A short tutorial to get you started;

  $ mkdir ~/myproject
  $ cd ~/myproject
  $ vng init

You now have a Vng repository! Let’s do something with it:

    $ touch myfile
    $ vng add *
    $ vng  record -am "Initial import."
    Finished recording patch `Initial import.'

A simple ‘vng’ will give you the help output, which I’ll just paste here as a good overview what I already have;

Usage: vng COMMAND ...

vng version 0.22 (>2008-03-28)
Commands:
  help          Display help for vng or a single commands.
Changing and querying the working copy:
  add           Add one or more new files or directories.
  revert        Revert to the recorded version (safe the first time only).
  unrevert      Undo the last revert (may fail if changes after the revert).
  whatsnew      Display unrecorded changes in the working copy.
Copying changes between the working copy and the repository:
  record        Save changes in the working copy to the repository as a patch.
  unrecord      Remove recorded patches without changing the working copy.
Copying patches between repositories with working copy update:
  push          Copy and apply patches from this repository to another one.
Administrating repositories:
  initialize    Initialize a new source tree as a vng repository.

Want to help or try vng? The sources are on; http://repo.or.cz/w/vng.git
Either send me patches or upload them to the ‘mob’ branch (which requires no password) on repo.

Looking forward to your flames! :)

Thomas Zander
KDE
Posted by Thomas Zander
 in KDE
 on Wednesday, March 26, 2008 @ 11:51

We have just passed the Easter holidays, which I spent quite relaxingly. And its been so cold I could go snowboarding last night, just outside of Oslo. Awesomeness!
Less then a year ago I lived in The Netherlands, where going snowboarding after work is basically unthinkable. I certainly don’t regret moving :)

Today is document freedom day, the idea is that you try to educate your peers and friends about the cool things that a document format based on open standards can bring. At first I was bit wary about the idea. I’m not much of an evangelist, myself.
Seeing that embracing change, like me moving to Oslo, can bring so much unexpected advantages and really just make you feel better that’s also very cool. And something I’d like to share with others.

With the OpenDocument Format it is possible to open your document in different applications, and on different platforms. So you can work together flawlessly with Windows and Linux users, some of which use KOffice, others use OpenOffice or one of the various other tools out there.
Having websites create documents you can read is also very easy to do. I remember when some webapp tried to generate xls files, it required the server to start excel for each user that tried to download the xls file with his data. It should be obvious that this doesn’t scale very well. If there were more then 10 people trying to download their data, it would take 10 minutes already.
Using the open document format instead would have allowed using a simple library to create such a document, and there are quite some already available for usage. No need to have a whole office suite installed, everyone can, and does, implement this open standard.

So, for everyone, go and evangelize the usefullness of open standards and the freedom that this gives developers, user and companies to get a richer selection of products to choose from and do more with less.

I’m sure that others found very different advantages to using and depending on ODF. Please share them in the comments!

Thomas Zander
KDE
News
Posted by Thomas Zander
 in KDE, News
 on Saturday, February 16, 2008 @ 13:47

Its been some time since my last blog; I’ve been quite busy and didn’t have a whole lot of time for KDE/KOffice and other fun things. I have been following Norwegian courses in the evenings and the little spare time I had left went to doing non-computer things. (Snowboarding is even more fun if its just an hour travel)
I’m slowly getting back to having time again for fun computer things, and I’ve been working out some ideas, among others a human-friendly front-end (not graphical for now) to Git.

One question I’ve had from several people was where they could actually find this Kids-Office stuff I blogged about a little while ago.
The thing is; KOffice2 is very modular and you can take away the default dialogs and dock-widgets and enable alternatives on a per-user basis.
In practice this means that if you have run any alpha version of KOffice you would have already had the kids-office components on your computer, just not on screen.
So, here the 3 step list of how to turn your KWord into a kids-friendly-KWord;
1) Start KWord from a KOffice2-alpha release (or current svn).
2) Go to the Settings menu, submenu ‘Dockers’ and disable all dockers.
3) In the same menu; enable the “Format” docker.

I am fully aware this is not really user-friendly and could do with some usability features. I’d love to have a kids-kword icon that started KWord with the above configuration. But, yeah, there are a lot of things I’d love to see ;)

I have not been the only one that has been off the web for some time; and I was very happy to get back in touch with Evangelia Berdou. She graduated late 2007 with, which to me is some successstory of how FOSS affects real lives. Some may recall that she conducted research a few years ago on certain aspects of KDE, including a survey of KDE e.V. members. Her thesis, which is titled: ‘Managing the bazaar: Commercialization and peripheral participation in mature, community-led F/OS projects’ is now available online. The thesis used GNOME and KDE as the primary case studies.
You can download a copy  either from the MIT F/OS paper repository (PDF) or from her website . The latter provides some more details on the overall context of the research. The chapter that presents the analysis of the data from the survey of the KDE e.V. members is Chapter 6.
I mostly read the paper some time ago, and I already realized how fast KDE moves, the research uses a lot of data that after the KDE4 cleanups are not really accurate anymore. I have the suspician that the core argumetns are not really affected by that, though. I understand she is really interested in hearing what the community thinks of her research.

I promise more coherent rambling for a next blog ;)

Comments Off
Thomas Zander
Qt
KDE
Painting
Posted by Thomas Zander
 in Qt, KDE, Painting
 on Friday, January 04, 2008 @ 12:55

You have to admit it; you started reading this blog and fully expected a new years greeting. But HAH; I won’t do that in a blog. Find me in real life and I’ll add a hug or handshake to match. You know you want one!

Ok, with that out of the way, I want to talk about something that I find pretty darn exciting. Honestly, I think that a lot with KDE4 apps, they all have such very smart ideas. Well, this one is a bit different. I blogged about page sizes some 8 months ago, in that blog I said that I finished a feature that allows you to have a different page size for each page. There was just one tiny little detail that I forgot (for various definitions of forgetting); you need to be able to actually print those pages for this feature to come to its fullest potential.

I already blogged about me adding a method to QPrinter set a custom page size for printing. And that works great; but after implementing this stuff in KWord I found that it was not enough. I got the funny result that the page sizes for all pages were equal to the last set page size. Close, but no sigar.
So, over the holdays I spent some time reading up on the PDF spec and figured it was a simple bug that I could fix with some effort. The bugfix is in 4.4 and KWord can now honestly create proper PDFs with the pagesizes as you expect them. Some testing also showed that portrait/landscape *just works*. So I’m confident that a lot of new users are going to be happy with these capabilities.

While reading the PDF spec I noted that we can use some extra pdf tags to do things like bleeding better. We already do bleeding and it and probably *just* works for the majority of the printshops, but software can always get better. I’ll reserve that for Qt4.5 though.

As talking about graphics kind of makes a screenshot mandatory; here you go:

Page size pdf

For the printer or printshop owners; here is the PDF itself (its uncompressed for debugging purposes) The pdf (pagesizes).

Thomas Zander
Qt
KDE
News
Posted by Thomas Zander
 in Qt, KDE, News
 on Wednesday, December 19, 2007 @ 23:25

Its almost Christmas 2007, and some months ago I moved to this country where I actually have a proper chance of having a white Christmas. Its already pretty white, really. Mostly due to being quite cold, not so much due to snowfall.

As you may know I’ve been working on my favorite OpenDocument implementation for some years, enjoying myself and pushing for this open format that allows information access for all. I’ve also been a member of the Technical Committee of the OpenDocument format, for quite some time now. Which proves to me its really an open standard, its cool that a lone coder that I was back then can have a vote in deciding the direction of the format.
So, you can imagine that I was pretty happy that just a couple of months after I moved to Oslo that my country of origin decided to have ODF as its official standard, stating that any MS format was not good enough.
Now imagine me laughing like a mad cow (with a party hat on) when I read the news today that Norwas, my new ‘home’ country, did the same!

Just a couple of days ago I looked out the window at work and noticed that, actually, its a pretty stunning view; so I think I can continue the trend that I have seen various people set to post a picture of “what I see when I’m not actually working” :)

Snowy view

To all, have some great holidays and I wish you a fantastic 2008.

Thomas Zander
KDE
News
Posted by Thomas Zander
 in KDE, News
 on Sunday, December 02, 2007 @ 13:34

I’ve been told that all good things come in 3s, and maybe they didn’t think about a tree when they said that.. So I had to try this out and here is the result; here are 3 great things I found recently that I wanted to share with you.

The OpenDocument Format specification is created and approved in English. This is the common way to do things for international standards for many years. That doesn’t take away the fact that a huge chunk of the computing world doesn’t read English and that makes it harder then needed to interoperate with others around the world in standards that are meant for exactly that purpose.
Therefor I’m delighted to see a mail being sent to the ODF-Technical Committee list announcing a Russian translation of the specification itself.
The fact that a group of people took the time to do this without being commissioned by OASIS (the owner of the standard) is just another sign to me that ODF is really shaping up to be a really open and global standard.
Announcement here

KDE4 is at this time mostly a platform, we have some really really cool cross platform technologies that are added, like solid for hardware detection and Phonon for sound, Decibel, Nepomuk and Flake are all really cool technologies that allow people to build upon for years. But you hardly see anything in the press about those, you only see something about Plasma.
And I can see why, things “just working” when you remove or plug in some audio device or even a simple network cable is not that interresting :) In real life we call things ‘pettability’, which is why people like furry dogs better then pigs. The computer equivalent might be called “showability”, or simply “Ohh, shiny”.
So, to add to the hype here is a great little gem that was created by a friend of mine; Fifteen pieces.

On a more serious topic there was a blog a week ago on the topic of software patents, this blog post takes the approach to take an honest look at the arguments that are in favor of software patents. I learned a lot by reading this, definitely something that everyone that enjoys software in some way or another should read;
In “defense” of software patents:

    Patent advocates, large successful businesses, and politicians are so enthusiastic about the patenting of software that it’s hard to accept arguments from people like the FFII and Free Software Foundation who claim that the software industry simply does not need software patents and would be far better off without them. In this article I’ll try to explain why software patents are necessary, and in the sake of fairness I’ll look at the other side of each argument. Here is the “defense of Software Patents”. I report, you decide.

Greetings from Oslo, waiting for snow :)

Thomas Zander
KDE
Posted by Thomas Zander
 in KDE
 on Sunday, November 18, 2007 @ 15:22

Yesterday a big fog came in at around the evening hours. No, not the proverbial kind that comes after too much drinking (not doing much of that anyway with these Norwegian prices), real fog that feels clammy to the skin. I was down town, some blocks from sea and I couldn’t see the end of the street. Granted, that was a pretty long street, and there might have been some corners too. Point is; even back home, the weather is cold and sad. I don’t mind cold (too much), but sad weather makes me forget I actually have to get out of bed in the morning.

So, today is a day for staying inside. I put up a fire in the fireplace (awakened the boy in me!), and decided to write something for my blog. Which you are reading right now.

Watching the flames dance around the wood, scarring and ultimately consuming them, I’m doing some thinking and I’m actively ignoring the still foggy weather outside.

It has been almost 3 months since I left The Netherlands for Oslo/Norway. I found a new apartment (at an amazing location, even!), got a whole lot of new colleagues and friends, felt (well, still do) a little homesick because my father fell ill, and I can’t just go over to visit. Well, you know, the usual stuff for someone moving abroad.

It is fun seeing the simple differences between Norwegians and Dutch people. Last week I got asked in a restaurant what I wanted to drink. I ordered a cola and the lady immediately replied that they only had Pepsi cola. Did I still want a cola. Naturally I said no. In Holland I had the opposite happen to me various times. Actually I feel a more at home here in Oslo then I ever did in Enschede ;)

Yesterday I went to a market called “Bondensmarked”, or, in proper English; farmers-market. One thing I found since moving is that food is a lot more cultural then you’d at first expect. Bread is made very different in different countries. Germans buying bread in Holland will call it “fluffy”. I’ve been looking but can’t find various kinds of stuff you put on your sandwitch that I was used to having in Holland. Things like “vlokken” or “appelstroop”. But my worst experience so far is the Cheese situation.

Another Oslo-visiting guy already blogged about the situation once, and I can only agree. You can actually buy lots of foreign cheese in the average supermarket. But they tend to be English or French cheese. Which are more snacks then something you use in your cooking (though I’m sure some people do. Weird people are everywhere!). The guy that thought it was a good idea to call some kind of caramel candy “brune ost” (brown cheese) did a huge disfavor to the cheese movement.

Ok, I’m drifting away from my story here. I mean; the next guy creates a chocolate bar and should call it “brune ost-2″? O, right, the Bondensmarked…

Yesterday I went to a market called “Bondensmarked”. There I found a Dutch farmer that lives in Norway and uses the traditions from The Netherlands and he sells his cheese there. I talked a bit in Dutch and said how sad I was that my cookings tasted quite a lot more bland and simple without having access to good cheese.
I went ahead and got myself a piece and was about to shell over the 65 nkr for it. He then took it away and said he’d make me a special piece.
After that he cut a piece that was at least 4 times as large! Thanks for that!!

I guess he had experience with this already since I have been eating little pieces of this all morning, I hope it will last till the next market day…

My cheese situation has basically been solved totally, and I’m looking forward to making that lasagna I wanted to bake ;)

Thomas Zander
Qt
KDE
Posted by Thomas Zander
 in Qt, KDE
 on Saturday, November 10, 2007 @ 22:18

Lots of goodness has been happening with the Open Document Format. Well, not the format itself, that has been an ISO standard for some time and that kind of implies it gets a bit boring. Fileformats being boring is, much like in governments, a good thing. Boring means stable. And we need a stable Foundation. (bonus points to the people that got the reference ;) )

Like South Africa Adopts ODF, German Foreign Office comes out in favor of ODF and there are various articles going over how Holland and Belgium are steadilly switching governments but also schools over to ODF.

More close to home; my favorite OpenDocument Format implementation KOffice is based on Qt and version two will be released after Qt4.4 is out as 4.4 is going to bring a lot of improvements for it. I’m working through some of the features that we see in ODF which are pretty advanced nice little things. As you may be aware, ODF has a very wide ranging featureset. Advanced DTP like features is not something you might suspect, but its there. This is stuff I’m currently working on.
Qt4.4 will have a new “Letter Spacing” feature. Which is described in the API docs like; Letter spacing changes the default spacing between individual letters in the font. The spacing between the letters can be made smaller as well as larger.
In typesetting letter spacing is a much used feature to manipulate a text layout. This is now available for all Qt users.

Another feature is wordspacing. Which is similar to letter spacing, except it only affects the space between words.

Finally I introduced various capitalization modes for text. A text can be turned into all-caps or all-lowercase text by just changing a font-property. The neat effect is that you don’t have to actually change the text to get all characters to appear in uppercase or lowercase.
A special capitalization mode is “SmallCaps”. Smallcaps is a typigraphical technique used to put more emphesis on a piece of text without making it look like its screaming.

btw, if any of these features sound familiar from the css spec; thats entirely possible since ODF just mirrors a lot of the CSS features. No point in re-inventing the wheel, right? Naturally in ODF they are made with print-quality text in mind. Qt4.4 will support both without problems.

Thomas Zander
KDE
Posted by Thomas Zander
 in KDE
 on Saturday, November 10, 2007 @ 14:08

Last night I had a very interresting discussion in the pub about how we, as people, affect the world and how much of what we do actually makes this world a better place. While V. is more the person to go the the poor countries and help out there with nutrition and such basic-human-needs, I have been more looking at the higher levels of the pyramid of needs.

Deep discussions aside, education is what I believe is a basic human right that all people should be able to get. At a fairly early age I loved playing on the computer. At school we had a computer that we connected to a set of lamps and sending a byte to the parallel port made the lights turn on/off based on the bits that are set or unset.
I’m pretty sure that this helped me thinking in binary code for years to come (very useful skill in computer science).

Education can be playful, if we design the tools to be playful. Children book publishers learned this lesson ages ago, but computer general-purpos software has been lacking.

One of the tools that children (and grownups too!) use everywhere is a tool to enter text into a computer. At trolltech I work together with some of the coolest and smartest people I know to make sure that the text engine is the best it can be. We want people writing in Hindi to use this as well as people in Norway, so there is a lot of complexity there to allow for all the different writing styles known around the world. (more about that in my next blog)
At the same time children will not really care about 95% of the features you find in a typical word processor. They, even more then most people, want to be shielded from all that complexity.

Some years ago the idea came up to fork KWord and refurbish it to be more stripped down, and have simpler and bigger buttons. The effort was applauded by many but in the end didn’t really work out. It was a great heads up and I took it with me for the next generation of the applications.

As I’ve been working on KOffice2 high-level design I had 2 user groups in mind, the lawyers office and the Kids “office”. The two extremes that I wanted to be able to both have a real use for KOffice. In the last days I finalized a plugin for KOffice that is targetted directly to the “kids office”.
I reused the artwork that was created for the kids-office by Dannya well over 2 years ago and ended up with a simple replacement for the more complex standard interface. I hope that kids, and many parents, will appreciate this new user interface.

The simple-text plugin, like all other plugins can be enabled/disabled (or simply not be installed) for people that want a certain look. This makes it possible for one application to be used by all users in the market. The more the user needs, the more plugins he enables. Or in the case of our educational setting we disable most plugins and hide the default dockers.

Feedback is naturally appreciated and I certainly hope that educational distros or just schools will install KOffice2 with their modifications to the default to make it perfect for their target audience. This is what I call user power!
Who is the first to start a new page on the friends of KOffice wiki to write how they use or want to use KOffice in educational settings?

Screenshot here;
Screenshot