September 08, 2008

8 Sep 2008

Not being from Oakland, Meth has a relatively small impact on my life. Until I get a cold, at which point I get to curse the lack of effective drugs. What's surprising is how phenylephrine does have a noticable effect. What's even more surprising is that it has this effect about thirty seconds after I've swallowed the capsules, indicating fairly strongly that it hasn't actually hit my bloodstream in any sensible way at that point (though I've had astonishing difficulty in finding figures on how long the plastic capsules take to dissolve in the stomach). So, even though I know it's got no measurable effect beyond that of a placebo, the placebo effect still works. Damn you, psychology.

September 07, 2008

A step closer to World Domination

Same as. But more times.

Love (and blogging)

It's been a while since I wrote regularly on this blog, and people have been asking, with decreasing regularity, why my blog posts sputtered out.At first, I wanted to take a break to shake off the "I can't wait to blog about this" impulse that was starting to spring up in the middle of almost everything I was doing, and was threatening the in-the-moment joy of life's little adventures by making them into a kind of low-grade performance literature.Then, in early 2007, I moved to Munich and got busy learning about another culture.  Moving to a new place has a way of disrupting all your old habits, so I stopped going to yoga and I stopped posting here, but I started programming a lot again (yay!), and running a few times a week.And then twitter erupted into my social group like an invasive species and I found that my public-writing energy was nibbled away bit by bit, never building past whatever critical threshold is required for something to be (dare I say) bloggable.And then, unexpectedly, at a conference in Paris, I met the most dazzling girl.  Smart and kind-hearted, and with an incredible appetite for life, she lived in Munich.  When I moved here, she helped me find an apartment and get settled.  And somewhere in there, she completely stole my heart.  And so, earlier this year, on a hill in San Francisco, I asked her to be my wife, and she said "why the hell not" (I'm paraphrasing here). 

Stephanie
We both love to travel, and she's amused by my sense of whimsy.  Over the last year we've had a lot of fun running around Europe.  (More on that later.)  And so I've found someone I want to share life's adventures with, and you guys have recently taken second priority.  Sorry about that, but I'm sure you can understand :-).
We do plan to have an actual wedding sometime next year, though we're not sure exactly when or where.  So, stay tuned for future episodes, now featuring Stephanie (introductory glam shot below).  
 

Travelympics

Lately I’ve been able to knock down my door-to-door time travelling between my apartment in Barcelona and the one in Brussels to around 4 hours. Today I managed a sleek 4:03. I only count trips that don’t involve taxis because taxis are cheating. (Getting Kristien to come pick me up is ok though - love is something I fought for, not paid for. Getting someone else to pick me up without paying them for it in cash is ok too.)

Things that help:

  • living a 12 minute drive from the airport in Brussels
  • living close to the first Aerobus stop in Barcelona
  • on-line checkin (shaves quite a few minutes of queueing off the total - time that can be very unpredictable and mostly decides your leaving time - and has the additional advantage of allowing you to carry whatever weight of stuff in your hand luggage, which will not get checked, as long as still *looks* like, you know, hand luggage)
  • luck with the Bicing-bus connections
  • instead of asking for window or aisle, asking for ‘as close to the front of the plane as possible’. Makes for quicker getaway. Not very useful if your airline does not dock at the gate on arrival - you all get on the same bus in that case.

Things that hinder:

  • traffic jams in Belgium
  • plane delays - I’ll have some graphs soon on my 3 most used airlines; obviously, though I hate traveling in the morning, the risk of delays is higher in the evenings because delays accumulate throughout the day. My worst delay was three hours and then a no-fly because ‘one of the engines makes unstable noises and the engineers are trying to fix it’ - I was happy to only board the plane after hearing they re-routed a plane from Russia to pick us up.
  • not arriving at the gate
  • security silliness - it definately took more time right after the start of the ‘no liquids’ phase, and I remember before that point Barcelona didn’t even check boarding passes before going to security

It’s also interesting to see how wildly airlines vary in the time they allow between turning off the fasten seat belts sign and turning it on again. Obviously, this is my Zoney Hacking Time, so this matters to me, though I get strange looks when I try to explain this.

Heard this week over the speaker system of the plane: “Ladies and gentlemen, as we are currently refueling, we ask you not to fasten your seat belts yet please.” OK, obviously I was curious - one gets jaded after years of flying. But this instruction was so deliciously new and as yet unheard, I had to hail a flight attendant and inquire into this strange instruction. “Oh, yes - we ask not to fasten seat belts just so, in case something goes wrong during refueling, people can get off the aircraft more quickly.”

I think I was sorry I asked.

a step closer to world domination

harhar.. seems like my evilish plans are getting real ;)
thanks to pierre slamich for notifying me about this!

read the full review here

laptopmag.com

Avoid the Managed Extensibility Framework.

As a .NET developer, you should avoid using the newly released Managed Extensibility Framework as its license prevents its use beyond the Windows platform. This will prevent your .NET software from running on Linux or MacOS in the future.

Luckily, there is a cross platform solution available today that has no platform limitations: Mono.Addins, a technology inspired by Eclipse's own plugin system. We have tutorials, reference manuals, API docs, our FAQ our public groups and multiple large applications with source code available that you can learn from (MonoDevelop, Banshee, F-Spot and Gnome-Do).

The rule obviously applies to any new APIs that are built for .NET as they are not immediately available for Mono. But unlike the binary-only APIs, these half-open source code releases pose additional problems for the open source CLI:

  • More people are exposed to the source code, preventing them from working on a fully open source implementation of it.
  • There is a smaller desire from the community to reimplement the code, as it is relatively easy to just use the existing implementation or ignore the issue for the time being.
  • Some folks might not care about the license restriction, and ignore it altogether. A practice I do not endorse.

There are two additional issues that are worth pointing out. Should non-open source libraries be hosted on CodePlex to begin with? CodePlex is branded as the "Open Source Project Hosting" from Microsoft, yet, this license is clearly not open source and does not qualify as open source according to the definition and is a clear violation of Codeplex.Com's requirements:

The above link points to http://en.wikipedia.org/wiki/Open_source_licenses.

MEF should be pulled out of the CodePlex site along with all other platform-limiting software, like ASP.NET MVC (h/t to gblock for pointing out that MVC is also violating the terms). Unless CodePlex cooks up a special exception that some software and restrictions are more equal than others.

The second point that is worth making is that picking licenses like the MS-LPL for .NET software is shooting the .NET community in the foot. The LPL license is obviously an effort to tie things into the Windows platform, putting company first, community and developers second.

The MS-LPL is a poisonous license, do not use it (do not confuse with the MS-PL which is a decent license, the extra "L" makes a big difference).

Update: gblock points out that CodePlex technically only requires a "license" to be picked, but does not require it to be OSI compliant. But even if the wording on the FAQ does allow for that interpretation, it is misleading as there is a link to OSI licenses next to it, and the main page clearly states that Codeplex is an "Open Source Project Hosting" site. Capital "O" and capital "S".

The "CodePlex Basics: Getting Started" page also points to the Open Source License Definition, there are no words about custom licenses or about hosting proprietary code with source code available.

Xesam GLib 0.5.0

Hi, misusing my blog for boring release notifications again. Sorry. Here goes anyway.

Xesam Glib 0.5.0 is out. Get it while it is hot. News in tis release:

  • Implement XesamGXmlQueryBuilder, a query builder capable of  producing XML queries
  • Add example program (examples/xesam-usl2xml) converting user search strings into XML queries
  • Add program examples inside the compiled and distributed documentation
  • Make XesamGQuery a GInitiallyUnowned which makes it nicer to use with the Xml query builder
  • Change header inclusion to be just <xesam-glib.h> instead of the old <xesam-glib/xesam-glib.h>

Download: xesam-glib-0.5.0.tar.gz

Docs: API docs for Xesam GLib 0.5.0

Synchronous IO Never OK

"If synchronous IO becomes a problem, it can be made asynchronous later." Tempting to imagine that some operations on local files are "fast enough" to implement with synchronous IO. "Premature optimization is the root of all evil," right?

Wishful thinking. Async vs. sync IO is not a performance issue (in fact synchronous IO can be faster). It is a structural or qualitative issue, a design issue. Sync IO is guilty until proven innocent.

My new rule is: any code that will be blocking during a user-interactive main loop must run in a known-short time. The task must be known short, not indefinite-but-often-short.

Local file access could be short, but is not known short. Another common culprit: synchronous D-Bus calls.

I've seen so many rewrites from synchronous to asynchronous IO over the years - it is almost 100% likely that anything blocking the main loop eventually comes to be seen as a bug. There's near-zero chance it's really OK to use those nice, easy-to-program blocking D-Bus calls, or that nice, simple g_file_get_contents(). Even the harmless looking g_file_test() can bite.

These APIs exist only to tempt you. They are the dark path.

(Note: by "asynchronous" I mean "the main loop is not blocking, for example because IO is in its own thread" - I don't mean special AIO system calls.)

Here's the core issue: the UI's main loop needs to wake up at 30-60 frames per second to do animations and repaints, and it should respond to user input with similar speed. It needs to do this consistently (think real-time-like), not "on average" - if there are big outliers, like an occasional quarter-second delay in frame rate, the app will feel sluggish.

"Local" IO can be slower than you think; the firefox fsync problem shows one extreme case (the whole kernel gets bogged down, not just the IO operation), but think about network file shares, or large file sizes, or systems under load. Even mild manifestations of these issues are visible in decreased user responsiveness and animation smoothness.

It's very common for supposedly fast IO operations to end up batched together, creating a long delay at once; for example, calling stat() on everything in a directory, or queuing a bunch of idle handlers that all happen to kick in at once.

Another Firefox example: try uploading a bunch of photos to Flickr in one go. Ouch. The files are local, but ... there are a lot of them and they are big. Pretty sure Firefox uses synchronous IO here.

Enough "this local IO should be fast enough" laziness scattered around an app creates distributed bloat that's hard to pin down and doesn't show up very well in profiles because it depends on external circumstances.

Not only is it hard to find later, synchronous code is hard to fix - it means rewriting.

Bottom line: don't write this code in the first place. Using async APIs is not premature optimization, it's correct design.

Be Afraid

A week or so ago I discovered that the ~/Documents directory of my work laptop was missing. This had me pretty spooked out as I was pretty sure I had it before[1], but you all know that feeling where you are suddenly unsure if you are absolutely positive it was really there before. Thinking “I usually do not store a lot of documents on this laptop - I just code!”. However I dismissed the thought as the real world had much more pressing matters to attend to.

Right now. Not five minutes ago my ~/Art directory went missing! Now I know I had that before because I used it at last boot.

Lazy web: Just what I going on? My gut instinct tells me that the laptop’s hard drive is just dying a slow death, but how can I tell this? I’ve been browsing the kernel logs but no hints. My OS is Ubuntu Hardy and it is a Dell Latitude D820…

[1]: I spent an hour or so scanning kernel logs and grepping my .bash_history and then another hour looking for bug reports on the web

Software Freedom Day event in New York City

James Vasile asked me to pass along that the Software Freedom Law Center is having a reception for Software Freedom Day. Details are at his blog (which is worth subscribing too- low volume, high value when something is said.

(I’ll try to make it, but my brother will be in town, so… possibly not.)

More Network Light fun

When I wrote GUPnP Network Light, I thought of it as just a simple example application that demonstrates how easy it is to implement UPnP devices and services using GUPnP. However there is one man, Mr. Hugo Baldasano Calleja who being an electrical engineer is very much interested in light bulbs and has recently been writing control point for Network Light.

While discussing about his code with him on IRC, I started to wonder how would a simple control point GUI for Network Light look like. I realized that it would look exactly the same as the Network Light itself. Since Hugo had already made it possible for multiple instances of Network Light to co-exist happily on the same network/machine, I decided to turn Network Light GUI to be a Control Point that controls all the Lights on the network, not just itself. The change is already in the trunk and will be released soon. Here is a screenshot:

Here’s a meme: org.freedesktop.Thumbnailer

People who know me probably saw this blog item coming. Here it is!

In Tracker we want to ahead of time create thumbnails for interesting files. Among the use cases is when the user has moved or copied photos from his camera into one of the photo folders. We want to start preparing thumbnails for those files early so that filemanagers and photo applications are fast when needed.

The current infrastructure for this in Tracker is to launch a script for each file that is to be thumbnailed. If you find a lot such files (some people end up with a camera with 1,000ths of photos after a busy weekend), that would mean that we’d do this 1,000 times:

fork();
execv(tracker-thumbnailer);
fork();
execv(bash);
fork();
execv(convert);

Luckily this is not activated by default in current Tracker. :-)

I don’t have to explain most people who read this blog that this is a bad idea on a modest ARM device with a bit more than one hundred MB of RAM. A better idea would be to have a service that queues these requests and that solves the requests with specialized image libraries. Perhaps launching a separate binary for the MIME types that the service has no libraries for?

At first we were planning to make tracker-thumbnailer listen on stdin in a loop. Then I figured: why not do this over DBus instead? Pretty soon after that was Ivan Frade concluding that if we’d do that, other applications on the device could be interested in consuming that service too. We decided that perhaps we should talk with the right people in the two large desktop communities about the idea of specifying a DBus specification for remotely managing the thumbnail cache as specified by the Thumbnail managing standard by Jens Finke and Olivier Sessink.

I don’t know of a official procedure other than filing a bug on freedesktop.org, so at first I tried to get in touch with people like David Faure (KDE), Christian Kellner (Nautilus), Rob Taylor (DBus, Telepathy, Wizbit) and later also a few mass discussions on #kde-devel, #nautilus and #gnome-hackers.

I started a discussion on xdg-list which made me conclude that such a DBus API would indeed make sense for a lot of people. Discussions with individuals on IRC added to that feeling. I started a draft of a first specification for a DBus API.

Meanwhile I had already started adapting the hildon-thumbnail code to become more service-like. Right now that code has a DBus daemon that implements the draft DBus API and on top of that provides the possibility to have dynamically loadable plugins. The specification also allows registering thumbnailers per MIME type. For that reason I made it possible to run those dynamically loadable plugins both standalone and in-process of the generic thumbnailer.

It has been my prototype for testing the DBus API specification that I was writing. People told me that if you want to make a specification that’ll get accepted, the best way is to write a prototype too. Meanwhile Rob Taylor had joined me on fine tuning the specification itself. With his DBus experience he helped me a lot in multiple areas. Thanks for caring, Rob!

The current prototype does not yet make it possible to simply drop-in a thumbnailer binary to add support for a new MIME type. By making a standalone thumbnailer that for being a thumbnailer simply launches external thumbnailers you could of course add that possibility that a lot of current thumbnail-infrastructure has. Although as mentioned above I don’t think this is a good architecture (the fork() + execv() troubles), I plan to make such a standalone plug-in thumbnailer.

I certainly hope that this specification will be approved by the community. I can help with making patches for Konqueror and Nautilus. We’ll most likely use this on the Maemo platform for thumbnailing ourselves.

Whatcha Drinkin’?


September 06, 2008

HELLO I'M ON THE TRAIN

and, by the looks of it, may be for some time:

Yes, the track is underwater. Sigh.

So long and thanks for all the fish

Yes, the obligatory and rather daggy HHGTTG quote to finish off …

I think this shall be my last post on b.g.o. I had written more but changed my mind.

My other, rarely updated and stale, ‘coders diary’ will hang around (as will this for the time being). But I’ve also started another ‘blog’ on blogger - the rather delightfully named `A Hacker’s Craic‘, although I haven’t really thought of anything much to say on it yet.

Well good luck with GNOME.

3.0 mockups - Part 1: Desktop organisation

Shaun’s post reminded me that I wanted to show some ideas how GNOME 3.0 could be different, new and better than any 2.0 release. I completely agree with him that releasing 2.28 as 3.0 without any really new features would be ridicules. User’s won’t be very interested if we just removed deprecated stuff and use Gtk+ 3.0 if they don’t see any real benefit. As I already said before I do think that we need to skip one 2.x release to get this done. Of course we can use branches, etc. etc, but be honest, making a release is a huge amount of work and normally stops any development for at least two months.

Part 1: Desktop organisation

The problem of my computer desktop is that is becomes about as cluttered as my real desktop and with the trend to bigger displays it also tends to become bigger and bigger. Try to save a new file to your desktop and afterwards plug in your usb-drive and you will see two new icons in random places. In addition if you now turn of your big monitor and only use the laptop display using xrandr your Desktop does not longer look good at all. Of course all these things would be theoretically fixable somehow but I want to propose a more radical solution.

The idea is to give the desktop a good but configurable structure. The user can define serveral areas, give them names and put stuff in them. In addition there are predifined areas at least for starters and for the drives (replacing the ugly “Places” menu). This could look about like this:

GNOME 3.0 Desktop Mock-up

As you still, the left area with the desktop files still sucks. I have no real good idea how to make this look good for everyone but splitting this up to user-defined categories should make it better (let’’s say: “Fun”, “Work”, “Development”, etc.). Of course all these areas can be moved by the user, resized, closed, maybe even organised in tabs, scrolled around with some clutter magic or stcked using a system like the one MacSlow showed some time ago. Note that I don’t think these are similar to plasmoids, this IS the desktop, nothing on top of it.

Something else can would be good IMHO would be to create a gnome-3-list at mail.gnome.org to collect ideas, discuss things and bring up a general concept of what GNOME 3.0 should be. I hope I will find the time to continue this series, most likely with part two being “The panel”.

state election

It's polling day in Western Australia.

polling day

I would consider going to the Radiothon Closing Party, except that it is my patriotic duty to watch Antony Green.

I have to admit, I really enjoy election night and I think it's entirely because of Mr Green. Antony Green has commentated every Australian election I can recall (indeed, the first election I can recall is the 1993 federal election). He is so synonymous now with election-night talking heads he is mentioned in Keating! the musical. One day he will probably retire, I wonder if I will enjoy elections less when he does.

First ever Luz code sprint: Saturday Sep 6th @ CubeSpace in Portland


If you’re in Portland, OR and interested in Ruby, OpenGL, Cairo or music visualization, join us at CubeSpace this Saturday (10am to 6pm) for the first-ever Luz code sprint!

It’s open to everyone, coders and non-coders alike, as there is plenty to do, from hacking on the Luz core, to adding plugins, to usability feedback, brainstorming, and cleaning up the English descriptions of the 150+ plugins.

We’ll have Luz hooked up to a projector, and there will be various fun input devices to play with like a wacom tablet, MIDI controller with knobs and dials, gamepads, etc.

You can come whenever you like and stay as long as you like.

Join us!!

p.s. if you can’t make this one on short notice– fear not, it’s the first of many!

Planning a short stay in Boston

Since my girlfriend wants to learn English and I'll probably have to attend a meeting in Boston, we decided to put it all together and we are planning to stay a couple of months in Boston, from end October to end December. After 5 years working alone at home, it will be refreshing to work in an office together with non-virtual coworkers. It also comes at a good timing because we are planning to release MonoDevelop 2.0 around the end of the year.

This is going to be an interesting end of year.

BTW, I'm currently looking for a small apartment (or big room) to rent, ideally around Cambridge. Unfortunately I'm not having much success, since apartments I found are either too expensive, or not available for those two months. So if you know about some good place, information will he highly appreciated! (mail lluis at novell dot com).

Skia graphics library in Chrome: First impressions

With the release of the WebKit-based Chrome browser, Google also introduced a handful of new backends for the browser engine including a new HTTP stack and the Skia graphics library. Google’s Android WebKit code drops have previously featured Skia for rendering, though this is the first time the sources have been made freely available. The code is apparently derived from Google’s 2005 acquisition of North Carolina-based software firm Skia and is now provided under the Open Source Apache License 2.0.

Weighing in at some 80,000 lines of code (to Cairo’s 90,000 as a ballpark reference) and written in C++, some of the differentiating features include:

  • Optimised software-based rasteriser (module sgl/)
  • Optional GL-based acceleration of certain graphics operations including shader support and textures (module gl/)
  • Animation capabilities (module animator/)
  • Some built-in SVG support (module (svg/)
  • Built-in image decoders: PNG, JPEG, GIF, BMP, WBMP, ICO (modules images/)
  • Text capabilities (no built-in support for complex scripts)
  • Some awareness of higher-level UI toolkit constructs (platform windows, platform events): Mac, Unix (sic. X11, incomplete), Windows, wxwidgets
  • Performace features
    • Copy-on-write for images and certain other data types
    • Extensive use of the stack, both internally and for API consumers to avoid needless allocations and memory fragmentation
    • Thread-safety to enable parallelisation

The library is portable and has (optional) platform-specific backends:

  • Fonts: Android / Ascender, FreeType, Windows (GDI)
  • Threading: pthread, Windows
  • XML: expat, tinyxml
  • Android shared memory (ashmem) for inter-process image data references

Hello world

In this simple example we draw a few rectangles to a memory-based image buffer. This also demonstrates how one might integrate with the platform graphics system to get something on screen, though in this case we’re using Cairo to save the resulting image to disk:

#include "SkBitmap.h"
#include "SkDevice.h"
#include "SkPaint.h"
#include "SkRect.h"
#include <cairo.h>
 
int main()
{
  SkBitmap bitmap;
  bitmap.setConfig(SkBitmap::kARGB_8888_Config, 100, 100);
  bitmap.allocPixels();
  SkDevice device(bitmap);
  SkCanvas canvas(&device);
  SkPaint paint;
  SkRect r;
 
  paint.setARGB(255, 255, 255, 255);
  r.set(10, 10, 20, 20);
  canvas.drawRect(r, paint);
 
  paint.setARGB(255, 255, 0, 0);
  r.offset(5, 5);
  canvas.drawRect(r, paint);
 
  paint.setARGB(255, 0, 0, 255);
  r.offset(5, 5);
  canvas.drawRect(r, paint);
 
  {
    SkAutoLockPixels image_lock(bitmap);
    cairo_surface_t* surface = cairo_image_surface_create_for_data(
        (unsigned char*)bitmap.getPixels(), CAIRO_FORMAT_ARGB32,
        bitmap.width(), bitmap.height(), bitmap.rowBytes());
    cairo_surface_write_to_png(surface, "snapshot.png");
    cairo_surface_destroy(surface);
  }
 
  return 0;
}

You can build this example for yourself linking statically to the libskia.a object file generated during the Chrome build process on Linux.

Not just for Chrome

The Skia backend in WebKit, the first parts of which are already hitting SVN (r35852, r36074) isn’t limited to use in the Chrome/Windows configuration and some work has already been done to get it up and running on Linux/GTK+ as part of the ongoing porting effort.

September 05, 2008

C genuinely less powerful than modern languages

So today I finally realized that C is not only less convenient than modern programming languages, it's also genuinely less powerful than modern languages: In garbage collected (and reference counted) languages you can easily write:

if (attr_list != priv->cached_attr_list ||
    0 != list_compare (attr_list, priv->cached_attr_list)) {
    priv->attr_value = parse_attr (attr_list);
    priv->cached_attr_list = attr_list;
}

In modern languages this snipped works as expected: As soon as attr_list changes in some way it will be parsed again. In C this code doesn't work, since all pointers are just weak references: malloc/free don't know which memory address still are referenced, and therefore malloc easily will return some still referenced memory address. So destroying and rebuilding attr_list can easily lead to the new attr_list pointing to the same memory address as the old list:

old_list = g_list_append (NULL, "foo");
cached_list = old_list;
g_list_free (old_list);

new_list = g_list_append (NULL, "bar");

g_assert (new_list != cached_list); /* usually will fail! */

With C there are good chances that old_list and new_list both point to the same memory address. This clearly sucks.

Didn't expect that there are algorithms you can implement with modern languages, but not with C. Well, but obviously strong references/garbage collection do not only add convenience, they also allow new algorithms.

Yes, old news for the smarter among us, but not common knowledge I guess.

Update: I definitly should use a better phrase than "algorithms you can [not] implement", as I am definitely not here to challenge turing completeness of C.

D-Bus Accessibility - Its alive(ish)

This may not look like much more than another screen-shot of Accerciser. You’ll have to trust me that is Accerciser inspecting firefox-2 over D-Bus. Its the first visible step in a long project aiming to replace ORBit with D-Bus for the AT-SPI accessibility protocol.

D-Bus Accerciser

Mike Gorse and I have been hacking on this for a little over four months now, and its been pretty slow going. I’m very happy to finally have something to show for it.

So much to do…

What we have however isn’t quite the finished article. One of the main goals of the project is to help bring together Gnome and KDE accessibility. I believe that QT already has an ATK implementation, but I think it would make more sense for the QT accessibility interfaces to meet directly with the AT-SPI D-Bus protocol, a project that has not-yet begun.

On the ATK-Bridge / Pyatspi side there is still a huge amount of testing and bug fixing to do, along with a fair few missing features.

So much to test…

Its testing thats really occupying my thoughts at the moment. A while back, on a linux-foundation conference call, I remeber a conversation about how to test the pyatspi and cspi interfaces.

The conclusions were:

  • Have lots of small applications, each exposing only a few accessible objects and concentrating on a single accessible interface, such as the Component or Image interface.
  • Have a unit test written for cspi or pyatspi that is partnered with one of the mini applications, and inspects it over the AT-SPI protocol.

I have made a poor attempt to unit test pyatspi in this way, but I found it was a-lot of work to get any coverage. I think this is down to my choice of implementing a dummy ATK framework to create the applications. Mini GTK applications would have done just as well.

The advantage of lots of these mini applications and unit tests is that when someone comes to implement the AT-SPI protocol with a new widget set, or with new client side bindings they have something simple to validate against.

Where to go

The repository for the D-Bus AT-SPI work is still on the Codethink servers. It won’t be there for long though, there are plans for the project to be hosted at freedesktop.org soon.

the message you should take to your weekend

A quote from a Microsoft guy:

“I think that the next 18 months we’re going to see a 100 to 1,000 fold speed increase in JavaScript as Google and the guys at Mozilla are going to kick us all in the arse and make our JavaScript jittered,” Microsoft senior program manager Scott Hanselman told the audience, days after Google released its Chrome browser, which features faster JavaScript technology.

[...]

“It’s going to be hard to tell if it’s going to be Silverlight or JavaScript we’re going to use for our applications,” he said. “I think in the end JavaScript is going to be a bigger competitor to Silverlight than Flash is.”

Hell yes, we’re making the web kick ass.

Planet Accessibility!!!

"Blog feeds from the contributors of accessibility through technology."
http://www.planet-a11y.net/

Thanks Bryen Yunashko (suseROCKS), and Flavio Percoco Premoli (FlaPer87), for this fine contribution to our growing community!

World Port Days Rotterdam

This year I’ll help out at the World Port Days in Rotterdam. It is an event where the various things related to the port are shown. They’re expecting around 350.000 visitors. I’ll help at the Maersk stand on Sunday afternoon (2 pm onwards). The stand is located next to the Dutch Navy at the Parkkade (right hand side). It should be easy to locate as there will be a ship from Norfolkline alongside which people can visit (stand is about 60m wide).

Stuff at the stand:

  • Info about how Maersk brings seawater from the Pacific Ocean to Rotterdam for the Oceanium. Apart from a cinema there will be a few people from Blijdorp to answer questions. The Oceanium is really nice (I went to a ‘behind the scenes’ tour at the Oceanium a while back).
  • A working reefer container (not sure which temperature it will be set at)
  • Solar boat from TU Delft (Maersk sponsors this). Apart from the boat there will be a flat screen with more info, etc.
  • Other stuff like a free ringtone (Bluetooth), APM Terminals stand next door, picture board, etc (there are just too many things to list).

Thumbnails explosion

Fri Sep 5 13:02:56 CEST wafl.dir.size.max:warning: Directory /vol/vol0/users/luser/.thumbnails/normal/ reached the maxdirsize limit. Reduce the number of files or use the vol options command to increase this limit.

Huhu. There were actually 2 x 135k files under this users's ~/.thumbnails/normal and .thumbnails/fail directories :)

This is RHEL 4.5, there's already a bug about it (i can't find it, but i'm subscribed to it).

I can see that ext4 raised it's dirsize limit from 32K to 64k, looks like it's not enough :)

T61 hda_codec

If anyone is using the latest Fedora 9 kernel on a T61, and their audio device has disappeared, worry not. It’s a kernel regression and is fixed upstream, and should be fixed when we get the next kernel update out.

Erm…

Congratulations to the FSF for managing to get the legendary Stephen Fry to celebrate the anniversary of GNU. I am just somewhat surprised they decided to license it under a non-free license (Creative Commons Attribution-No Derivative Works 3.0 United States).

Boot’s on the other foot now, eh?

Using Visual Studio to Debug Mono

The following screenshots shows Visual Studio debugging a remote Mono process running on a Linux box.

Breakpoints, current line, and stack traces.

The setup works like this: you run a debugging server on Linux. On Windows you install a Visual Studio extension that provides a Debugging Engine and the configuration tools to start your application.

Then you start your application from Visual Studio (Tools/Launch with Mono) which will send the binaries and debug information over to Linux and execute it.

Showing the disassembled code generated by Mono's JIT

The core of the above work is to get the Windows to Linux debugging functionality enabled. We will have more news when the debugging experience is more complete and we are approaching the time to test drive it.

If you are interested in trying it out, sign up for our preview on our web site.

Debugging Support

Mono 2.0 will for the first time include a debugger, the command line mdb command.

Beyond this, we want to offer GUI debugging. The native solution is being built on top of MonoDevelop and will be available when we release MonoDevelop 2.0. It will work on both Linux and MacOS hosts.

The second GUI engine will be the above Visual Studio plugin for developers that use Windows as their main OS and Visual Studio as their IDE.

More Visual Studio Integration

In addition to this work to integrate Visual Studio with Mono for remote debugging, thanks to the Summer of Code (Ed Ropple) and Jonathan Pobst's work in this hack week we got some support to run applications on Mono/Windows and run our Mono Migration Analysis tool.

Jonathan's work is available today as an MSI, check out his post for more details.

You can also check Ed's summer of code report on CloverLeaf.

September 04, 2008

Another coffee flavor moment

From the same people that brought you Frank Sumatra, I present you Bean Martin!

Bean Martin

EEE, etc.

Dear lazyweb,

I have this EEE PC 2GB, and I'd like to install something I can be productive with, not the clunky s*** that come with it[1].

So far I tried the following:

  • Mandriva Flash: would be good, but the Live flash from GUADEC does not install on the 2GB model as it needs more space. *sigh* FAIL
  • openSUSE 11.0: installed from the DVD after reducing the packages and end up with a non-functionnal system: YaST does not start, no wifi[2], no Ethernet, etc. Gotta have to debug it and fix it. FAIL
  • EEE-Ubuntu Ubuntu-EEE: I don't like their statement bashing open solutions. Sorry guys I use Linux for the freedom. Anyway it seems to not like to be installed on 2GB either. FAIL
  • EEEdora: the long list of hacks did deter me.
  • Debian: they upstream broke the kernel. Not a good sign idea.

So what else?

I'm not installing on an external SD card as I want to keep that for useful removable storage

Thanks.

Update: I got ahold of an iso for EEEdora from this howto. It did install almost without glitch (I actually had to make a symlink for the live CD to find the DVD drive, go figure). Did install but I get a functional but akward system without login and without a proper user (it can't even sudo), where either logout or reboot do an actual shutdown.

Update 2: it is Ubuntu-EEE I tried not EEE-Ubuntu. How confusing!

Update 3: kernel is broken in upstream no Debian.

Notes

[1] I'll keep that rant for later

[2] almost expected

mobti


For the last month or so I have been working intensively on a site called mobti. I got the idea for it when I was discovering something new about my personality, and thought it would be nice to have a website where I could easily find people of a certain MBTI type, e.g. to find out if there are commonalities. The idea expanded and for a long time I put the project on hold, thinking that it would probably take too long to tackle right now.

While it’s not quite finished yet, it is basically usable and I was quite pleased with the amount of work I got done in this relatively short time period. The biggest time saver turned out to be the decision to switch from code igniter to CakePHP, which spared me from having to implement many mundane details, like an authentication system (I know that CI has third party libraries for this, but I couldn’t find anything that appealed to me). I used jQuery for the Ajax and effects and quickly fell in love with it. The last time I used JavaScript was many years ago, when it was virtually impossible to write anything moderately complex and expect it to unconditionally work on all major browsers. It is almost unbelievable how much things have improved, and I’m actually looking forward to write more JavaScript based interfaces now.

Deblois plays NYC!

My sister Deblois will be playing her acoustic-folk-blues-surf-rock in New York City on Friday and Saturday nights; details here or below the fold. (Some sample music here; buy here.) Krissa and I will be at both shows; let us know if you want to join us!

Deblois in Miami

Deblois in Miami

Friday, September 5th, 2008

THE NATIONAL UNDERGROUND

7pm

159 E Houston
NY NY
Price: 7$ AT THE DOOR

This club is Joey and Gavin Degraw’s place, Danny Campbell with me on drums; we will have a great show.

Saturday, September 6th, 2008

Arlene’s Grocery

7pm

Price: $10

Subway directions: F or V train to 2nd Ave exit 1st Ave and the club is one block below Houston St between Ludlow and Orchard.

New music by Karoliina

Karoliina just E-mailed me to tell me that she just finished her new song.

This one sounds more like Vangelis than I have ever done before. It combines some symphonic elements (some (sampled) instruments from symphonic orchestra were used) with synthetic sounds.

– Karoliina Salminen

The song

A video with the song as background showing the cathedral in Mechelen (filmed by Karoliina and Kate during Akademy)

I like it!

Mozilla Camp 2008 Europe in Barcelona, October 25th and 26th

Barcelona is holding the Mozilla Camp 2008 Europe during the 25th and 26th of October 2008. The event will be hosted at Citilab building. The meeting targets development, quality assurance and localization contributor's around the Mozilla projects. The organizers are expecting around 150 participants.I will be definitely attending to the localization sessions.

More information at William's weblog.

pictures

Release notes work is beginning to take place. GNOME people: if you're not already done so, visit this page.

matt: programmer playboy
Matt's secret wish is to be the centrefold in Phrack

Had my camera at work today...

data centre: 2008

more data centre porn

Three new smooth themes for Murrine (Chrome, Cream, Candido)

Today is the 3-C day: Chrome Cream Candido! :-)

Since I would to show you the new contrast function, I’ve done 3 new themes that are using it to draw their widgets.
They require the latest Murrine SVN snapshot. Emerald themes are included.

You may not like them, they were created just to show the contrast function, not with the goal to be a killer-theme :)

Also, as they have a low contrast, you need to use a great LCD monitor to enhance their feeling, so in some CRTs they might look very odd (I hope not!)

As always, download is available in the Murrine Themes Gallery.

New Contrast function for Murrine (Clearlooks soon)

Yesterday I’ve rewritten the contrast function of Murrine, now it works much better, increasing or decreasing the contrast of the whole window, with better results.

Below a comparison/testcase, where I used big values to show you better what this means. It’s not meant to be good-looking, but to show how the engine manages the values.
Of course adjusting contrast to smoother values will be really useful to improve the quality of your themes.


contrast = 0.2


contrast = 1.0


contrast = 1.5

VirtualBox 2.0

Sun xVM VirtualBox 2.0.0 was released today, and is available for download from virtualbox.org. New features include 64-bit guest support, host interface networking on Solaris and OS X hosts, support for nested paging on modern AMD CPUs, and a native front end for the OS X client (and a move to Qt 4 for the others).

More detailed changelog here.

Two Years Going Strong

Two years ago today I came to work at Canonical as the Ubuntu Community Manager. When I started at Canonical, it was just me working with Mark to define my role and focus and to determine what I wanted to do to help grow and facilitate our stunning community. Since then I have become part of the wider Ubuntu team at Canonical, and I have grown out my own team with my fellow horsemen Daniel Holbach and Jorge Castro. I am looking forward to continuing to grow the team and continuing to help our community to do amazing things.

Canonical is a fun and inspiring place to work, and it has a very distinctive atmosphere; an atmosphere that is driven by a workforce that has the bit between their teeth to get out there and really make a difference. With today marking my two year anniversary it has got my mind thinking about the incredibly smart people that I have the pleasure of working with each and every day. Firstly, this obviously includes Daniel Holbach and Jorge Castro - not only great staff, but my brothers in our Ubuntu journey, plus our close brothers in arms Graham Binns and Pedro Villavicencio Garrido. I also want to send props to the main man himself, Mark Shuttleworth, my immediate peers with Matt Zimmerman, Scott James Remnant, Colin Watson, Rick Clark, David Mandala, Pete Graner, Henrik Nilson Omma and the various people I have worked with closely at Canonical (including, but not limited to) - Malcolm Yates, Ben Collins, Steve George, Kat Kinnie, Michelle Surtees-Myers, Billy Cina, Cezzaine Haigh, Claire Newman, Gerry Carr, Jane Silber, James Westby, Matt Nuzum, Magdalena Lobodziec, Sebastien Bacher, Kenneth Wimer, James Troup, Chris Jones, Brian Murray, Claire Davis, Randy Linnell, Ted Gould, Mirco Muller, Chris Cheney, Alexander Sack and many more.

Of course, Canonical employees are only a fraction of my colleagues; they are augmented by our incredible community…a community that is brimming with the same kind of enthusiasm, excitement and commitment to the crusade, and our community is doing great. We are nailing bugs with 5-A-Day, getting more and more participants on Ubuntu Open Week and Ubuntu Develop Week, our LoCo teams are now 170+, MOTU is growing every month, and our UDSs are becoming breeding grounds for great contributors. I am also incredibly happy that Ubuntu is still fun - when producing an Operating System as large and well known as Ubuntu, there is a risk of us getting wrapped up in the less interesting side of popularity, but from what I can tell, we are all still having a blast. :)

I am hugely proud of our community, I am hugely proud of Canonical, and I am hugely proud to be both a member and employee. Here’s to another two years, and lets just see what is possible… :)

Restart works - Thanks Ubuntu kernel team!


One of my pet peeves of using Ubuntu has been unable to restart the computer by selecting “Restart”. I filed a bug a looooong time ago when I had my Averatec laptop. Sometime after that, I got myself a HP nc4200 and forgot about this bug report. And my Averatec laptop eventually ended up in my pile of high tech junk. (Its LCD screen only works intermittently by the way. :( )

Last week, I got an email notification from Launchpad. The Ubuntu kernel team needs someone to confirm if the updates in the kernel fixes the bug. I grabbed my Averatec laptop, which has Ubuntu 7.04 in it, and installed the newer kernels.

(This is my desk in my “kernel testing” mode. The silver-ish laptop is my Averatec laptop.)

So I installed two kernels 2.6.27-2 and 2.6.25-5 in it. Restart works!

Big HUG to everyone who works on the Ubuntu kernel!!!

I should have checked out the Ubuntu Intrepid alpha 5 release date. Oh well, their code freeze date has already been passed.

Moral of the story:

  • Open source software developers always need help testing their work. There is nothing called “too many helpers”.
  • Beware of deadlines (*sign* *sigh*).
  • High tech junk can be useful for testing.

September 03, 2008

Software Freedom Day 08 - Wellington needs sponsors!

As time draws closer to Software Freedom Day, there’s still plenty of opportunity to register for the event.

More importantly, this event couldn’t be run without the support of sponsors. Unlimited Potential, CWA New Media, NZOSS, SuperHappyDevHouse, WellyLug, Catalyst IT and Sun have all kindly stepped forward to help in some way, but unfortunately we still need some more financial support to help run this event and provide food to our hungry barcampers and hackers! If you know of someone who would be interested, please send them my way to (glynn . foster @ sun . com).

Coffee flavor of the day

Coffee flavor of the day at work

Today’s coffee flavor of the day at work: Frank Sumatra! :)

How to steal from a Fox

Interface design is hard work, so it’s really nice when someone else has done much of the heavy lifting for you and left their labor open to cherry picking.  :)  The Mozilla platform has been getting a number of upgrades in large part due to the work of the Firefox team and thankfully I have no shame in stealing the work of our compatriots.  Here’s how you can do it too.

What to Steal

I started in the Preferences area because we (TB & FF) share many of the same mechanisms used to change preferences.  Also it’s difficult to get preferences done right so it’s nice to be able to take all the hard work someone else did there and make it our own.

In Bug 451620 — “Remove the Advanced Preference for Connection timeout” we are cleaning up a preference mostly used for debugging and therefore doesn’t really belong in the main interface.  While working on the patch I took a look at FIrefox’s preferences to see what they were doing in that area and noticed they have the exact same preference, but it looked cleaner and nicer.  So I took it. :)

In Bug 452711 — “Use firefox default font chooser for display” I wanted to improve a users ability to change their font preferences.  Currently Thunderbird requires a user to change fonts with the daunting font dialog now available from the Advanced button.  In making this patch I went straight over to the Firefox font preferences and ported it over to our code.  Again, I have no shame about taking this either. :)

How You Can Steal Too!

Stealing code for preferences is easy, so easy, that I (not a programmer) can do this in a fairly short amount of time.  It only takes a reasonable knowledge of HTML/XML (XUL can help) and Javascript.

There are lots of this kind of preferences work to be done and it’s a great way for a new person who wants to submit a patch into the codebase to get a sense of the process.

Here’s a step by step on how I’ve been borrowing their code such that anyone should be able to do it.

Step 1 - Source Code

Get the source code from steps in the Comm-Central source code wiki page.  This step takes a little while as it downloads all the necessary components to build Thunderbird.

Step 2 - Initial Build

Build Thunderbird initially, you should only need to build it entirely once.  Follow the steps to create your .mozconfig or you could just try mine, which gives you a debug build.

export MOZCONFIG=~/tbsrc/comm-central/mozilla/browser/config/mozconfig
. $topsrcdir/mozilla/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/tbird-debug
mk_add_options MOZ_CO_PROJECT=mail,calendar
ac_add_options --enable-application=mail
ac_add_options --disable-optimize
ac_add_options --enable-debug

Then run the build command as they describe.  Now go get some coffee or something.

Step 3 - Start Stealing

Time to start stealing!  Move into the Mail Preferences code and open up one of the files (check out Prime Places to Steal for ideas).

(from src)
cd mail/components/preferences/

Then at the same time go into the Firefox preferences and open up the preferences file that has the component pieces you’re looking to steal.

(from src)
cd mozilla/browser/components/preferences/

Step 4 - Building Your Theft

Now as you viciously swap pieces from the Firefox preferences over to Thunderbird preferences you don’t need to rebuild the entire Thunderbird source code, just the preferences component you’re changing.

Move into the preferences component on the build directory.  (this assumes you have a tbird-debug directory, which you’d get if you used my .mozconfig file)  There should only be a Makefile in this directory so type “make” and it will build up the preferences component.

(from src)
cd tbird-debug/mail/components/preferences
make

If you were to change any of the strings (preferences DTD files) used in the DTD that the XUL file references then you’ll need to rebuild the locales jar, which is just as easy.

(from src)
cd tbird-debug/mail/locales
make

Step 5 - Testing Your Theft

Now you’re ready to run your new version of Thunderbird!  You’ll likely want to create a different profile than your normal profile.

(from src)
./tbird-debug/mozilla/dist/bin/thunderbird -P test

Common Gotchas I Encountered

Here are some common errors I hit that were annoying to work through.

Parse Error: If you add code with references to DTD entities ( often labels like “&colors.label” ) that don’t exist you’ll get a parse error that’s pretty difficult to understand.  Check that your DTD has the correct entity ( <ENTITY colors.label “Colors:”> ) and that you’ve built the jar from the locales directory.

Adding New Files: If you’ve added new XUL and DTD files you’ll need to add references to those files in the “.mn” file.  Don’t ask me why!  I just work here.  See the preferences jar.mn and the locales jar.mn files, the format is pretty obvious.

Prime Places to Steal

Bug 451599 — “Add preferences UI for disk cache size and clearing the cache“.  To implement this bug you really just need to grab the Firefox Preference code from line 221 to line 233 and copy it just after line 216 of the Thunderbird Preferences code.  You’ll need to poke around at the related Javascript code for hooking it up.   And don’t forget to copy the strings from Firefox advanced.dtd file into the Thunderbird advanced.dtd file.  See, no shame at all!

Another one is the continuation of Bug 452711 — “Use firefox default font chooser for display” where you can copy over the color chooser.  First apply the patch provided in the bug. Copy the Firefox colors.xul file over to the Thunderbird preferences directory and the colors.dtd over to the Thunderbird preferences locale directory. Don’t forget to update both jar.mn file