Category Archives: General

Slightly here

I've had very little time for GNOME stuff during the past week – just an hour or so in the early mornings during the week. With that time I gradually managed to get the release notes done and now I'm trying to port Glom to the new libgda API (which looks like a minor, but not spectacular, improvement). libgdamm is ported to the new API, but hasn't settled down yet.

Nokia will kindly give me some days of freelancing work to get Maemo/Hildon C++ bindings done, and I'm looking forward to that, but I won't have time to start until the end of October.

I'm doing precisely zero work for the board at the moment, and also none for marketing, and I feel bad about that. I am very glad to see Dave Neary giving us forward momentum.

I'm also sorting out the hardware for the events box, which should just be ready in time for the first set of events, if I get the delivery addresses in time. I had to leave it a bit late, waiting on some hardware-donation decisions that fell through in the end.

Network programming

For my paid work, I'm currently putting together a little custom server application, in order to farm some processing out to another computer. Although I've been involved in large telecoms projects for a few years now, this is actually the first time that I've sat down and actually tried to use the sockets API directly. It's also the first time I've had to think seriously about how best to use multiple threads. It's quite fun, and nice when it works, though it took me a couple of days to figure out the nuances of select(), such as that you can add the listening socket to the list of sockets that you test for readableness, in order to detect whether it's ready to accept() a new connection.

I know about epoll too, but I'm stuck on Linux kernel 2.4, and suspect that it wouldn't have an advantage in this particular situation.

Reading Robert Love's book (which I'm still reading gradually) also made me have a mini epiphany about multithreading. For instance, the explanation of how the kernel handles keyboard interrupts. The kernel needs to quickly store the new data in the buffer, but doesn't need to block at that moment waiting for some more involved processing. So it defers the work to a “bottom half” that runs in a different process. That and other examples in the book help me to think a bit more clearly about what part of work must be done immediately, what can be done a bit later, and what can be done concurrently.

2.12 release notes and press release for translation

The GNOME 2.12 press release and release notes are ready for translation. Hopefully we'll have even more translations than we had for 2.10. I already know that we have support several more languages in the software itself.

Luis Villa did a very sensible reorganisation of the release notes and Davyd Madeley made his usual pretty screenshots. Thanks to Telsa for proof-reading, and thanks to marketing-list for the ideas.

The release notes were a bit rushed, due to lack of time, and after doing this 4 or 5 times, I'm becoming tired of writing the same sentence structures repeatedly. It's time for someone else to take over and shake it up, so I'm declaring now that I'm not doing it next time. I've already documented what needs to be done and when to do it, though you've really got to stick to the schedule, so that translators have time. I will try really hard not to get in the way whenever I see some dodgy grammar, amateurish phrase, or obvious reaching. We can afford small mistakes like that, and the review phase should catch all that anyway.

xml2po is so good

For translations we are using Danilo's xml2po again, with the source in DocBook, but this time it's all built into the web site build system, so we don't need to manually generate the translated HTML and manually copy it across. I'm also using this for the not-ready-yet GNOME tour. This is such a great system, which solves a problem that all translated web sites have – The translations become out of date as soon as the original changes, because there's no way for the translators to see exactly what's changed, so users read the original because they don't trust the translation. There must be lots of web site systems (CMSs, etc) which store the content in XML. They should integrate xml2po immediately.

xml2po is also being used now for GNOME's user documentation. We hope that the English text will get more attention as a side-effect of all those translators looking at it. Hopefully that will make documentation more fun, and less work, for Shaun.

GNOME Lockdown Editor?

As I mentioned recently, we don't seem to have a real user interface for setting lockdown keys, and some of these are not just simple booleans. I think this would be a great gnome-love project for somebody getting involved in GNOME, and I even found some code that could be used as a starting point. I create a wiki page. Someone should try it and make me happy.

Work in Karlsruhe

Starting Monday, I'll be working for a client in Karlsruhe for a couple of months, optimizing some Linux C++ server software. I don't expect to be very available for GNOME stuff.

If anyone knows of any short-term apartments or rooms in Karlsruhe, I'd appreciate the help.

Back from North Berwick

I’m back from North Berwick and a few days in Karlsruhe, trying to catch up on emails and To-Do lists.

I took the tourist boat to the Bass Rock for the first time. Next time I’ll try to take a zoom lense. The island appears greyish white from the mainland but that resolves, as you approach, to thousands (120,000 or so) gannets and their nests. It’s their realm.

img_0722img_0808

Release Team demanding API documentation?

Recent comments by Federico and Brian Cameron made me wonder: Are we ready to demand full documentation of any new APIs going into the GNOME Platform?

We usually try not to create feature-based criteria like this, so that we can actually release the software on a time-based schedule, as long as we are fairly sure that the important stuff will get done. So we don't demand that applications are accessible or internationalized immediately, as long as they can be eventually. But we have some limits – for instance, Platform APIs must be stable, not just likely to be stable some day.

The GTK+ team are 99% there. They document almost every new function, signal, and property, mark which ones are private, and when they were added. It works well. So, would any GNOME Platform maintainers rebel if the release-team said “No, you can't add that function (or add that module) until you've also written some gtk-doc documentation for it.”?

SQL: 2 joins to the same table, with the same key

I need advice from someone who really knows SQL.

This SQL command is simple and works, and hopefully the intention is clear. I get the actual contact name by joining on the contact id:

SELECT deliveries.departure_contact_id, contacts.name_last FROM deliveries
  LEFT OUTER JOIN contacts ON (deliveries.departure_contact_id = contacts.contacts_id)

However, what happens if I have two contact_id columns, and I want to get the full names for both? This is ambiguous, and incorrect:

SELECT deliveries.departure_contact_id, contacts.name_last, deliveries.arrival_contact_id, contacts.name_last FROM deliveries
  LEFT OUTER JOIN contacts ON (deliveries.departure_contact_id = contacts.contacts_id)
  LEFT OUTER JOIN contacts ON (deliveries.arrival_contact_id = contacts.contact_id)

Update: Thanks for all the comments. This seems to be common knowledge. You can use AS with LEFT OUTER JOIN to
give the join an alias, then use that alias name instead of the table name (even in the ON clause of the JOIN), like so:

SELECT deliveries.departure_contact_id, departure_contacts.name_last, deliveries.arrival_contact_id, arrival_contacts.name_last
FROM deliveres
  LEFT OUTER JOIN contacts AS departure_contacts ON (deliveries.departure_contact_id = departure_contacts.contacts_id)
  LEFT OUTER JOIN contacts AS arrival_contacts ON (deliveries.arrival_contact_id = arrival_contacts.contact_id)

That's a simple change in a generic function in Glom, and I can use the relationship names for the aliases.