• Skip to content
  • Skip to link menu
KDE für deutschsprachige Benutzer
  • KDE Deutschland / Interview
  • Kontakt
 

Anwendung des Monats April 2008 - kdirstat!

Mark Ziegler hat Stefan Hundhammer via Mail über KDirStat befragt.

Das wirklich lesenswerte Interview wurde in Englisch gemacht und wird aufgrund des Umfangs nicht ins deutsche übersetzt.

Stefan, you're the maintainer of KDirStat. Please let us know who you are and how you started with the KDirStat project?

I am Stefan Hundhammer, born 1965-12-28, studied Computer Science at the Fachhochschule ("University of Applied Science") Nürnberg 1986-91. You can see I am not one of those youngsters who usually come to mind when you talk about the average Open Source developer.

I have been working for SuSE since 10/1999. SuSE Linux 6.3 was the first distro I was working on. I have been working on the YaST2 user interface ever since, both the abstract UI-independent layer and the Qt UI. I was not part of the initial YaST2 architecture and design, though.

Before my SuSE times (1992-99) I worked for a small software and hardware company in Erlangen. Most of that company worked as a contractor for big companies like Siemens, Philips and Lucent, but our small part of it (12-15 developers, depending how you count) developed our own product: A document management and archiving solution targeted at large university clinics.

Client-server systems being en vogue back then and MS-DOS/Win-3.11 being Microsoft's state-of-the-art system (remember: early 1990s), Unix systems running X11 were the only reasonable approach to what we needed. We chose SunOS (later Solaris) and OSF/Motif in C for our application.

We had two major university clinics as our pilot customers, and they helped to cover the development cost for the system, albeit just barely. Our boss promised us to hire sales and marketing people to get sales going so the product would provide a steady income for us all.

Only that never happened. We kept making custom add-ons for our pilot customers all the time, which consumed most of our development resources. As the years went by, we found that what once we had begun as a product to sell to a lot of customers was increasingly becoming a project for the very specific needs of our few pilot customers. A major refactoring of the software would be required, otherwise technology would pass us by on the fast lane while we were still struggling with technology that was by then pretty outdated - OSF/Motif. See also http://tinyurl.com/2ertuz

So we looked for alternatives and found Qt which we really liked. We knew we would have to dump a lot of existing code and rewrite it with Qt and C++. But we also knew we would never have the time, peace and resources to actually do that. So our entire team of (by that time only) 6 developers decided that we liked to work together as a team.

So we decided to join another company - as a team. Luckily enough, that time (1999) was the beginning of the dot-com boom. So we joined SuSE as a six-people software development team.

Our old boss was not happy with that, but then we had kept insisting that we needed to sell our product, too, and for that we would need sales, marketing, and also some support people. We used to have none of all that, having been a pure subcontractor company all the time.

We were told that at SuSE we would be working on the then brand-new SuSE graphical installer, YaST2. Knowing we would work in a slightly different environment with slightly different tools, we used the remaining time to get to know those new tools. So I chose to write a simple KDE program. Such a project includes handling the development environment (autoconf/automake), as well as Qt and C++. Qt and C++ was not completely new to me; I had written some prototypes for our great rewrite (that never happened) before.

The simple KDE program became KDirStat. The first version was little more than a graphical "du". There had been a program "kdu" before, but that one was very minimalistic, only calling /usr/bin/du and dumping its output to a Qt window. Very minimalistic, but polluting the KDE namespace - "kdu" was thus a used name. I had to choose something different. So I came up with "KDirStat" (admittedly a somewhat awkward name) for "KDE Directory Statistics".

I had always wanted such a program on our Sun machines (later PCs running Linux) in our old company. We were chronically short of disk space, so we were constantly looking where we used up all that expensive disk space (look at the Sun price lists of that time and you'll know what I mean). We had to use plain "du" or the "advanced" method: "du | xdu". (see http://xdiskusage.sourceforge.net/ for a screen shot of that advanced technology). I always hated it.

So KDirStat was born because I always wanted such a program, because there was none around yet that did what I wanted, and because I wanted to experiment some with how to write a KDE program.

It wasn't long before KDirStat learned not only how to display where all your disk space has gone, but also how to recover some of it: The clean-up actions.

Who else should be mentioned when we speak about KDirStat? What was their job within the project?

There were some people who did minor contributions (translations and the occasional patch for little fixes), but there was only one beside me who actively developed on KDirStat. For a short, but hectic while, that is.

In early 2001, I came across SequoiaView for Windows which introduced tree maps to visualize disk space. I instantly liked the idea. But I found that I missed the classic tree display KDirStat provides. So I toyed with the idea to combine both into one application - KDirStat as you know it today.

I was very busy with other things at that time. In summer 2001 Alexander Rawass approached me with the same idea: Integrating tree maps into KDirStat. He was very enthusiastic about it, and he kept sending me patches. At some point I moved KDirStat to SourceForge and gave him CVS write access.

He wrote several very interesting tree map implementations in different shapes and sizes. Unfortunately, I still didn't have very much time for KDirStat. But I tried to answer his questions as good as I could and otherwise let him experiment.

At some point we discussed how to integrate it all. His tree map part (by then moved to a separate library he called QTreemap and also moved to a separate SourceForge project) was not integrated at all into KDirStat, and it was very slow. Upon startup, KDirStat would open the usual main window and also another (larger) window for the tree map. That tree map window was empty and grey (and in the user's way) all the time until all directories were read. Then it would take something in the order of 30-60 seconds (!) to render the tree map. Yes, roughly a minute. Too slow. And poorly integrated. Not what you would call software mature enough for actual use.

We did not find agreement about it. QTreemap stuck out like a sore thumb from KDirStat. And it hurt like one. At some point, the build requirements became so confusing that it was really difficult to get it all to build.

By that time, Alexander Rawass was off to higher goals, bringing the glory of tree maps to all the world in all kinds of ambitious projects. And KDirStat was stuck with an extra window that was in the way and that took ages to get rendered.

I was not happy with that situation. I decided to throw it out and rewrite that part from scratch. That's what I did when I finally found time for it half a year later. Today's KDirStat tree map view is a subwindow in the main window, nicely integrated with the tree view: A click in one view automatically selects and displays the same file or directory in the other. And rendering the tree map is in the sub-second magnitude - negligible for the average user.

To my knowledge, there is no more of Alex's code left in KDirStat. I rewrote it all.

Lesson learned? I will be very cautious to let any over-enthusiastic student change KDirStat. I will be the benevolent dictator of KDirStat, but a dictator nonetheless. Democracy is only a good concept if your people is here to stay to bear the consequences of any drastic action. ;-)

Is KDirStat your first project, or have you started earlier with another work for KDE? Are you working on other projects?

KDirStat is my first and sole KDE project. Even though I have some ideas for some others, I simply don't have the time. I prefer to do one thing right rather than starting a dozen and never live to see a conclusion to any of them.

I have been working on YaST2 and thus another very visible project (which by now is also Open Source by all definitions I know) all the time, though. Some of the people reading this might know me from the SuSE/Novell Bugzilla. ;-)

In which language is KDirStat written and how have you developed it?

KDirStat uses very explicit language. But since I wrote it in Germany, that should not be a problem. Those who easily take offense are on the other side of the Atlantic ocean. ;-)

All kidding aside, of course KDirStat like most KDE projects is written in C++. All code, names and documentation are in English, of course, so an international developer audience could easily join in if they so chose.

Recent versions also include a Perl script KDirStat-cache-writer which does the same directory scanning KDirStat does, but writes the results of that to a cache file that can be read by the KDirStat application. That way, you can scan a large file server with a cron job over night and then visualize the results with KDirStat during normal office hours without diminishing the server's daytime performance. But that version is still in development.

As for how I developed it, I am using plain Emacs and a shell. I am not a big fan of large IDEs. I have yet to see one that gives me so much more value over using Emacs that I would consider to switch.

For work style, I am a fervent believer of think first, then specify, then code. After weeks and months of having an idea in my head I begin with writing the header files, writing function declarations and -- most importantly -- documenting each one. I never start programming a function until after I documented in the header file what it does, what its parameters are, and what it returns. That always paid off for me. As a nice side effect, this also creates documentation you can read months later when you have no clue what that thing does.

I see so many examples of poorly documented code everywhere. Reformatting the header file with JavaDoc may be nice, but frankly I could care less about the colorful formatting if there is no content -- not a word what a function does or what its parameters mean.

Since many years KDirStat offers very stable versions. What yould we expect from the future? Or is KDirStat complete?

The immediate future will see the cache file feature mentioned released as an official stable version for production environments. The current CVS version can also use cache files named .KDirStat.cache.gz written by the KDirStat-cache-write script as they are found in a directory tree. That way you can dramatically speed up scanning directories that seldom change.

Excluding directories is another feature that is almost there. The current CVS version can already exclude a .snapshot directory that certain backup software creates. That feature will of course become a lot more general, allowing the user to specifiy exclude rules (directories only, not down to the level of individual files). Of course you can still let KDirStat read an excluded directory upon a mouse click, just like continuing reading at mount points.

Multi-selection for clean-up actions is the single most requested feature for KDirStat. Unfortunately, this will require a lot of changes since KDirStat internally only has the notion of one selected item. Any volunteers? ;-)

What do you think about the KDirStat windows clone "WinDirStat"?

I like it. Actually, I immediately felt flattered by it. To my knowledge, KDirStat is just about the only KDE program (maybe even the only X program) that was cloned to the MS Windows world, not the other way round.

Since KDirStat is GPL and in parts even LGPL, it is perfectly legal to make a clone for that Other system. But since WinDirStat is also Open Source and GPL, it is also perfectly moral and appropriate to do such a thing. And the port was nicely done, too, even with some bells and whistles KDirStat does not have. Yet. ;-)

For those of you who read my rant about that misguided Chicago Tribune article last summer: That was intended against that journalist who didn't bother to do very basic checking where his URLs pointed etc.; as is (sadly) the case with many journalists who get to write computer related articles every once in a while, he got confused easily. He meant well, though. But there is also that saying that "to mean well is the opposite of to do well"... ;-)

Politicians, economists and software developers are heatedly discussing the subject of software patents in Europe. What is your point of view here? How would you personally be affected by software patents?

Software patents are evil. Ever been to any Open Source convention where Richard Stallman talks about it? He has a point there. But then, he is driving that point home again and again for about 45 minutes where, 5 minutes would have done easily.

Would software patents affect me? Hell, I don't know. But then, that's the point of all that discussion: You can never know. Until some US lawyers sues you. Then good luck. If you don't get sued, you'll never know if it won't happen in the near future. You only know if you are paranoid once they got you...

This year's KDE summit will take place in Glasgow, Scotland. Will you attend the meeting?

I don't think so. I am not very much involved with the KDE community. KDirStat is basically a one-man project. It doesn't need to stay that way, but so far nobody has approached me to contribute.

And had you already the chance to meet some fellow KDE developers in real life?

Working at SuSE in Nürnberg, I know some, of course: All the KDE developers working for SuSE like Adrian, Coolo, Dirk Müller, Beineri, Will, Duncan, (I hope I didn't omit anybody - my apologies if I did). I was at Akademy in Ludwigsburg for a day so I met some more people there.

Why do you help KDE?

To make this a better world, of course. What did you think? ;-)

I am one of the early adopters of KDE. I really believe it is the best desktop compared with all others I know, in the Linux/Unix world as well as on other OSes (yes, MacOS, too).

KDirStat is my little contribution to Open Source in general and to KDE as a free desktop in specific. It's a lot less than I get in return with all the other great software I am using on a daily basis.

Are you being paid to work on KDE?

No. Not one cent. I write KDirStat in my private time, not while being paid by SuSE. This has the advantage that I can choose when I want to work for it, and that I don't have any fixed milestone when to be ready with what feature or bug fix. That would take all the fun out of programming. Frankly, I have enough of that in my full-time job working on YaST2. ;-) I use KDirStat as a kind of stress reliever when I need to get creative in all the zillions of change requests and bug fixes I have to do for YaST2.

How much time do you usually spend on KDE?

That's hard to tell. It comes in surges, not on a constant basis. When I feel bored over the Christmas holidays, KDirStat may get a new major feature. When it rains during my summer vacation, too. If the summer is nice and sunny, bad luck for KDirStat. ;-)

Do you have any plans for KDE 4?

At some point I will port KDirStat to KDE-4. Since KDirStat uses only standard features of KDE and uses POSIX system calls otherwise, I don't expect any major problems. I can't tell anything about the time frame, though.

Which UNIX/Linux distribution do you use for your work and why?

Take a guess. Hint: I am employed by SuSE.

Let us know a bit more about you.

Personal Questions: First things first. Married, partner or up for adoption?

Lone ranger. Without the obligatory cigarette, though. ;-)

Which book is on your bedside table?

All in the English origninal versions: Terry Pratchett, techno thrillers, W.E.B. Griffin. Used to read a lot of SF, but not very much of that recently. Sometimes some Fantasy, but not too much.

Lord of the Rings, of course, though I admit the topic has been somewhat over-used recently with the (really great) movies.

Is your best friend from the physical or online world?

Physical. Definitely.

How would you describe yourself?

Actually, I would avoid describing myself. Ask the people who know me. And don't believe everything they say. ;-)

What do you do in your spare time?

Spare time? What spare time? Are you kidding? ;-)

SuSE R&D is some kind of large apartment-sharing community. Only the common living room are the pubs and beer gardens around the company. We spend a lot of time there together.

I also discovered digital photography for me some years ago:
http://www.suse.de/~sh/new-photos/
http://www.wasserwacht-marktschorgast.de/gallerie.html

Those samples also shows some of the places I like very much, including my home town Marktschorgast where I am still an active member of the Wasserwacht (life guards). I spend a lot of time during summer on that lake. And guess who got to be the webmaster for that site. ;-)

I used to play flight simulators and other computer simulations a lot, and of course the occasional first person shooter ("killer games" in recent Bavarian politician lingo). That's the reason why I still have Windows on the other partition of my machine. The only reason. Everything else I do under Linux.

I also have a motorbike, a BMW K-1100RS. The countryside near Nürnberg is ideal for motorbiking, and that area known as the Fränkische Schweiz also has a lot of photo opportunities with its beautiful valleys and its many castles.

And KDirStat has to fit in somewhere between that all.

What is your favourite place in the world?

It's hard for me to pick the single favourite. I like Nürnberg a lot and the countryside around here. It's still my favourite area of the world. But then, there are so many places in the world that I haven't seen yet. Ask me again in, say, 30 years. ;-)

Anything important that we have forgotten?

Looking at the proportions of the scrollbar at the side of this window, I can hardly think so. ;-)


Stefan Hundhammer ist per E-Mail unter der Adresse sh@suse.de zu erreichen. Das Interview zur Anwendung des Monats KDirStat führte Mark Ziegler in englischer Sprache. Ins Deutsche übertragen von Mark Ziegler.

Eine Kurzbeschreibung zu KDirStat finden Sie an dieser Stelle.

[ Edit ]

Aktuell: kdirstat

Skip menu "Aktuell: kdirstat"
  • Einleitung
  • Interview
  • Beschreibung

Archiv 2008

Skip menu "Archiv 2008"
  • April: kdirstat

Archiv 2007

Skip menu "Archiv 2007"
  • April: kdesvn

Archiv 2006

Skip menu "Archiv 2006"
  • Mai: KRename

Archiv 2005

Skip menu "Archiv 2005"
  • Januar: aKregator
  • Februar: KBear
  • März: KSpread
  • April: KPDF
  • Mai: Amarok
  • Oktober: KDissert

Archiv 2004

Skip menu "Archiv 2004"
  • Januar: KuickShow
  • Februar: Konsole
  • März: KSirtet
  • April: JuK
  • Mai: KMplayer
  • Juli: Konserve
  • August: Konversation
  • September: Kig
  • November: KAddressbook
  • Dezember: KPilot

Archiv 2003

Skip menu "Archiv 2003"
  • Januar: Quanta
  • Februar: K3b
  • März: Kover
  • April: KSirc
  • Mai: KsCD
  • Juni: KMail
  • Juli: Karamba
  • September: Kile
  • Oktober: Kolf
  • November: Digikam
  • Dezember: Kickpim

Archiv 2002

Skip menu "Archiv 2002"
  • Januar: KNotes
  • Februar: KOrganizer
  • März: Kate
  • April: KView
  • Mai: KTouch
  • Juni: KSteak
  • Juli: Ark
  • August: KShisen
  • September: KNewsticker
  • Oktober: KCron
  • November: KWord
  • Dezember: KSnapshot

Archiv 2001

Skip menu "Archiv 2001"
  • Oktober: Noatun
  • November: Karm
  • Dezember: Kppp

Archiv 2000

Skip menu "Archiv 2000"
  • Oktober: KJukebox

Global navigation links

  • Startseite
  • KDE Accessibility Startseite
  • Beschreibung der Navigationstasten
  • Back to content
  • Back to menu

Suche:


Betreut von kde.de Webmaster
KDE® und K Desktop Environment®-Logo sind eingetragene Warenzeichen von KDE e.V. | Impressum