Jan 22, 2010

Misc Hacking

I had two days off while I moved offices, so I got a chance to catch up on my backlog of random hacking.


I released osm-gps-map v0.5.0 which adds a few new features (such as keyboard navigation) but also contains many bugfixes and performance improvements. Check the release notes for more information. The next item on the TODO is merging the OSD/layers branch.


I released Conduit 0.3.17 which was long overdue. Mostly a bugfix release and updating to new API. The Conduit homepage has also moved to live.gnome.org. Progress on Conduit is a bit slow at the moment, it does everything I want it to (I have a budget cellphone so phone synce does not interest me), and is pretty stable. I have some SOC work I would like to merge, but basically I am looking for developers and inspiration...

PyGTK for Windows

I finished off the fixes to build correct PyGTK+ installers on windows, hopefully closing bug #589671. I uploaded new installers with the fixes people have reported. I expect these installers to become the 'final' installers at some point. Feedback welcome.

PyGTK Hacking

I wanted to play with the new client side windows work in Gtk+, so I ported the effects gtk-demo to Python. This required a bit of ctypes magic to access the new API (good), and some more ctypes magic to interact with new signals that appears to have unfriendly prototypes (not so good, bug filed here).

PyGTK example using client side windows

Apr 23, 2009

Map Widget Release

I made a new April resolution to start blogging reguarly again. The first step of that long journey begins now.

OpenStreetMap GPS Mapping Widget - 0.3

I just released v0.3 of osm-gps-map, the easy to use Gtk+ mapping widget. Highlights for this release include;

  • A new major contributor, Alberto Mardegan, who worked on many of the new features of this release. Thanks a lot Alberto!

  • Draw map tracks with Cairo by default.

  • Interpolate between zoom levels while waiting for a tile to download.

  • Stop using GET_PRIVATE, and cache priv* for performance.

  • Keep an extra border of images offscreen for smoother scrolling at the edges of the map.

  • Keep the last N tiles in memory to improve render performance (previously they were loaded from disk)

  • Add some new api; osm_gps_set_center, osm_gps_map_scroll.

Conduit Hacking

Hacking on Conduit continues, with much happyness for two reasons;

  • GNOME has moved to git! Wahoo! I owe the sysadmin team many beers, except for Jc2k who I know could not handle them anyway.

  • Conduit got a SOC project, congratulations Alexandre!

  • Work is ongoing to merge in the new configuration and settings serialization code.

  • More on this later, I promise...

Jan 23, 2009

Some More Software

As was the theme of yesterdays post, here comes some more software that I have hacked on recently and can now be found on Github.

osm-gps-map osm-gps-map is a Gtk+ widget (and Python bindings) that when given GPS co-ordinates, draws a GPS track, and points of interest on a moving map display. It Currently supports a number of different mapping sources;

  • openstreetmap (default)

  • openaerialmap

  • maps-for-free

  • satellite maps from a number of proprietary providers

It also has the following features

  • Intelligent caching of maps, including the ability to request a specific area of the map to be cached ahead of time

  • Recording of points of interest on the map (and the ability to add arbitary pixmaps at those points

  • Automatically draws a GPS track (a line showing the history of past added points)

  • Automatic centering on new GPS points

  • Support for multiple other tracks of co-ordinate points

  • Adjustable Zoom

  • Includes a comprehensive example

  • Simple, flat API

I have been running it on a number of embedded boards (beagleboard, Overo) for some commercial work I have been doing (hence the minimal dependencies). For those Planet GNOME readers, It is kind of like libchamplain but without the Clutter part.

facebook-notify Reaction to the posting of my Facebook notifier for GNOME was positive, and I made a few quick fixes to remove some crasher bugs.

The biggest source of frustration at this point is that libwebkitgtk segfaults, upon destroy, almost every time it encounters a page that requires the initialization of an NPAPI plugin. Disabling plugins using the built in BrowserSettings object does not seem to have any effect.

Is there a RoadMap or any plans for an updated WebKitGtk release before the next round of distro updates?

Conduit I have been hacking on Conduit a bit over the last few days, and thanks to Julien Lavergne we now have updated builds for Intrepid and Jaunty. Julien also packaged a trunk snapshot (and set up the infrastructure to allow easier updating of such snapshots). I recommend all users of Conduit add our PPA.

Oct 16, 2008

iPhone Synchronization on Linux

Now that Matt has gone ahead and announced this, I think I should send some more traffic his way. If you are interested in using Conduit to synchronize your iPhone contacts, calendar and notes then go and check out his work.

I hear people like this "iPhone" thingee

Also, I am still looking for volunteers to help me maintain the Google contacts/calendar Conduit dataproviders. They need some love, and I am just one developer.

Oct 5, 2008

One Month In France


Hi Everyone, Its been a long time between blogging but I have an excuse. I have moved from Christchurch New Zealand, to ENAC, Toulouse, France. I have now been here for a month, working with the UAV team here.

Screen Envy?

The work has been really challenging, and I have settled into my routine, working towards some things I would like to demonstrate before I leave. I have spent a few weeks doing a lot of electronics design,  updating the paparazzi autopilot board, the IMU, and the GPS boards. Nothing revolutionary, just some evolutionary improvements over the previous hardware.

  • Consolidation of the interfaces between the main board, and the IMU+GPS+Radio+Motors. IMU interface is now SPI only, GPS interface is I2C only / UART only.

  • Addition of a 24bit ADC on the main board to directly measure the pressure sensor, no more op-amp+calibrate the offset at startup.

  • Physically smaller stackable board design.

A lot of this work has been done with an eye towards moving some of the off-board vision processing I am currently doing onto the flying aircraft. I have been experimenting with the beagleboard, and one of the goals of the hardware refactoring above is to free up an interface to push data between the beagleboard and the flight controller. Probably I2C or UART, I am not sure yet.

Can anyone get hold of a Gumstix Overo for me?

I am hoping to be able to demonstrate some biomimetic control responses from my onboard vision system, using image motion information. I also hope to demonstrate hybrid external position estimation system using an off aircraft 3d vision system aided (kalman estimator) by on-board IMU .

Plenty of work for me ahead.


I finally managed to upgrade to the Ubuntu Intrepid beta. I was pleased to see that it contained all sorts of productivity improvements;

  • I used to waste about an hour a day keeping up with the US election news on Youtube, watching Sarah Palin insult the intelligence of all mammals on the planet with her existence. Intrepid fixed this for me by removing the feature where sound embedded in flash videos was played through the soundcard of my computer. Phew, thats a relief. I guess I will just need to go and watch Fargo instead.

  • Keeping in contact with my family via Skype was also a PITA, luckily Intrepid removed the ability for me to do that too, no sound to hear my parents nag me, and no video which would let them see me all hung over and tired.

Im sure everyone reading this is aware of that feeling when you go and use a friends brand new $2000 Windows Vista computer. The way it runs so slowly with 2GHz of processing power at its disposal, crashes all the time and takes 6 minutes to turn on. It is brand new FFS. When I am in that situation it makes me feel like the entire engineering profession has failed me.

I got that feeling with Ubuntu this week.


Unfortunately I have not been able to work on Conduit very much over the last month, and it appears that no one else seems to have had the time to either. This upgrade pain has destroyed my motivation, and I only just recovered from the previous month, where approximately 14,000 people reminded me that the Conduit GUI made them vomit in their mouth. Some positive re-inforcement (and some help hacking) would be a welcome change about now.

Aug 10, 2008

A Frustrating Week

It all started so well. While Conduit was not accepted into GNOME 2.24, it was blessed as an external dependency for this cycle. That is great news for online service integration, and synchronization on the GNOME desktop. Congratulations to everyone who has helped me work on Conduit over these years, and well done to those who made it into the release set.

I was also able to make a 0.3.13 release incorporating those fixes and UI improvements I discussed last time around. After that things started to get worse.

Conduit (and a hidden new feature)

  1. The disk holding my /home partition crashed. Taking a whole bunch of stuff with it. Like a good geek most of it was backed up or in a RCS, with the exception of my SSH key. FAIL.

  2. This meant I was unable to make the now customary Conduit x.x.x.1 brown paper bag release in time for the GNOME release. I do owe many thanks to our amazing sysadmin, Olav, for getting my new key onto the GNOME servers in a matter of hours.

  3. The disk crash took with it a week+ of my SOC work, making me very angry. To calm the tempers I thought I would work on the conduit-gio branch.

    1. Unfortunately I am not certain if this has much chance of success. I seem to have hit a regression/gvfs bug #547133.
  4. Then Christian Schlotter contributed a really nice Conduit dataprovider which supports sync/backup to Amazon S3.

    1. But this too seems blocked by a gvfs bug #547020.
  5. I then realized the implications of Webkit not being blessed as an external dependency. It means that I have two choices. Continue to drag around the pain that pthon-gtkmozembed brings, or move to using the unreleased (Py)WebkitGtk. I really encourage the WebkitGtk and PyWebkitGtk teams to make stable releases ASAP, to ensure they get into $DISTRO.

  6. Then I found that I could not push to bzr-playground.gnome.org anymore. It appears that it did not pick up my new SSH key. And loggerhead source code browsing is broken there.

  7. Completely fed up with software, I thought I would play with my new hardware toy. This is destined to replace the terrible, unsupported mess that was the Phytec phyCORE LPC3180 module for the purposes of my PhD work.

Beagleboard My brand new beagleboard (photo)

But then the FAIL continued. http://www.openembedded.org has been down for the last 5 days, making it impossible for me to check out the openembedded tree that supports this board. Does anyone know why it is down?

Aug 4, 2008

Conduit UI Experiments - Some Conclusions

Thanks once again to the many people who commented on my last two blog posts. All the feedback has been gratefully received. I just released Conduit 0.3.13 which, amongst other things, features some UI improvements based upon this feedback.

Conduit with an example shownConduit after some examples have been addedConduit 0.3.13 showing multiple dataproviders Improvements to the Conduit user interface.

Technically speaking, the release adds a knowledge framework to the application. This makes it easy to assist the user as they work through the interface. New features, utilizing this framework are;

  • Conduit now ships with a few example synchronization groups. These groups are shown to the user based upon the devices connected, and the data providers loaded. When the user selects an example, it is added to the canvas automatically.

  • I have added a message area to the bottom of the window. This provides a limited number of hints to the user depending on their interactions with the application.

Coming Up This release also lay a lot of the foundations for the few remaining big ticket items on the 0.4.0 TODO list. In the very near future we will see

  • Merging GIO port

  • Merging of Alexandre's SOC work, which will improve sound and video support in Conduit

  • The first release supporting Windows Mobile synchronization

  • Miscellaneous PIM improvements (Improved Google support, ability to merge attributes during conflict)

John Carr is currently working on the ATK accessibility implementation. As far as we can tell, there are no other PyGTK applications that have implemented accessibility in manner we wish to (manual implementation of the Atk interfaces from a objects not derived from GtkWidget). Lucly he works with Mark!

As far as using and distributing Conduit goes, it may get painful before it gets better. The next release will likely depend on PyGObject > 2.17 (for GIO support), and maybe PyWebkitGtk (SVN because of lack of recent, stable, compatible releases of this and WebkitGtk). My experience with (py)GIO so far has been exceptionally positive, and those out there who have used the train wreck that is gtkmozembed before will appreciate my desire to move to PyWebkitGtk.

Aug 1, 2008

Conduit UI Experiments - Part Two

Thank you everyone for their constructive comments on my previous post. A number of posters suggested the rounded boxes that conduit uses to group dataproviders were too bold, unnecessary, or both. I would like your opinion on which of the following four choices is the most suitable as a replacement.

Four different styles showing how to differentiate between dataproviders Which is the best; 1,2,3 or 4?

Number four is the current implementation. I am leaning towards the first option as a replacement. From testing it seems to look the most consistent on different themes, and I believe it is the most suitable background to place (future) drag and drop hints on.

Jul 31, 2008

Conduit UI Experiments

The discussions regarding my proposal for inclusion of Conduit into GNOME 2.24 seem to be going OK. The inevitable issue of Conduit's user interface has been raised, and it is good to see some constructive comments being posted.

It is a bit of a simplification, but I see basically three schools of thought with regard to the user interface for synchronizing things. What follows is a brief discussion of the pros and cons of each approach.

  1. Everything should be automatically configured, and the current Conduit user interface should cease to exist - synchronization functionality/UI should be put into the respective application, calling into Conduit over DBus.

    1. While I agree in theory, there is a enormous divide between theory and practice. For the foreseeable future it is not going to be possible to auto-configure synchronization parameters for all mobile devices. This is in part due to quirks in the devices, and in part because its sometimes not possible to enumerate all the things that a device supports without first configuring/pairing/connecting/etc with it.

    2. Many web services require a authorization step, either once per application, or once per session. To make this easier on the user, Conduit hosts its own web browser for showing the login dialog in a consistent manner. I believe that this is the least surprising result to the user, if they sync something in conduit, the authentication should be done in conduit, not in the users default web browser, where they may not immediately recognize that it is Conduit that requires the authentication. Until we get some more online-desktopy stuff into GNOME (sharing auth cookies, authenticating services, etc) I think our approach is  a good one.

    3. I think it is important to have a single, consistent interface for resolving conflicts, this is currently in the Conduit GUI, but perhaps we could export it over DBus, like we do for the configuration dialogs.

    4. Doing everything in other applications, reduces Conduits power to the lowest common denominator of these applications. Some of the cool power of Conduit is in the synchronization partnerships you can create that are not even tied to an application. For example, its possible to configure a 'sync' from Youtube, onto your iPod, that downloads and transcodes videos from you favorite user/channel. In what app would something like that go?

  2. The conduit GUI should be simpler once you have configured everything.

    1. This is the approach I agree with the most. I think. This could potentially involve some sort of minimize/maximize type button that when pushed, would collaps the main canvas down into something like the iSync user interface.

    2. While I quite like that approach, I would almost rather implement an entire second GUI using only the Conduit DBus interface. This is the approach being persued by Alexandre (SOC student working on iPod support), and by John Carr (for a simplified windows mobile experience)

    3. It was also suggested to make configuration easier, we should try gtk.Assistant.

  3. Redesign the entire UI

Redesigning the Conduit GUI Today I decided to work on improving the current UI based upon some feedback on desktop-devel-list. First I spoke with my user interaction designer friend, and asked her what she thought. After 15 minutes of talking to an imaginary person that did not exist (any volunteers to be my interaction designer friend?) I decided to instead make some incremental improvements to the current UI. Some people may see this as re-arranging deck chairs on the Titanic, but hey, what have I got to lose?

The first step was to use the current theme colors. After a bit of looking around, I couldn't actually find a simple way to see what these were, so I wrote a quick application that draws color swatches for all the theme colors, in each of the widget states. If anyone wants so play with it, the code is available from my git repository.

Theme color swatches

Rounded rectangles make anything pretty.

With an idea of what colors are actually present, I changed the Conduit and DataProvider colors to use sensible colors from the theme. I also implemented some subtle gradients to make things a bit more GNOME.

Gross gradient colors. Just joking of course. Just kidding.

The result turned out pretty nice I think. This is the first time I have actually tried to make a custom widget match the user theme, and it was not too painful. One annoying limitation is that I only seem to get access to the matching style, but I would quite like to use colors from the tooltip style. It also gave me the opportunity to remove some UI clutter; I no longer show sources and sinks in different colors. Anyway the final result was;

Conduit matching the system theme Beautiful in brown, blue and black.

When I said subtle I really meant it. I would really appreciate it if a talented artistic hacker had a look at the code, and experimented with some more creative gradient settings. The function in question is get_style_properties which lives in conduit/gtkui/Canvas.py, and is implemented in all CanvasItem derived classes.

I then moved onto experimenting with waking the user through the sync and configuration process. I did some experiments using the Gedit message area to suggest steps the user could take. Thanks to Colin and HotSSH for the widget. Im not sure about this one.

Conduit using a message area to make suggestions to the user Too much like Clippy?

Mathias suggested a visible drop target. I think this will be my next challenge. I also did an example implementation showing what the Conduit UI would look like if the outer, grouping, rounded rectangle was removed. Now a simple line differentiates different between conduits. What do you think?

Conduit with the outer rectangle removed, a single line divides conduits. Now with 29% less rounded rectangles.


  • I'm pretty happy with the themed colors. The work is available in my bzr branch, and will make it to trunk soon

    • bzr branch http://bzr-playground.gnome.org/~jstowers/conduit/devel
  • There is continued discussion regarding UI ideas happening on live.gnome.org

  • My Gtk theme swatch too is available from

    • git clone http://gist.github.com/49799
  • There will be a Conduit UI, of some sort, for the forseeable future. Lets spend some time making it better!


  • Fixed BZR Urls.

  • Added an example showing what Conduit look likes using a dividing line to differentiate dataproviders.

  • The theme swatch utility has been moved to github

Jul 17, 2008

GUADEC Report: Late As Usual

GUADEC was effing awesome. I have successfully repayed my sleep debt, and can reflect on all that I observed and learned for the week. In bullet point form;

Insurance to Wake Me Up _Insurance for the last night (WAKE ME UP, English and Turkish) _

  • My Conduit talk went really well. I thought I was able to reach a good balance between 'this is cool for users', 'this is cool for developers', and 'this is a flagrantly useless technical demo because I can'. Following the talk, and over the rest of the week I had a number of chats with people regarding

    • Improvement hints for the UI. Thanks a lot Bastien and co.

    • What is considered a useful, and achievable, level of mobile device support.

    • Some technical clarifications on matters how to integrate into the desktop (webkit, gio, ui-via-dbus, etc)

    • Slides available here

  • I felt the reception to Conduit was positive, and I look forward to the module inclusion discussions for 2.24.

  • I was not productive on my summer of code project for that week, but I have come back with an overflowing amount of motivation to not only complete my work on binding syncml, but to also continue to add improvements that will help Conduit operate on Maemo and iPhone, and operate really well with Windows mobile devices, and Nokia devices (via gnome-phone-manager).

    • Dear Team (aka lazyweb): I have quite a large conduit branch I am working on. Whats the plan with bzr-playground.gnome.org. Can I easily push my existing branch there?
  • It was great to meet some of the people I have been corresponding with over email, and have never actually seen. You know who you are!

  • Electronica Festival Istanbul was a great adventure. Thanks to all that made it happen

  • Thanks to the GUADEC volunteers.

  • The 'tab meme' on planet.gnome.org was pretty funny. I was most fooled by Davyds. (am I the only one who kinda likes this metaphor?). I was also fooled in Federico's key note, when he proposed the NET_WM_I_CAN_HAS_TABS window hint for easy window -> tab transitioning (just kidding).

  • Captain common sense awards are hereby given to:

    • Team Gtk+: For the reasoned future of Gtk+ discussion/keynote. While I was disappointed to learn aboutthe lack of canvas plans, it is not really surprising. I use Goocanvas, but I am hardly a power user, and without a chosen Canvas, I have zero motivation to switch. I would describe the Gtk3.0+ plan as necessary+pragmatic. That is a damn site better than what it has appeard to be over the last few years (stagnant+idealistic).

    • Realease Time: Nice reveal on the Gnome 2.30 -> Gnome 3.0 animation

  • The BZR vs. git thing seemed to reach a whole new level of weirdness at GUADEC. First there was team BZR, whom I shall liken to a Turkish taxi driver. They seem to promise everything, they have the hard sell on, and you can never really be sure how much the cost will be. The git team seems to be like the seasoned traveller. They are showing the finger to the taxi drivers, and generally alternate between cursing at the incompetence of the taxi service, and ignoring them with glee. Instead of discussing the price with the taxi drivers, they instead have a prepared presentation on how flying cars are actually a million times better than taxis because they look so hot.

    • I actually dont really care what I use. Im not a power user. If I could somehow pay some sysadmin money to setup a unified GNOME themed viewvc that tracked both git and bzr I would. Thats all I want - to be able to track and see what folks are up to. I wrote more about this subject here.

    • I also support the notion of 'Pick the system that makes it easiest for the distributor to work with'. That likely means git. As a thought experiment, what might be the result of choosing git, or more correctly, rejecting bzr, in the wake of the Ubuntu is moving to KDE fear meme.

  • I Didnt realize the enormous (positive) influence that Nokia has on GNOME. Positive influence is a polite way of saying 'how much money they spend on Gtk+ related subcontractors, and employees'. Apparently something cool is coming for Maemo $NEXT_VERSION

  • If I have forgotten anyone, apologies. See you all next GUADEC!

  • Does anyone look like their Hackergotchi? (and can someone make me one - if you have a photo of me, and its moderately acceptable...)

  • Funniest moments would have to be

    • John Carr with a rats tail and silver necklace!

    • Me and Marks completely ineffective adventure from one side of Istanbul to the other, with no phone, no watch, no computers, no idea where anyone is, and death by hangover.

    • The humiliation/irony of singing really bad English Kareoke in a country whose official language is Turkish.

  • I have some interesting Conduit work going to land soon

    • Officially supported Windows Mobile sync support

    • Nokia phone support via gnome-phone-manager

    • Massive refactoring to improve platform abstractions

    • Which includes a move to GIO

    • Which adds a pygtkwebkit based browser

    • Which removes the hard dependency on gnome-keyring

    • Which adds and native python file/vfs abstraction

    • These improve performance and make it a billion times easier to run Conduit on Windows and Mac.

Next → Page 1 of 5