Karmic Матрёшки

December 12, 2009
Karmic Koala Матрёшка

Karmic Koala Матрёшка

A couple матрёшки I painted at a Russian culture event a few weeks ago.  I started with a koala, and the penguin was suggested by a non-geek, as well as the fox (not pictured).

Kubuntu 9.10 Released!

October 29, 2009

After another 6 months of hard work by all the Kubuntu, Ubuntu, and KDE developers, Kubuntu 9.10 the “Karmic Koala” has been released!  There have been improvements in many areas from appearance to translations to network management to a general solidifying of the KDE 4 platform.  See the release announcement for new features.

Kubuntu 9.10 Screenshot

Kubuntu 9.10

Thanks to all the developers!  Go download! (preferably via BitTorrent)


September 30, 2009

I’ve been watching TV a bit recently (It’s stage 3 of dealing with the trauma of not having homework anymore.) and I keep seeing this date pop up, with a little girl talking about “happy words.”  It seems Microsoft Windows 7 is coming out soon.  I’ve heard about it here and there, but it didn’t really register that the next version is coming in just under a month until I saw the commercials.

So far I haven’t heard anything bad about the upcoming windows release, which is quite a contrast to the months leading up to Vista.  I looked around their website and there’s some interesting stuff, but nothing revolutionary.  Nothing important we haven’t got, or will have soon in a better form.  And it still has that nauseating default theme from Vista.

This makes the timing of the Kubuntu Karmic release very interesting.  It really seems like this should be the big faceoff.  A lot of good things are coming together for Karmic.  KDE 4.3 provides a smooth desktop experience with a lot of little annoyances fixed.  Finally most networks work (again) out of the box.  Legacy KDE3 things are finally gone from the CD.  It would be amazing if Kubuntu Karmic was the release you could pull out at the same time as the brand spanking new Windows 7 and blow away the competition.

And it’s close, but it’s not that release.  It’s just the first release where most of the KDE 4 desktop has come together, but there are still some issues to fix, polishing to do, and a couple core apps need to stabilize.  Another 6 months.  Concidentally, Lucid 10.04 is also the next LTS.  Perfect timing to really bring all the pieces together and make a polished release that will put the proprietary competition to shame.  I’m really looking forward to Lucid.  The drama would just be so much better if it was 9.10.

On Kubuntu hating

September 27, 2009

Lots of vague comments lately on how bad Kubuntu is compared to distro X.  What I am seeing is a lot of whining and not a lot of doing.  These comments aren’t coming from a nontechnical audience (they are, at least, following Planet KDE) or from people who just want to rat on Kubuntu.  They are on KDE developers’ blogs by users and developers many of whom claim to use Kubuntu as their primary OS and at least some of whom are interested in seeing Kubuntu do well.

The core Kubuntu team is small and we do our best to keep up with blazing fast development in all parts of the distribution.  In order for everything to come out as polished as we all would like, we need more community participation.

So, to the commenters: you are using Kubuntu because you think it offers some advantage over other options, but clearly there are some holes and rough edges so, if you see a problem — do something about it instead of whining. This is open source.  Use that little bit of programming you learned to fix a paper cut[1].  Write up a better project summary and feature tour for the website and send it to us[2].  Test a CD image.  Create a new website theme[2].  Help us sort out bug reports.  Run an alpha release on your extra machine.  Talk to a developer to debug your problem.  At the very least, file a bug[3].

And this isn’t the dreaded “send patches or we’re not talking to you.”  If the complaints amounted to something we could actually ask for a patch for, that would be progress.

[1] Contrary to popular belief, Kubuntu IS participating in the 100 papercuts project, and some bugs have been fixed.

[2] There was a contest for a new website a while back, but almost noone participated.  I find it hard to believe there aren’t a bunch of people out there who think the website could be better and know web design.  So help out!

[3] In Karmic, go to Help > Report Bug… in any application.

More Impressions of C#: 3.0

September 12, 2009

The topic of this post is basically: lambdas are awesome.

C# 3.0 introduced lambda expressions with type inference and a set of generic delegates in the .NET framework.  That means you can do this:

event Action<string> MyEvent;

MyClass.MyEvent += (s) => { doStuff(s, 5) };

The => operator defines an anonymous method (lambda) taking the arguments on the left to the statements or expression on the right.  Types can be specified, but don’t have to be — the compiler can infer them, in this case from the event type.  Note that it takes exactly one simple short line to define an event, and one simple short line to connect it.  There is no redundancy or boilerplate code, and the function handling the event does not have to be written specifically for that purpose.  Sweet.

The above is roughly equivalent to, in PyQt:


self.connect(someObj, SIGNAL(“myEvent”), lambda s: doStuff(s, 5))

In Qt with C++, you would have to define an extra method if you just wanted to pass an extra argument like this.  There are of course many other uses for lambdas.  One new use in C# 3.0/.NET 3.5 is the LINQ framework, which defines extension methods for common types, in particular IEnumerables that, in the simplest use, allow you to use lambda expressions to execute queries:

IEnumerable FilteredList = MyList.Where(person => person.Name == “bob”);

LINQ also allows you to write these queries using an SQL-like syntax.

The hundreds of other posts and documents online can explain it all better than I can, but finding things like this makes me like C# more and more.

Impressions of C#

August 9, 2009

Disclaimer: this post is about my recent experience working with C# and has nothing to do with the Mono debate.

Over the last month and a half I’ve been working on an application using C#, .NET, and Windows.Forms in Visual Studio 2008.  I started by learning C# (unfortunately from some outdated materials).  At first it seemed like they took the worst instead of the best things from Java and C++, but overall I’ve gotten to like the language.  Here are some of my thoughts on it, some more elaborated than others.

I like properties[1].  They get rid of a lot of clutter and allow you to do some neat things.  They also tend to much reduce people’s tendencies to use public fields.  I really like VS’s “encapsulate field” option that generates a property from a field for you.

I don’t understand the need for the internal keyword or why this is the default visibility.

I like how there are interfaces as in Java.  I’m not sure if I like how there is no multiple inheritance as in C++ and Python.  I’m not sure if I like how implementing an interface and extending a class uses the same syntax.

Generics are nice, but C# has the same historical wart as Java where the set of Collections in the system library includes old non-generic classes that are still used.

I miss C++’s consts everywhere.  No const parameters or const methods or const return types in C#.

I like how you can write unsafe code.  I haven’t actually made use of it yet, but I think this is a huge advantage over Java.

The Reflection API can be useful, but it’s not nearly as easy as Python’s getattr() & co.

String comparison with == by value is a great improvement from Java.

C# has operator overloading.  Yay.


The biggest thing C# has over Java for me is events.

Events suck in Java.  Most of the time you end up having to define a whole extra class to handle one.  Since handling an event is so tedious, they are often quite generic and you have to check the arguments for what actually happened.  The one good thing about it is it’s clear OOP with no magic.

Handling events in pure C/C++ usually involves callbacks with function pointer voodoo.  Qt provides a very nice type safe layer with signals and slots, with an almost ideal syntax, but the implementation is questionable and magical.

C# has events built into the language.  A class can have events with specific arguments and can invoke them much like Qt signals.  Events have types that identify their signatures, so it’s type safe and no magic.  However, that’s also where it gets clunky.  For every event with different arguments you need to also declare a delegate for the type (from what I understand but haven’t read into yet, C# 3.0 provides some generics to make this less tedious).  When connecting an event, you need to create an instance of the delegate.

In addition, .NET requires that all events take two arguments: a sender object (nice!) and an EventArgs object with the rest of the data (yuck!), which makes the whole thing almost as bad as Java.  But without that restriction, which is only for compliance with other .NET languages, it’s almost as nice as Qt signals.

Unfortunately, as with many parts of C#, there are some restrictions on how events can be used that make the language seem incomplete and/or don’t quite jive with what seems like sensible OOP.  Only a class that declares an event can call it, not a subclass.  Events are null if there is nothing connected to them, and you have to check for this.  The race condition implied there is quite disturbing, but I don’t think I’ve run into a problem yet.  In most cases, to workaround both problems, you have to declare a separate method that does this check and invokes the event, which makes the whole thing again more tedious and clunky than it should be.

Events seem to be objects.  They have a type and operators.  But you can’t just use them as objects, can’t pass them around.  An event is basically a delegate with stripped down functionality and this stripping down is built into the language, which seems rather wonky.  Of course, the only reason I would want to do any of these things is to work around problems in Windows.Forms.  Also maybe because I’m spoiled by python where everything is on equal standing as an object.

Limitations and Warts

In addition to the problems with events, there are some other limitations I’ve run into.

virtual keyword: This is one of the aforementioned carryovers from C++ that is not in Java that I don’t undersand why it was brought back in C#[2].  There is probably a good technical reason for it, but API-wise it’s just annoying.

Name hiding: C# allows you to create members in subclasses that hide (no polymorphism) rather than override base class members.  The language has the “new” keyword to do this, but does not require its use.  I think most of the time hiding methods like this without polymorphism is just asking for trouble, and the keyword seems almost useless if it is not required.  The compiler does give a warning when you hide something without using new, so I told VS to report those warnings as errors.

You can have type constraints on generic arguments, but for some reason this type cannot be an enum.  It also can’t be object, which, while redundant, seems like a rather arbitrary limitation for a language to make.

I expected C# enums to be fancy like Java’s, but it seems despite being derived from a class, they’re mostly limited to C++ enums.

Extension methods are neat, but why aren’t there extension properties?

I have yet to explore lambdas (C# 3.0), but delegates as anonymous methods seem a bit clunky sometimes.

Unsafe code in C# seems like it could cause a whole new set of problems other than those in C++, since everything is allocated on the heap and objects are managed.  There are various keywords to deal with pointers to data residing in objects managed by the VM, but it seems like the combination is just asking for trouble.

Overall, while it has its sometimes strange limitations, I rather like C# and it sure beats Java.  When/if I get to writing unsafe code, I’ll see how it really compares to C++.  .NET, Windows.Forms, and Visual Studio are another story, but this  is getting long enough so I’ll leave them for another post.

[1] I wish the MSDN site would work in Konqueror, but I’m not terribly surprised.

[2] Supposedly C# was based on C++ and not Java, but I find this hard to believe.

Oxygen icon set for OpenOffice.org

June 11, 2009

One of the things we discussed at UDS (for the third cycle now) is dropping everything KDE3 from default Kubuntu.  In Jaunty we got a new NetworkManager applet.  k3b is on its way.  The blocker for Karmic is OpenOffice.org KDE integration.  Well, work is underway on a KDE4 file picker.  That leaves icons — time to make OpenOffice fit in visually, at least a little.

Problem is the OpenOffice.org icon set has over 7000 files.  Most of them are named something like this: lc03241.png (that’s the new presentation icon, 32×32).  Fortunately most of those icons are for various obscure things, including images for the help and some pixmaps for easter eggs (anybody know how to get into some sort of starfighter game in OO.o?).  With existing Oxygen icons and a couple free days it’s possible to get a couple nice looking toolbars in Writer:


Unfortunately that’s as far as it gets with existing artwork.  The Oxygen team is only prepared to create office suite icons when the various office suites agree on an icon naming scheme.

UDS Days 2-5

June 10, 2009

I never got around to more blogging during UDS, but here’s a summary of the rest.

We had a discussion with Canonical’s Rick Spencer about the role Canonical’s desktop team is or should be playing in Kubuntu and how to avoid problems we’ve had in the past.  Conclusion: communication communication communication.

Then there was a session on Wine integration and what to do when a user clicks on a windows program.  Will need to keep up for Kubuntu.

We had a session on QA in Kubuntu.  We discussed how to avoid major problems we’ve had in the last couple of cycles and how to improve our QA process in general.  There was also a separate session about l10n problems.  The interesting thing that came out of this is a plan to have a feedback plasmoid on the desktop during the development cycle so we can pick up on problems quickly.  We also decided to expand the use of the Apport bug reporting tool and crash handler in Kubuntu.  The QA team has some neat plans for this tool, some of which are already being implemented, so hopefully the overall quality of bug reports will keep improving.

We had some discussions about the default IRC client and web browser for Karmic and came up with features we’d like to see in our options.

Several of the KDE guys and I sat in on a session about the messaging applet.  It really helped us understand what the Ayatana team is going for.  Sebas then showed off lion mail, which is similar in some ways, and several productive sessions kicked off regarding how to create a messaging indicator for KDE that both follows the DX team’s vision and the KDE way of doing things.

Riddell showed off some of the social web plasma applets available and we decided to include one or two by default in Kubuntu Social from the Start.

There was a session about what we need for KDE integration from Ubuntu One.

We had a session discussing the Kubuntu web site where we mostly talked about how much we like the Xubuntu website.  We came up with some things we can improve on the site, but most importantly, DESIGNERS WANTED!

There was a session discussing creating a way to create a bootable USB stick in KDE, and work is underway.

The last session I went to was on Canonical desktop and usability team’s “Death by a Hundred Paper Cuts” project.  The project will find and try to fix a hundred seemingly trivial usability bugs each cycle.  Neat!  We won’t get the benefit of the professional user testing on the KDE side of things, at least not during the current experimental stages of the project, but maybe we can start a similar initiative?

On the social side, we went out to a bar to watch the European soccer championship game, Barcelona vs. Manchester.  Quite a time and place to be in Barcelona.  Friday night was of course karaoke — barbie girl and bohemian rhapsody KDE style, and some other umm.. good shows.

UDS Day 1: LoCo events, apport, and Kubuntu plans

May 26, 2009

Improving LoCo events

After introductory talks, the first session I went to was a community session on improving LoCo events.  Considering we’re in Spain, the MA LoCo was overrepresented with both Martin and I there.  He has a good writeup on the discussion.

Apport Adoption

There were two sessions on increasing apport coverage and adoption.  The adoption session mostly concentrated on getting users to file bugs using apport rather than directly through the launchpad website.  The main thing I took away from this talk is that it was unfortunately irrelevant because Kubuntu/KDE apps don’t use appport for the report a bug feature.  This is the correct way to file a bug in Ubuntu.  TODO: update the Kubuntu version of the documentation.

KDE 4.3 vs. Ayatana

There was a session where sebas presented the KDE system tray plans to Mark Shuttleworth and Canonical’s DX team.  There was a lively discussion as to how that complements or conflicts with the Ayatana desktop experience project and what that project actually entails.  The topic is controversial, but the practical question was whether it is worth implementing the message indicator planned for Ubuntu Karmic for KDE.

Kubuntu Development and Packaging

We had two sessions to plan Kubuntu Karmic that were somewhat productive.  For the most part we just affirmed the points on the specs page.  Discussion is still ongoing about the default IRC client and web browser.  We are determined to get rid of KDE3 libs for Karmic, and are really hoping for KDE4 OpenOffice.org integration in time.  Those who have looked at it so far were baffled by the codebase, so we need some help in this area.

The day ended with dinner with the Kubuntu guys and girl and Albert, a local KDE developer of Okular and poppler fame.  He showed us to a nice restaurant, and I think everyone really enjoyed the meal.  I should have forseen the delicious but small main course though.

UDS Day 0: Coming to Barcelona

May 25, 2009

Left at 7pm.  Went to sleep at 10pm.  Slept an hour.  Woke up at 5am.  OK, so this is only my second time, first in 4 years, flying east.  Got some very tired first impressions of the city as I got off the bus: Plaça Espanya – wow! down into the subway, with luggage… whatever happened to escalators?  Finally made it to the hotel in the afternoon.

After finally taking a nap (about 9-11am EDT) I went into the city, to Plaça Catalunya and La Rambla.  I walked around there for a few hours, down the Rambla, along the waterfront, and through the little alleys.  I especially like the labyrinth of alleys.  There are all kinds of little shops and cafes and backs and fronts of churches and street performers in random places.  I ended up at the Catedral de Barcelona purely by accident.  The cathedral is quite magnificent inside though unfortunately it’s undergoing renovation on the outside.  I could probably spend days more just wandering in that area.

My sense of time was completely thrown off as I was walking around, not just by the jetlag, but also by my habit of using a cellphone for a watch.  The cell doesn’t work here — it doesn’t even give me the time.  So I walk around time-blind — it’s a rather strange feeling, and makes it all the more difficult to eat the right meal at a reasonable time.

Being in a spanish speaking area is really strange to me.  My brain is saying “language I can’t quite understand… french mode! french mode!”  I think if I were to manage to say anything in spanish other than “si” or “gracias” it would come out in a french pronunciation (which would in turn have an american accent).

I came back to the hotel fairly early, but was the most exhausted I’ve been in a long time.  Before crashing, there was just the little exercise for my roommate and I to figure out how to turn off the lights in the hotel room, almost as fun as the earlier exercise of figuring out how to turn them on.  Now to spend the week engineering Kubuntu Karmic just a little less intensely than the people who put together this place.