Programming

Status: Busy

I've been very quiet on here for a few months, and the reason is (of course) because I've been doing other things. No surprise there, I guess!

What I've been doing, first of all, is writing aCal, an Android CalDAV client with a lot of help from Chris Noldus. It's probably fair to say that Chris did most of the heavy lifting while I learned Java, did most of the UI & graphic design, and the low-level CalDAV synchronisation and geeky calendaring code. This is now available in the Android market for NZD$2.00 to help us fund further development and in a few days (or a couple of weeks) I'll get the source code up somewhere public (probably Gitorious) and it will be licensed GPLv3... When I get a moment - although refer to title :-)

Something a little different

During my recent trip to Massachusetts for CalConnect XIX I passed back via New York, surfing a few nights on the couch at the Washington Cube Garden1. This was just enough time for my new Davis VantagePro2 to arrive by UPS ground (phew!) causing me much consternation, as the box was about twice as wide as I expected it to be.

On opening it I discovered that the reason for the size was the physical dimensions of the rain gauge, leading me to realise that I had actually bought exactly what I wanted: a high quality weather station. Also leading me to wonder how the hell I was going to get it halfway around the world with me the next day.

Unfortunately that extra wide carrying case was in no way going to fit inside my suitcase. Fortunately it came with a handle. And those wonderful people at Air New Zealand gave me a Koru Gold upgrade for a 50th birthday present, so it was time to put it to the test...

Finally: DAViCal 0.9.9.2 is released

Finally, six months after releasing 0.9.9, and about three months after when I would have preferred to have released it, I've released version 0.9.9.2 of DAViCal. In fact most of the changes were included in 0.9.9.1 which was more quietly released last week to a select audience of keen testers. They found a few bugs, and these are resolved and so 0.9.9.2 is the release I hope people will be able to find useful for some time into the future.

In a couple of weeks, once it's been in Debian Sid for a respectable time, I hope to ask for a freeze exception so that we can include this version into Debian Squeeze when it is released. Given that I missed the cut by a hair or two for Lenny so there is no DAViCal currently in a Debian release I think I can be hopeful on this count. Certainly this fixes a few issues with 0.9.9 which will cause annoyance if they haunt me for the next few years :-)

As well as the rafts of bug fixes and such, the exciting new feature added in 0.9.9.2 is the first support for CardDAV. At this point you need to create the addressbook collection yourself, and there is no import facility, but at least you might be able to use DAViCal to store your contacts.

Enjoy!

The cost of crap

For several years now we've been buying our groceries online. It's worked well, and for the last couple of christmases I remember Heather adding a six-pack into the pre-christmas order so she could pull it out and hand it off to the delivery guy.

Fair enough too, because he was their front-line man. He was the guy who had to actually meet the customer, and even if only for two minutes face time, the impression he gave with his cheery "seeya mate" on the way out, and his always-happy smile, was that getting the groceries delivered was fun.

DAViCal 0.9.8.3 - A return to stability

After a whole bunch of drastic changes, lots of bugfixes, rewriting and refactoring, I released DAViCal 0.9.8 on Christmas day last year. I didn't release it very publicly, because I knew it sucked significantly. In an increasingly fast turnaround I've subsequently released 0.9.8.1 to a somewhat wider audience while I was at the recent Calendaring and Scheduling Consortium meeting in Costa Mesa at the beginning of the month. Earlier this week I released 0.9.8.2 to the more interested of the DAViCal userbase. So finally, yesterday, I released DAViCal 0.9.8.3 to fix the few significant problems that were left with that, and this is the release that I'm telling everyone about, because I believe it should be a good stable platform to people who want to upgrade their production DAViCal servers, or who have been hanging back from using DAViCal until the platform was a little more stable.

Using incron to autocommit changes in a folder

A friend e-mailed me this morning asking for some help with a problem he had where he wanted to make a folder writable by a group of people without making the files deletable. Stepping back from his question, I first pointed out that if the files are editable then they can be effectively deleted by removing the content from them, regardless of whether the directory entries themselves are retained.

One solution which occurred to me would be to automatically version the content of the directory, and this reminds me of why versioning of /etc has never worked for me: it only happens when I remember to commit.

DAViCal 0.9.7.4 released during CalConnect XVI

I spent last week at the CalConnect XVI meeting of the Calendaring and Scheduling Consortium hosted by Apple Computer in Cupertino. I'd been hoping to get 0.9.7.3 released before I got there so I could concentrate on some of the more aggressive enhancement plans while I was there, but in the end I didn't manage to release until the Tuesday, during the event. Then, after some interaction with Kerio and a small but important bug that was found, I decided to release 0.9.7.4 with a very few small changes before moving onto the more radical enhancement plans I continue to work through at present towards a 0.9.8 release in a few weeks.

The release notes for both releases are on the wiki, including details of downloading and so forth:

At CalConnect itself, the first half of the week was an interoperability meeting which I was an observer at, though I did set up a server for people to test against, and the folk from Apple, Sun and Kerio were kind enough to test against this, including a very early version of the Symbian CalDAV client which is likely to be released sometime next year.

The second half of the week was a much more participative process, and gave me a much greater understanding of the general flow of the standards which are forming in the future. In particular it was interesting to get an idea of how close (or far away) the various nascent standards under development are. Some of the closest ones seem to be the Scheduling Extensions which is at draft 8, and will probably have only one or two more clarifying drafts before becoming an RFC. Next closest is probably the proposed CardDAV standard, and implementation of both of these in DAViCal is a priority for me.

The first thing I discovered too, was RFC5689, which is now implemented in HEAD and will be in 0.9.8. Another worthwhile standard, and relatively simple, is the Draft WebDAV Sync which is used by iCal4 if available, and which I have also implemented since leaving Cupertino. I expect there will still be some changes to the webdav sync specification, but it's relatively encapsulated so the effect of any changes are not going to be sweeping.

Support for the Scheduling Extensions for CalDAV, which I am working on now, will be more complete in 0.9.8, though probably still with a few missing parts. It is a large specification though it looks to be pretty stable now and is definitely time to move forward with it.

What the trip to Cupertino definitely showed me is that there is still a place for DAViCal in the available set of CalDAV servers. While there are starting to be quite a few around, and many are maturing nicely, there is still a niche for a free, standalone, SQL-based implementation like DAViCal and it is only through having a vibrant community of implementors around calendaring that we can flesh out the usable and useful standards that are continuing to come out of CalConnect.

Ultimately what impressed me the most were the people around CalConnect, who stand out as being a bunch of dedicated and thoughtful folk who really understand the importance of interoperation and open standards in this area. I do hope I have the good fortune to make it to another event at some point in the future.

Reading, Writing, 'Rithmetic & 'Rithms

A few years back I remember reading this article by David Brin suggesting that it is hard for children to learn programming nowadays, and how it ain't happening so much any more. It's something that I have been wondering about for some time now, and it's something that I think has to be important for the future.

Is there really a huge slowdown in the numbers of computing graduates coming out of University? Perhaps there is really nothing there to worry about. Maybe there are so many more computers around, that even with a smaller percentage of users becoming programmers there will continue to be enough programmers around.

Another way for IPv6 to blow up an IPv4 website

I found another interesting avenue for affecting a web application recently when Heather was trying to renew one of her magazine subscriptions. She mentioned that the site was getting a '500 Server Error' and I recognised the e-mail address it was suggesting, so I banged an e-mail off to advise the problem.

Curiously, they weren't able to duplicate the issue while I was still seeing the problem. I did a little fooling around and discovered that I only saw the error when I was making the request through my proxy server.

A little more digging and I ascertained that if I connected to the proxy normally via IPv6 I got the '500 Server Error', but if I instead connected to the proxy via IPv4 it all worked just fine.

Example of a custom aggregate in PostgreSQL

Yesterday I switched my development environment to PostgreSQL 8.4, and so today I foolishly used the PostgreSQL 8.4 manual while I was developing, without thinking that I might be using some new functionality. Silly me!

What I wanted to do was to convert a column of words into a comma-delimited list (for readability, not for export), to get output something like this:

 id  |                   tags
-----+----------------------------------------------
 141 | DAViCal, FOSS, Programming, CalDAV, Releases
 138 | Family, Life, Kids
 137 | Kids, Family, Rants
 136 | Life, FOSS, Debian, lca
 135 | Releases, FOSS, Packages, Debian, DAViCal

Where the table has two columns 'id' and 'tag', like:

 id  |     tag     
-----+-------------
 141 | Releases
 141 | Programming
 141 | CalDAV
 141 | FOSS
 141 | DAViCal
 138 | Kids
 138 | Life
 138 | Family
 137 | Kids
 137 | Family
 137 | Rants
 136 | Debian
 136 | lca
 136 | Life
 136 | FOSS
 135 | Packages
 135 | Releases
 135 | DAViCal
 135 | Debian
 135 | FOSS

I looked at this and thought: that's just the job for an aggregate function! It's like sum(), except it concatenates!

DAViCal 0.9.7 released

Several weeks ago I was browsing around CalConnect wondering, as you do, if the timing will ever be right and the backing available for me to visit one of their meetings. It seems that the planets may actually finally be in alignment and I am really hoping that I can get to CalConnect XVI from 5th to 9th of October - though I will have to save my pennies.

In passing I noticed that the FREEBUSY Technical Committee has just published a Proposal for Freebusy Read URL, defining a bunch of optional parameters that can be used in queries against a freebusy URL. As calendar servers increase in power and scope it seems natural that these things will become more useful even if you might have thought time had passed them by, replacing them with more advanced CalDAV scheduling extensions.

Since DAViCal has always had Freebusy URLs, and in fact accepted a couple of simple parameters in them already it turned out to be a simple matter to provide these standardised ones as well. This change was included in DAViCal 0.9.7 which I released quietly into the wild a few days ago.

Summary of Paul's Perl talk

For the benefit of Debian users, here's a quick summary of Paul Fenwick's talk about cool stuff in recent Perl versions.

apt-get install libmoose-perl
apt-get install libpar-packer-perl
apt-get install libdevel-nytprof-perl
apt-get install libautodie-perl
apt-get install libperl-critic-perl

Now I have to integrate all that into my writing of Perl programs, which doesn't really happen frequently enough for such changes to become easily ingrained... Great fun, and it's tempting to install Windows just so I could run some of that stuff, but perhaps Paul hasn't realised that you can run Minesweeper under Wine?

Multiples of latency

Today someone asked me to take a look at an Evolution enhancement that's just begging to get into trunk. Since this is a Gnome program in a subversion repository I've commenced the process of cloning the repository so I can look at the issue against the current head.

At the current rate I should have a copy of the repository by early tomorrow morning, in order to be able to start looking at it. Of course today is when I actually do have some time to spare, and I hope to be fast asleep at the time when I expect this to finish.

Presumably subversion isn't this slow for everyone, but since my latency to their repository is 300mS I'm probably on the worst end the pain, with each commit seemingly taking around a second. It sure would be nice if subversion provided some kind of chunked compression of these five-year-old commits, so I could be bandwidth limited, rather than latency challenged.

The addition of a day to the checkout of a software project must be a significant barrier to entry for anyone considering contributing. It makes it much less likely to be opportunistic.

So far I'm up to r3600 in 75 minutes. That's 75 minutes that I could have spent actually looking at the code, but now it's time for me to go and vote for me...

DAViCal 0.9.6.1 release

Well, it seems that there were few problems with the pre-release of DAViCal I pushed out last week, so 0.9.6 is out now.

The full release notes are on the wiki. The biggest change is that this release now supports free/busy using the method defined in the draft scheduling extensions for CalDAV, so it's possible to schedule meetings with Sunbird/Lightning or iCal, and possibly other clients if they support that.

Now I can concentrate on getting some paid work done for a few weeks before I start on the next stage.

Updated

After release I discovered that due to the changed behaviour of DAViCal, interoperation with Mozilla Sunbird/Lightning 0.8 was no longer working. A new 0.9.6.1 version has been released to resolve this issue.

DAViCal 0.9.6 pre-release packages

Here are some pre-release DAViCal 0.9.5.90 (i.e. nearly 0.9.6) packages now. Since there is a lot of refactoring that has gone on under the covers here, I'll publish these packages so that people can tell me about all my embarassing mistakes, and I can correct them, before I upload them to places where they might get installed more or less automatically.

In particular if you do find problems with these, and can catch me on the #davical on irc.oftc.net during the coming week I should be able to include a fix into the real 0.9.6 release next week. If you can't get on IRC then an e-mail will also be fine.

The full release notes are here but the short version is that this fixes a number of bugs, notably one to do with importing calendars containing repeating events with exceptions. The big change is that this adds the initial support for the draft scheduling extensions to CalDAV, in particular the lookup of free/busy information.

Updated

In true pre-release fashion I forgot to actually enable the scheduling extensions stuff, so I've put new packages (0.9.5.91) on there now with that enabled... :-)

Syndicate content