Log on:
Powered by Elgg
Spreadfirefox Affiliate Button

Steve Lee :: Blog :: Archives

December 2007

December 01, 2007

A preview and FAQ for the Cape Town Open Education Declaration is available and it looks like schoolforge.org.uk will be adding a signature to those already there as it codifies many of our aims and efforts. This is an initiative arising from a meeting between the OSI, the Shuttleworth Foundation and others that aims to "accelerate the international effort to promote open resources, technology and teaching practices in education".

I was also pleased to see this in the Open Resources statement: 

Resources should be published in formats that facilitate both use and editing, and that accommodate a diversity of technical platforms. Whenever possible, they should also be available in formats that are accessible to people with disabilities and people who do not yet have access to the Internet.

There's some resonance with the Open Web concept as defined by the Mozilla Manifesto and which provides a platform for many of these aims.  

Posted by Steve Lee | 0 comment(s)

December 04, 2007

We're starting to see a number of hardware platforms suitable for creating Assistive Technology devices based on an Open Source software stack of Linux and Mozilla Firefox. This gets us nearer to personalised OATS solutions such as communications devices that provide internet communications. This offers possibilities of empowerment, especially when hooked up with social network systems. When can also hope for Open Hardware solutions too.

Nokai N810 

Linutop

ASUS eee PC

The Nokia has a completely Open developer platform and community in Maemo but I'm not sure about the others.

Posted by Steve Lee | 0 comment(s)

I've been working on Jambu by myself for way too long and would welcome contributions from anyone interested in accessibility and helping people with physical disabilities get better access to computers and the web through Firefox.

I have set up a Google group /mail list in order to facilitate discussion and the following is the first post:

I'm creating this list as it's about time I opened up Jambu a bit more. All this talk about Open Source and I'm the only one working on it at the moment. Many brains are better than one and there are enough challenges now to keep several of us busy. You're in the right place if you fancy a challenge and want to work on accessibility in Linux (and eventually Windows).

I'm currently working on the in application code that allows direct navigation and operation of the Firefox 3.0 user interface through AT-SPI on Linux. We've got code to allow navigation and selection of key interface objects. We can drive firefox with 1 or 2 USB switches either as a standalone program or as an accerciser plugin. Scrolling needs to be done. Text Editing simply pops up a message box for now but will hook into an OSK or dasher for text input.

The challenge is to handle the dynamics including: popup menus, pulldowns, dialogs, changes in enabled state and visibility and also the Mozilla 'find' toolbar. We need design and code and a big part is analysis of the events that Minefield generates. Menus are basically working with some seemingly random glitches that are proving hard to resolve.  Accerciser code and even Orca is useful and following a focus tracking design as far as we can would mean that we are well tested territory.

It is also a matter of determining if Firefox is doing something sensible and raising bugs if it is not. I'm getting some wide variations in behaviour at the moment so need to stabilise that and get consistently reproducible behaviour. This is no doubt caused by the fact that we are driving the UI with AT-SPI doAction() and not by mouse or keyboard and so is on untested territory. The exact order of the events seems to vary, probably due to timing issues that need to be sorted (for example there is no 'update complete' signal so you need to allow for further changes).

A couple of recent regressions in the a11y of the FF nightly builds have added to the fun.here. Another problem I have been facing is frequent desktop lockups which are now mostly solved, especially by running the code standalone. You can use Ctrl+Alt+F1 to find and kill the task. The firefox team are working on various bugs and Marco the new Mozilla a11y QA is very proactive and helpful.

Code:
Browse source: http://www.oatsoft.org/trac/jambu/browser/action_groups
SVN access: http://www.oatsoft.org/trac/jambu/

The design use GTK TreeView which use MVC. The current view is useful for development but will be replaced with a view that performs overlay drawing on the FF UI. Currently a simple blink rectangle shows what's selected.

Posted by Steve Lee | 0 comment(s)

December 05, 2007

I just spotted CPAP.co.uk a site dedicated to OSA or Obstructive Sleep Apnoea which I have. It 's a dynamic site with lots of info boxes and web fora plus a Yahoo map mashup for locating CPAP a centre. It seems to be related to Respironics who sell CPAP machines. Last time I looked there was hardly any info on the web but now there are many sites.

Sleep Apnoea is a condition where the soft palate at the back of the throat collapses and obstructs breathing when sleeping. This results in continuous waking, though that is usually not realised. Apart from chronic tiredness it can put strain on the heart and has other associated health risks. It's most common in overweight men (cough) but is rapidily spreading and is now more widely recognised. Snoring often accompanies apnoea. Treatment is possible on the NHS but departments such as Exeter's Clinical Measurements are in demand and under funded.

The most effective treatment is a CPAP machine which supplies air through a mask and which keeps the palate open. I use ResMed device which is very effective, portable and reliable and after several failed attempts have a mask that rarely leaks causing noise and dry eyes. I also use nose strips and a nose spray to reduce perennial allergic rhinitis (swelling of lining of nose).

So I guess I'm an AT user, though at times it would be great to have something that compensated for the tiredness or 'foggy brain'.

Apnoea is strange as you don't realise you have it or the sympotoms, just that you are ineffective, emotional or 'nodding off' during the day. I find it comes and goes and I have occaisonal bad patches, usually  before a cold sets in. I think I probably had it for years without realising it and was diagnosed when we had bad nights with young children and I thought I might be getting depression.

The CPAP machine has been a great help and I'm glad that I have very mild Apnoea, severe cases can fall asleep mid conversation. 

 

Keywords: Apnea, Apnoea, CPAP, OSA

Posted by Steve Lee | 2 comment(s)

I've been having a number of problems with developing the 'in application selection' part of Jambu using pyATSPI and thought I'd pass on a few tips. In hind sight the problems may seem fairly obvious but they were driving me mad. I wonder if the Orca team have the same fun and games at times?

Desktop lockups - don't use a debugger
I went through a long painful phase of endless lockups, and while they still occur I have far fewer. I'm using Wing IDE but it turns out the debugger interacts in strange ways, especially when breakpoints (or stepping). So now I use Wing as an editing environment and run the code from a terminal and get it to print log messages (ah the good old ways).

I was developing a Accerciser plugin and these seem particularly prone, and it's best not to run accerciser at the same time as other code. This is not a fault of accerciser, just a side effect of the its workings and AT-SPI. I think another factor was the fact that both my application and the target app use ATK and when I concentrated on Minefield rather than GEdit these largely went away.

The solution is simple, use 'Ctrl+Alt+F1' to get a console, run 'ps U <user> | grep <app>, followed by 'kill <pid>' or 'kill -9 <pid>' and Ctrl+Alt+F7' to get back to the desktop.

Random behaviour and missing events - keep things constant
Many times things just don't happen the same way twice. For ages I just didn't see some events and again it turns out the debugger was interfering. Even with constant code, I got variations, perhaps just not realising I was doing something different but I suspect timing is most likely the variant. I also found that running Accerciser at the same time sometimes caused changes to observed events.

I created a simple script to monitor and print events and this is invaluable especially as on occasion adding log messages to my code changed the behaviour.

The best solution seems to be to ensure your environment is as simple and constant as possible. Don't run a music player etc and try to keep every thing the same each run. At one point I went to the extreme of restarting Minefield every time I ran the code. This can all be hard when the dev environment is also your desktop, 2 machines would be ideal.

At Eitan's suggestion I tried using 'gdmflexiserver --xnest' which gives you a new desktop in a window but I have not yet got it to work.

Event processing

This effectively cross-process or multi-tasking work and you need to be aware of the possibility of seemingly strange interactions. Actually I just thought I aught to do as little as possible in the event handlers and rather signal the main thread. I think accerciser does something like that so I'll try it.

One factor is the way AT-SPI events occur in bursts and without a 'done' event to trigger code from. I'm not sure of the threading model but you may be processing in the middle of a set of steps that the applications is performing that should eally be treated as atomic. For example I found that trying to access the added child in the 'object:children-changed:add' event gives an index error. I suspect that this is less of an issue with screen readers where the time for user reactions lets all the events get processed.


Code examples
Accerciser and Orca provide plenty of example code, though with very different styles and sometimes it's a little hard to see the 'wood for the trees' when you want a simple 'how to'. We could do with some good developer resources. I haven't yet found a definative list of all the events which are in the IDL  but this is a start.

Posted by Steve Lee | 1 comment(s)

December 06, 2007

xkcd on Python

(Shameless 'me too' post)

Keywords: cartoon, Python, xkcd

Posted by Steve Lee | 0 comment(s)

More important that any of the previous tips if you want to avoid wasting lots of time killing locked processes or chasing wierd behaviour:

  • Don't do anything much in an event handler set with pyatspy.Registry.registerEventListener(). Rather do the work in your main thread.

I hadn't realized that AT-SPI listeners are synchonous so you're want to do as little as quickly as possible. You can pass references to Accessibles out from the listeners.

I was getting lockups even with my test script that simply prints events. Changing to using gobject.on_idle() solved this. This is a huge relief and a real time saver but I really should have twigged it sooner. After all I once coded many complex interrupt routines in my assembler and embedded C days.

While these removes problems with lockups it introduces a new set as some accessibles are temporary and have gone by the time you process them. At least this is the case with popups where I wanted to process the the tree contained in the window. I guess I'm learning why menus are in the main tree as well, but still haven't found a good way to link them from a popup/pulldown. I think the only way is to make assumptions about where you are and which menu has appeared.

Anyway her's an example that prints accessibles, assuming they stay around. It also assumes that the idels are processed in the order they are added. A much safer approach would be a inter 'process' queue (I think it safe to assume it's non prememtive).

def eventCallback(event):
def printEvent():
ts = int(os.times()[-1] % 10000)
print ts, event.type, event.detail1, event.detail2,
(str(event.any_data) if event.any_data else ''),
'nt', event.host_application, event.source, repr(event.source_role)
return False # remove this func from idle processing

gobject.idle_add(printEvent)

EVENTS = ('document', 'focus', 'object', 'window', 'terminal')
pyatspi.Registry.registerEventListener(eventCallback, *EVENTS)

There's no particular reason that printEvent() is a closure, you can pass arguments like event through idle_add(). Complete code.

Posted by Steve Lee | 0 comment(s)

December 10, 2007

Rocktastic.

...and here's a programming rockstar (at 3:14)...

Posted by Steve Lee | 2 comment(s)

December 20, 2007

I just got a new mask, the ResMed Liberty. Let's hope this clever technology makes a difference as it's pretty much the last option with CPAP. I didn't get on with the nasel pillows before as they irrated my nose but the mouth option could well make a difference.

At least I can dream about underwater diving rather than being jet pilot with this style device.

Keywords: Apnoea

Posted by Steve Lee | 0 comment(s)

December 21, 2007

The first tarball release of Jambu In App Selection for developers is now available. It's a tad disconcernting as it feels a little early but the Open Source way is to release early in the hope of attracting more eye/brains.

It's been a bit of a struggle in the last months with technical and health problems to solve but there is a good basis now and a lot of knowledge gained. There are gaps to fill and event issues to resolve but It's clear the basic principal is usable and with some coding goodness and bug fixes to libgail and minefield it will be a viable way to access GNOME apps for those who have limited mobility. I really want to accelerate next year so we can get to the real task of finding innovative ways to make apps more useable.If anyone is interested there's lots to do.

The other thing to look at next year in the alt access arena is eye gaze which is so much more effective than switch access.

The recent anouncement that eduspaces is closing down means I need to find a new home for next year.

Keywords: Jambu

Posted by Steve Lee | 0 comment(s)

December 24, 2007

The December issue of Python Magazine is out and it looks like the accessibility article introducing GNOME Python accessibility made it.

There's plenty of interesting Christmas reading in the issue including Mobile python and an in depth on the GIL / threading.

A big thanks to Brian Jones for editoral guidance and support for the article

Posted by Steve Lee | 0 comment(s)