Speaking at DPC10

DPC10 speaker badge

I'm happy to say that I'll be speaking at the Dutch PHP Conference in June in Amsterdam, on the subject of the PECL/Cairo extension I've been helping out by working on for the past few months. This will be my first appearance as a speaker at a technical conference so I'm a little nervous, but I've no doubt I'll be practicing a bit before it happens. Apologies in advance to anyone I inflict the talk on before the event.

Debug of the year

I saw this article on the BBC, where a man who bought a packet of cigarettes from a petrol station in the US ended up being charged $23,148,855,308,184,500 instead. Wow. I was a little curious as to how this could have happened, though the number didn't look familar - I know roughly what 2^32, 2^32 / 2, 2^64, 2^64 / 2 look like, and this didn't appear to be any of those. A swift Google though led me to Stack Overflow, which is a fantastic site. Therein lies a quite plausible explanation:

Add the cents to the number and you get 2314885530818450000, which in hexadecimal is 2020 2020 2020 1250.

Do you see the pattern? The first six bytes has been overwritten by spaces (hex 20, dec 32).

Ingenious! I can imagine spending quite a while trying to come up with that...

PHP 5.3.0RC2

PHP 5.3.0RC2 has been released, which means that the next version of PHP is just around the corner. It comes right in the middle of the annual PHP Testfest. I rambled on a bit on the Freenode podcast a couple of weeks ago about this - it's an annual project where PHP usergroups and individuals around the world get together to improve the unit testing of PHP. This has benefits for everyone involved - PHP is improved, and more likely to maintain backward compatibility, and the people involved in writing the tests get to contribute in a meaningful way to the project, and hopefully learn something on the way. Several usergroups have events scheduled, and a couple have already taken place to great success. If you're a serious PHP user, and interested in getting involved, it's well worth checking out.

Even just grabbing the latest PHP release, compiling it on your platform, and running "make test" helps the project. It doesn't take much to do, and you can run it in the background while doing something else. Go for it!

My favourite ever dialogue box

I saw this on TheDailyWTF recently, and decided I had to try it for myself, and it works!

the-best-dialogue-box-ever.png

You get it if you go to "Clear History" in the "Go" menu in Nautilus.

Making timelapses with Linux

In other news, I've been spending far too much time recently with my camera. One thing I quite like doing is timelapse photography, which my camera (a Canon 400D) can't do by itself, however I did acquire a cheap intervalometer from eBay, which together with my new tripod (a Velbon Sherpa 250, highly recommended) is quite for this kind of work.

I can't, however, ever remember the command to create the timelapses. So, here's a note to myself and anyone else who's interested. If you have a folder full of .JPG files, with a sequential numbering scheme like most cameras have
by default, you can run this command to create a video file using each JPEG image as a frame:

 mencoder "mf://*.JPG" -mf fps=25 -vf scale -zoom -xy 1024 -ovc lavc -lavcopts vcodec=mpeg4 -o output.avi

This will output an MPEG4 file in the file output.avi. It will scale the images so that the video ends up being 1024 pixels wide, and set the height to keep the aspect ratio. It will also run at 25 frames per second. These values can be tweaked, depending on the effect you want.

I'll update this post once I've figured out a few more things - I'd like to be able to do panning and zooming as well, and I know it's possible, though perhaps a bit fiddly.

 1 2 Next →

About

User