On Language

November 13th, 2008 by John Carr

Having recently taken some books home, I find myself with “On Language” as the nearest book for the great book meme (Rob, a few metres to my rear, ended up with something much cooler).

In the same way, if somone speaks a collection of dialects, you will only discover a great confusion if you do not separate the elements of which this ensemble is composed.

Want to join?

  • Grab the nearest book.
  • Open it to page 56.
  • Find the fifth sentence.
  • Post the text of the sentence in your journal along with these instructions.
  • Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.

Yucktube Meme

September 29th, 2008 by John Carr

Sometimes the office just needs a dose of this stuff… Nothing brightens the day more than a filking Rob.

YouTube Preview Image YouTube Preview Image YouTube Preview Image

Of course, sometimes i’m made to listen to slightly surreal stuff.

YouTube Preview Image

And yeah, the youtube plugin on blogs.gnome.org is lovely. I hope it starts to work in feeds…

On feet and sniper rifles

September 20th, 2008 by John Carr

A few days ago I ran into the old shooting yourself in the foot with a programming language jokes. And then again a day later, it appeared in #vala. At some point today or yesterday I had a mishap with git history editing and have, umm, shot myself in the foot.

In your hands you hold a powerful sniper rifle. Those familiar with it consider it the most impressive and technologically advanced sniper rifle in the world. It is the quickest way to shoot, with bullets travelling at up to Mach 3. Multiple enemies are dead before a single shot is heard.

Impressed at your choice of sniper rifle, you reach to turn off the safety and realise that it doesn’t have one. You reach for the trigger, only to find it is not where you normally expect to find a trigger.

After seeking advice, you are advised to read about the internals of the sniper rifle (its manufacturers say that understanding how the sniper rifle is built is the only way to get the most out of a sniper rifle) you are ready. You start to shoot enemies and find yourself somewhat joyful at the amount of power you are wielding. You feel in control. You feel liberated. Pow pow pow. How did I get anything done before I had this beast?

All your friends, feeling left behind, get one too.

At some point you look down and you realise you shot your foot, a large chunk of it is now missing. Oh well, the pieces are still around if you look hard enough. Here’s a sewing kit.

Luckily I only lost 2 files, which were pretty much unchanged from master. The rest I think I can still get to just by splitting surviving commits. And just when I thought I was about to level up my git abilities too.

(Disclaimer: This is not a cry for help, nor is it a call for flaming, just an unfunny “OMG I SHOT MYSELF IN THE FOOT”).

Dell Inspiron Mini 9 - First Thoughts

September 17th, 2008 by John Carr

I couldn’t resist the Dell Mini. Many confused looks from the ThinkPad corner. “What? Dells are cheap pieces of crap!”. Regardless, I’ve always had good experiences with Dell hardware (even if I do miss find myself missing a nub). So as soon as they became available on the Thursday 4th, I ordered. My new toy arrived on Thursday 11th.

Almost a week in, how is it going? Well, lets start with the things I can moan about:

  • No mobile broadband for me. I had hoped to pop in a standard card and my Three SIM, but even though the board is marked “WWAN” and the pads are there, the Mini PCI-E connector and aerial wires are missing.
  • Broadcom Wifi. Eww. It needed some proprietary blob, so only Hardy seemed to support it out of the box. Not quite true, stock Hardy has a bug so I needed to apt-get upgrade and reboot. I have a more permanent solution. I replaced it with an Intel card from ebay. £7, including postage. Much much better, and it even joins my local network 5s quicker :D
  • No sound. Had to edit /etc/modrobe.d/* to add options snd-hda-intel index=0 model=dell, then it did. Not sure why auto mode doesn’t work.
  • Battery doesnt have anyway to see the current charge status when not logged in (no charging LED, no LED strip on battery with a “press here for status” button).

Otherwise, I’m really happy. I’m writing this blog post on it, and as you can (hopefully!)  tell, the keyboard isn’t causing me too much pain. In fact, i’m adapting quite well and am currently sat in the dark not paying any attention to the keys im pecking away at. The sound quality good, the webcam is good, GNOME is nippy enough. Compiz is more than usable, and for once i’m not reaching to turn it off. As usual for my Dells, i’m pleased with the screen.

Ubuntu Hardy is your best bet to get the wifi work. Intrepid is also working just fine. Mandriva (GUADEC USB key) and Fedora 10 also boot, but won’t have wifi. Ubuntu Feisty and Fedora 9 wouldn’t boot. Atom doesn’t do x86_64, so have your 32bit media to hand.

It doesn’t come with a case, but I got a 9″ portable dvd player sleeve from Amazon which is perfect.

So far i’m pleased with my purchase. Low low low budget camera phone amateur Dell pron here.

Congratulations Xfce

September 16th, 2008 by John Carr

Last night I caught wind of the Xfce 4.6 alpha (codenamed Pinkie). Congratulations guys, it looks like its shaping up to be a fine release.

Why blog about this (other than its awesomeness)? Well one bit I did notice was that they have a gconf alternative called xfconf, and of course unlike our current gconf it is entirely dbus based. And, on hearing a suggestion, a rumor, a murmur that GNOME is all about the people and the community… I think it would be cool if we could work with the Xfce guys on this one. I mean their project uses GObject, dbus and has the same goal, right? I’m told we want an ORBitless desktop. So whats stopping us from sharing this part of our desktop?

If you see technical limitations of their system (I haven’t looked, I assume sanity and beauty), instead of a rant about it here why not go forth and help them out? Community, community, community.

Of course it could be that dconf or gconf-dbus (our 2 non-mainline gconf-orbit replacements) would be a good fit for Xfce too.

Heres to a *conf-dbus for GNOME 2.26.

git-mirrror - making it suck less

August 22nd, 2008 by John Carr

Federico notes of a change that every single git-mirror user needs to make to every one of their clones to have its tags stay up to date properly. So, dear lazyweb, my question is simply this: How can I (as git-mirror guy) make this annoying git-foo go away? I hate stupid crazy repetitive manual crap that every one of my users has to put up with !

You can see how the mirrors are currently created and updated in the vcs-mirror repository. To share in my vodka and whisky spoils for setting up git-mirror (which, despite idle threats to the contrary, i’m still waiting for) your solution should not disturb existing clones….

(And yes, that is a hg script you see).

A Revelation

August 19th, 2008 by John Carr

After a long talk with a friend, I felt the need to dig out an old quote that I’m particularly fond of. For my own future reference:

“I’d like to share a revelation that I’ve had during my time here. It came to me when I tried to classify your species. I realized that you’re not actually mammals. Every mammal on this planet instinctively develops a natural equilibrium with the surrounding environment, but you humans do not. You move to an area, and you multiply, and multiply, until every natural resource is consumed. The only way you can survive is to spread to another area. There is another organism on this planet that follows the same pattern. A virus. Human beings are a disease, a cancer of this planet, you are a plague, and we are the cure.” — Agent Smith

Thank you :-)

August 14th, 2008 by John Carr

Yesterday I received some post. How is this blog worthy? Well after LRL, I was approached by people offering me test devices for adding Conduit support. Gareth Qually has donated a Handspring Treo 90 and John Connelly has loaned a Tungsten T3 and a Treo 650. All of the devices arrived yesterday and are now sat on my desk. How awesome are these guys! *Happy Dance*

A little closer to home (well, office), Rob Taylor got a new phone and donated his old M600i.

At the moment this means my pile of dedicated test devices looks like this:

  • Sony Ericsson P900
  • Sony Ericsson M600i
  • Dell Axim X5
  • Orange SPV C500
  • Palm Tungsten T3
  • Handspring Treo 90
  • Treo 650

I also have a Nokia 3310, but i’m not sure I can even connect it to my PC…

I also have ad-hoc access to Rob’s new phone, as well as my own SPV E650, Nokia N810 and iPod video. These are in regular use so won’t find themselves strapped to the Conduit test suite any time soon (but it does mean that some of this stuff will get tested by ‘users’ too :-))

Fun times ahead getting all this stuff to work :-)

Conduit and Accessibility

August 4th, 2008 by John Carr

This blog post is a friendly note to application maintainers out there to think carefully about how accessible your software is, especially when using non-standard widgets or canvases. Accessibility is important and it can also be hard. So think about it early and think about it often. Below are some notes from in the trenches, and if you think about a11y from the beginning things won’t end up this way for you.

One issue to rise out of the current module proposal discussion is Conduit and its accessibility. In order to be a good GNOME application, Conduit needs to be accessible. The use of a canvas to render shiny goodness manually means that we sacrifice lots of ready made accessibility.

Conduit has two major issues on the accessibility front. Can I control it without using a mouse? And can I tell what is happening when i’m using a screen reader? Sadly, the current answer is no and no. Having decided to change this, I’ve spent the weekend looking at how to pass more useful information to the accessibility infrastructure.

We use GooCanvas, which is actually already accessible. Each item that is added to the canvas is available to accessibility tools, be it a raw canvas item or a gtk widget. Basic information such as its size and position is exposed without any effort on the part of the application author. Whilst experimenting, I have hit the following limitations:

1. Without implementing more ATK interfaces, the only Conduit relevant information I can expose is a name and a description for each object. Its not easy to implement new interfaces without throwing away the existing interface. This is really quite limiting, and I don’t think it will make for a good enough user experience. (I don’t consider this a GooCanvas bug, but instead something that Conduit needs to fix on its own).

2. GooCanvas doesn’t seem to implement the children-changed signal. In testing this has meant that accerciser is unaware of changes on the canvas, and i’ve needed to keep restarting accerciser.

So GooCanvas needs a patch to fix children-changed. Lets defer that to later, i’ll look at it early in the next cycle. For now I need to work on fixing Conduit. Hopefully I can derive from the existing Goocanvas ATK objects and extend, as opposed to rewriting it all. Sadly not, the GooCanvas accessibility code isn’t available from python, so I need to re-implement everything. Again, potential patch to pygoocanvas deferred to early next cycle.

From reading the Devhelp for ATK, it seems that I just need to implement an atk.Object (and assorted interfaces) and an atk.ObjectFactory for each accessible GObject I want to have. So how do I implement an interface in python? My initial thought was that I would just have to derive from them:

>>> import gobject
>>> import atk
>>> class Foo(atk.Object, atk.Component):
...    def some_method(self, param):
...        pass
...

Is it enough?

>>> gobject.type_interfaces(Foo)
[]

GObject doesn’t seem to know that I want to implement an interface. So my code is not enough. After poking this for some time it turns out there are two fundamental pieces of fail with my first attempt.

At some point, pygtk claimed to automatically register things for me. In this case, maybe more generally, this is not the case. I need to register my class with the GObject type system:

>>> gobject.type_register(Foo)
>>> gobject.type_interfaces(Foo)
[<GType AtkComponent (136469760)>]

Victory! At this point I was hoping my code would spring to life, but it didn’t. Poke, poke, poke. When overriding a GObject method from python or implementing an interface you need a do_ prefix. Presumably this is to make the introspection foo a little less scary. So I needed:

>>> class Foo(atk.Object, atk.Component):
>>>    def do_some_method(self, param):
>>>       pass

Once you have implemented your accessible object, you need an accessible object factory, and you need to register it with the default ATK registry. I’m leaving some bits out here, but basically:

>>> class FooFactory(atk.ObjectFactory):
...     def do_create_accessible(self, obj):
...         return Foo(obj)
...
>>> gobject.type_register(FooFactory)
>>> atk.get_default_registry().set_factory_type(GooFoo, FooFactory)

Now when ATK encounters a GooFoo object it should ask FooFactory for an accessible version of it. It will get a new Foo object.

Unfortunately this is not what happens. !”£$. A new FooFactory is instanced, and then a GCritical fires, because create_accessible isn’t happening and something is then trying to ref a null. Sigh. Epic Fail. After examining pygtk, it turns out that the create_accessible method of atk is blacklisted when bindings are generated. I unblacklisted it and encountered a nice compile error. If you poke around (or ask Rob), you’ll see that create_accessible is defined without a self, its essentially a @staticmethod. This is an edge case that the code generator doesn’t currently handle, and the wrapper ends up trying to pass too many arguments. So now I need to figure out a suitable patch for pyatk (or the code generator) before I can continue…

Big thanks to Rob for helping me with this so far, your big chunk of clue has been most welcome. You can has beer.

The blinding past

July 25th, 2008 by John Carr

I lolled so hard. Thanks Rob.


Bad Behavior has blocked 137 access attempts in the last 7 days.