Thursday, September 18, 2008

digging in the dirt

"When a person puts their hands in the soil, they become connected to the world around them."

That was a word of wisdom I received from a mentor while working in his garden on a hot summer day. The underlying message was that being connected is something everyone needs, and so even if we can get by without getting our hands dirty we should do so anyways so that we don't lose our way and our place in this world.

This was a big lesson for someone like me: even as a child I often found myself living up in the clouds, thinking about big ideas in abstract terms. I found that the clouds were a beautiful place to be and should be visited as often as possible; but I also learned that you also need to till the soil to make the time spent up in the heavens worthwhile. Getting above the clouds releases your vision while putting your hands in the dirt below them keeps your values rooted and your foundational goals clear in mind.

While working on Plasma and "big thinking" stuff in and around the FOSS world (though to be honest, my "big thinking" stuff is a rather insignificant piece of the whole), I often find myself dancing up on the clouds: service oriented architectures that bridge local rich client software with "the cloud"; mixing in social/semantic systems with familiar user interface concepts; building a universal canvas that, like some demented Katamari ball, picks up support for everything in its path (Superkaramba, Webkit widgets, Dashboard widgets, Google Gadgets, Enlightenment 17 foundation libraries (Edje) ...), improving the workflow of collaborative design by simultaneously decoupling the disciplines and coordinating them (the whole DataEngine<->Visualizaiton<->Theming thing) ...

But not every day is like that. =)

Some days I get to look up to the sky and see the bottom of other people's feet. Today I got to watch Marco due some killer work on making the widget handles gorgeous (based on a mockup done by Nuno previously), the new PowerDevil stuff continue to mature (the battery widget can now control my screen's backlight! woo! ;) and Christian Mollekopf work on improving libtaskmanager with grouping and sorting ... while I worked on some rather unglamorous stuff.

Today was my turn to work the soil.

I merged Christian's libtaskmanager branch for a start. He's added a way to define sorting and grouping strategies for set of windows that allows one to create visualizations of windows, such as the taskbar, in fairly powerful arrangements. The strategies currently include sorting alphabetically or manually and grouping by program or manually. Other strategies can easily be added as well, and visualizations that use libtaskmanager can immediately take advantage of them without changing any of their code. The new work also more clearly separates the presentation of tasks from the management of them, in traditional Plasma form. Wonderful!

The tangible benefits of this are that we can provide a proper sorting and grouping taskbar without much additional effort. We will even be able to provide manual sorting and grouping, something people were asking for way back in KDE2 even. It's something I personally have no use for (I like the computer to do things for me, because I'm a lazy bastard with clouds to dance on), but I'm glad we finally have a good architecture upon which this is built on.

If things go as planned, Alain Boyer will be providing a Plasma::Service to interact with tasks so that widgets can take advantage of the controls provided by libtaskmanager without getting into the C++ world within.

Christian's libtaskmanager work builds on the work of Matthias Elter (holy KDE1 and KDE2 flashbacks! =) and Richard Moore (who is still very alive and involved in KDE to this day). It was Richard, if I recall correctly, who had originally the foresight to create libtaskmanager from code pulled out of Kicker's taskbar so we could share logic code between different visualizations.

After mergin Christian's branch, I spent much of my day cleaning headers, fixing licenses, straightening out APIs, organizing classes, removing old stuff. Lots of janitorial work, in other words.

One old thing I removed was the support for the non-composite-derived window thumbnails. This was something Richard added so we could have thumbnails in Kasbar (and eventually the kicker taskbar too, though). It was implemented as an embedded screen capture program: request a thumbnail for a window and a screen grab of the window would be taken and then resized. I remember playing with this in Kasbar years and years aog and thinking how cool that was! Slow and not perfect, but cool! How far we've come: now we have compositing window managers and KWin drops live previews directly into whatever window it is told to: fast, beautiful and cool.

Given our "no silly hacks" rule, Richard's feature felt the edge of the ax blade. It wasn't being used by any code in svn anymore anyways, and it keeps the API fresh and clean but still ... I could feel my nostalgia chord being tugged upon. =)

I then turned my attention to the Plasma tasks widget with an eye to performance issues. We were updating things far too often and the new Plasma::ToolTipManager which is responsible for those fancy floaty feedback windows when you mouse over things like the clock and taskbar buttons (written mostly by Alexis who just recently went to work for Qt Software) wasn't helping either. So I spent the rest of my day fixing ToolTipManager bugs of various sorts, adding code to TaskManager::Task to communicate precisely what has changed to the visualization and making the tasks widget take advantage of all that.

The result is that instead of updating every tooltip, including the ones that aren't even being shown, and every button every time the associated window changes in any way .. we only create and update the visible tooltip and only update the parts of the button that have actually changed. The tooltip improvement is the big win as that was a complex set of object allocations, assignments and deallocations, and if you had something like "only show tasks on this screen" turned on .. well .. it was happening for every few pixels you dragged the window. Holy moly! Thankfully it's pretty efficient code, but doing nothing is still more efficient than doing something efficiently.

There were other things I got busy with in between as well, little weeds in the garden that I stumbled upon while tending the plants, if you will. But that was pretty much my day .. and it felt great. Simple, accomplishable tasks with immediate benefit and practical use.

After a couple weeks working more in the stratosphere, I feel re-connected with the reality of what we're doing and a little less lost-in-the-clouds. Not to worry ,though, I'm heading back skywards tomorrow.

7 comments:

maninalift said...

Cool, I am particularly pleased with the tool-tip rationalisation. Not that I had noticed a performance problem, just that the knowledge that it was doing pointless work sort of bugged me (like you I'm concerned with the abstract beauty of things).

A word of advice: Don't forget the literal meaning of your mentor's words. It's easy to forget the important and powerful impact of being amongst nature. Take off your socks and shoes and run around in a wood, and/or bury your feet in the mud and/or jump in a river.

tonyskilton said...

This is what I love about OSS development.
The people making the big decisions are also the ones "getting their hands dirty"
I love KDE, I've been using KDE3.x.x for a few years now simply because it's brilliant, hugely configurable and rock solid stable.

And now we have KDE4.
It's currently running here on all my machines
(including my old rather clunky file/print/dns/http server)
and is shaping up to be absolutely phenomenal!
Yeah, there are issues. most notably the nvidia driver problems but I guess I'll just have to wait for the nvidia dev's to get their arses in gear before enjoying the eye candy at it's best.

To sum it up, I recently changed the Distro installed on my girlfriends laptop from Kubuntu Hardy to openSuSE 11
(YaST over ssh makes my life easier) ;)
And her comment was "don't bother with the windows partition thingy" (her words not mine)
"Linux is just easier and looks nice"

Coming from a pretty much completely new pc user that's gotta be a good thing.

I suppose I just wanted to say a huge thank you to yourself and all the KDE dev's for the amazing work you guys put into KDE4.

Cheers.

T

P.s I know you guys have taken a lot of flak on various forums and blogs, a lot of people have been posting troll like comments all over the place but keep up the good work! There are people who appreciate what you do, they just aren't shouting as loud. :)

maninalift said...

If my last comment sounded negative, I really didn't mean it to. This is really great stuff. I recently changed to openSUSE to keep up with the SVN more easily (looks like KDE 4 is working out well for openSUSE, with the number of switchovers I'm hearing about!) and it's great seeing (and using) the daily improvements.

Sébastien said...

tonyskilton said "
And her comment was "don't bother with the windows partition thingy" (her words not mine)
"Linux is just easier and looks nice"

Coming from a pretty much completely new pc user that's gotta be a good thing.
"

+1 here : building ours new pc a last month, I said to my wife I going to install your windows a bit later. she answer: why, Linux will be just fine.

kde4 helped a lot in this and be sure she love kde4 (and kbounce :P)

parena said...

Ah nice. Not that I use tooltips, but maybe I'll start using them in 4.2 ;)

I had already seen the handle bar on plasmoids post and they really look great (check the ogg video, not youtube).

It's great to see all this activity from you and everyone else. If only I could get my hands on some good documentation how to write plasmoids, I could port my trailertracker and perhaps dbKalendar superkaramba themes.

Meanwhile, I did have to repartition a bit on my wife's brand new MSI PR-200 notebook (keep Vista, shrink the data partition), but that's because "just in case", since she'll be using her notebook voor university as wel. On the other hand, apart from the partitioning, she managed to install openSUSE 11 almost on her own. :)

Kragil said...

You need a middle name or you just won't fit in:

http://www.lazytechguy.com/2008/09/prominent-public-figures-in-open-source.html

B-)

illogic-al said...

Why is it that whenever I read your blogs I get inspired to do something. Moreso when I actually speak with you online. I've been doing a lot of "unglamorous" things lately whilst trying to get os x packages of KDE built so I feel that I can relate to what you're talking about. It's a dirty job but somebody's got to do it. And if I know how, well, that somebody's going to be me then isn't it? ;-)
I also get this tinge to start coding something after reading some of your blogs. Nothing fancy mind you. Something everyone will be able to benefit from but I'll never get any real recognition for. A solid backend for OS X is currently floating through my mind. Maybe I'll even try to do it. Then I'll be able to use my mtp devices in Amarok :-D
Ah well, this is getting a bit long but I just wanted to tell you "Thanks for all the encouragement" and that that little chat we had on IRC has brought me out of "retirement". At the moment any work I do on KDE'll only benefit the Mac folks, but who knows what the future may hold.
Inspiration is a funny thing, eh?