I was at Silverburn earlier today to do a bit of shopping, and on the way back to the car I saw two fortysomething women standing leaning on one side of it, and a recovery truck driver on the other side. As I was wondering what was going on, I noticed that he seemed to be trying to open the passenger door with a bit of wire. They hadn't seen me yet, but I was near enough that I could open and close the doors again with the remote, which surprised them... It turns out that one of the women thought that it was her car, and was honestly wondering
- Why her remote didn't open it
- Why the key didn't open the door
- Why someone had broken in and replaced her gym bag with a tin of de-icer before locking the car again
The recovery guy then shook his head and wandered off to find his credit card machine. You might imagine that if that happened you might have a look and see if the number plate was what you expected it to be, before calling the recovery truck. Apparently this didn't occur to them. I hereby crown this unnamed woman "Daftie of the Year 2011", as I suspect this'll be hard to beat.
It's my intention this year to at write at least one post on here per week, ideally with some substance to it, rather than just recording what I had for breakfast (that being Twitter's job, after all). I'm not holding my breath about whether I will manage it or not, but I intend to give it a go. I have a draft in the works, which I will hope to get out there some time soon...
In actual news, I have been accepted to talk at ConFoo in Canada, on the subject "Making PHP See" - which is about image recognition using OpenCV and PHP. I'm really looking forward to the conference, and I'm fortunate to be up alongside some excellent speakers, so it should be great fun.
I noted a couple of comments after my talk on Cairo at DPC 10 yesterday, so I thought I'd respond to them here to clear up what's going on. It's always good to get some feedback about something I've been working on so I'd like to reply and keep the conversation going if I can.
First off, someone mentioned that the wrapper seems a bit beta and incomplete - and yes, that is true. The 0.2.0 release, which is the latest as I wrote this, is still marked as beta. The aim of me coming and talking about it is to try and get some more people interested in using it, so we can get some more information from real users about what works and what doesn't. I probably didn't help by mentioning that there are some features that we intend to implement that aren't there yet, which I'll list:
- Support for reading and writing images that aren't PNGs The developers of the core Cairo API are not really interested in handling all the various graphics formats that exist, so they decided to implement one and one only which is useful for getting data in and out. This is the functionality that we use at present. We (the developers of the wrapper) would like to fix that and handle JPEG, GIF, TIFF, and whatever new format is cool this week, but we're not quite sure how to go about that yet. We could recycle the code used by GD or use ImageMagick or GraphicsMagick, but those would introduce dependencies that people might not have available. Once we work out a decent solution here, it will be put in.
- Support for hyperlinks in PDFs and SVGs Again, this is something we'd quite like but it's not supported in the underlying library yet. There have been rumours about adding an API to do this, but there hasn't been a concensus about what's a good way to go about it. It's something I'd quite like to help fix, so I've been learning how Cairo itself is put together with the intention to add the support.
The other comments I saw suggested that the API is a bit fiddly, which I can't deny. It's not quite as simple to set up and get running as some of the other libraries in PHP already. This is nearly intentional - we're wrapping the underlying Cairo API as closely as we can, because we don't want to diverge too far from how other languages with Cairo wrappers work, so that developers who may be familiar with those already know roughly what is going on. It's for this reason that, for example, the API uses floating-point values from 0 to 1 to define the intensity of colours, rather than an integer value from 0-255 which most people are probably used to. This is because Cairo is designed not to make any assumptions about the surface you're going to be drawing to - some day we might get 16-bits-per-channel surfaces, and using float values means that we don't need to change the API or the values we're passing in to allow us to write to them. It'll just carry on working as it did before, just with better colour resolution.
However, if anyone has any ideas for how we could make things simpler, then we'd love to hear about it &emdash; drop us a line on the PECL developers mailing list (which you can find on the PECL mailing lists page), or find us on IRC on #php.pecl on EFnet.
There are a couple of things that I have worked on which sit on top of the Cairo extension, which can do some interesting things. If you're still at DPC I'll be demoing a couple of them on the uncon track at 2pm. It's only a 15 minute talk, so it shouldn't be too boring...!
Recently I've become involved in a move to resurrect the Ubuntu Accessibility team, which seemed to have stagnated until quite recently when Penelope Stowe got involved and suggested I joined too. She arranged a session at the Ubuntu Developer Summit for the next Ubuntu release, Maverick Meerkat, which seems to have gone quite well. The main focus for the team right now is getting organised, and to this end we're aiming to create a set of personas, which are representations of hypothetical users with various accessibility requirements which developers and testers can keep in mind when working on the next Ubuntu release. These personas are going to be developed by a survey which will be dispatched to a host of groups who may have accessibility requirements to get an idea of what the main factors that affect their experience with Ubuntu are, so we can get an idea of the main areas to improve. Hopefully then the work which will take place as a result of these can be sent upstream to the original projects.
My own role in the team isn't quite clear yet, but I intend to help on the development side, if I can, once more work starts in this area. If you would like to help, the team hangs out on #ubuntu-accessibility on Freenode IRC, and there is a mailing list. You can also check out the wiki page which we're working on improving.
This year I've decided to enter the EuroWinPHP contest, as I figured it might be interesting to learn a bit more about how PHP works on Windows. I originally started using it there, back in around 2002, running early versions of Apache 1.3 and PHP 4.1 on Windows 98 and 2000. These days, though, I'm running IIS7 and PHP 5.3.2, and have a bit more knowledge of how the bits fit together, though since I've been running Linux for the last 5 years I'm a little out of touch.
The project I've opted to do is something I've been thinking about for a little while, but not got around to developing until now. It's named GarnetCMS, and the idea is to create a CMS that uses the features of PHP 5.3, such as closures, and based around a signal/slot mechanism. The idea is to initially develop it to use NoSQL datastores, and I intend to create back ends for Microsoft Azure and MongoDB at first. If I do things correctly, though, adding a traditional RDBMS back end later on should be relatively simple.
Development-wise, I'm trying out Mercurial for version control, and using Bitbucket to store the code - the project will be on there at http://bitbucket.org/mgdm/garnet-cms/ once it gets going. I'm intending to try out Komodo Edit, because while I do love GVim on Windows it doesn't quite fit with the "complete change" I'm going for with most other things! TortoiseHg seems quite nice so far, and I've managed to get IIS up and running, so now all I need to do is get coding. I'm quite looking forward to seeing how it turns out.