Scott's Blog

Photo Albums

  • 30th December 2004
  • Dscf0022
    August 2004
  • Dscf0072
    Edinburgh
  • Uber_lounge_frankensteins_30th_july_2005_2
    Friends July 2005
  • Imgp0733
    Gran Canaria 2005
  • Imgp1153
    Hogmanay 2005
  • Img_0469_edited1
    March Snow
  • Tablet
    Miscellaneous.
  • Pm_v2
    Projects
  • Image020
    Random Phone Photos
  • Dsc00239
    ScotLUG
  • Imgp0255md
    Susan's 21st
  • Imgp1222
    Susan's 22nd
  • Imgp1043
    Susan's Christmas Ball
  • Susansleavingparty033
    Susan's Leaving Night

Recent Posts

  • Funemployment Part 3: Back to work
  • Funemployment Part 2: What to do with your time.
  • Funemployment Part 1: Becoming Unemployed
  • Running the Reading Half Marathon
  • Speaking at PHP UK 2009
  • Why Apple is a bad open source citizen
  • PHP's Relationship with Commercial Entities
  • Stupid Bug Reports
  • Accessing pseudo random data with PHP
  • Critical Bug in PHP 5.2.7

December 2009

Mon Tue Wed Thu Fri Sat Sun
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Other Blogs

  • Evalyn
  • Scott
  • Susan
  • Kenny
  • Sandy
  • Neil
  • Kyle
Subscribe to this blog's feed

Archives

  • December 2009
  • March 2009
  • February 2009
  • December 2008
  • November 2008
  • September 2008
  • July 2008
  • June 2008
  • October 2007
  • August 2007

More...

Property List Parser

Property Lists (plist) is a format used on OS X as a way to store settings and other configuration data, as part of my SQLite talk I show how to extract SQLite databases from the backups generated for the iPhone when it syncs to your computer.

Simply, its an XML format that stores a data structure consisting of boolean, integer, real, string and blob values. I've provided the parser I use to extract data from the PList file, it doesn't work with binary plists at the moment. But may do so in the future, you can convert a binary PList to an XML PList using the plutil binary on OS X.

Instantiate the PlistParser class and then call the parse method with the filename as a parameter. This will then return an array of the PList elements.

If you have any problems add a comment and I'll look into it.

November 17, 2008 in PHP | Permalink | Comments (41)

PHP Barcelona and fall schedule

Next weekend I'll be presenting at PHP Barcelona on SQLite3. It's a one day conference and there are plenty of other great sessions during the day from Derick, Helgi and Zoë. Tickets are on sale now for a very reasonable price of €20.

Later in October I'll be presenting at IPC and php|works. Tickets for those conferences are on sale now.

As always the slides will be published afterwords for those that couldn't attend.

September 19, 2008 in PHP | Permalink | Comments (18)

PHP 5.3.0 Alpha 2 Released

PHP 5.3.0 alpha 2 was released yesterday. This is mainly bug fixes to the previous alpha 1 and some more Windows improvements.

This is a non stable release, so don't use it in your production environment but please do test in your development environment and reporting any bugs you find or anything that no longer works.

You can find the source releases here and the Windows releases at the new windows site, for this release there are now VC9 and 64-bit builds available along with the classic VC6 builds.

I'll also be giving a talk tomorrow at PHP London about some of the changes and new features in PHP 5.3, more details are available at the PHP London Wiki.

September 03, 2008 in PHP | Permalink | Comments (40) | TrackBack (0)

PHP Vikinger

Two weekends ago I attended part of the eZ / Open Nordic Conference and more importantly the PHP Vikinger unconference. The unconference is a great opportunity to give an impromptu talk about anything, this is usually picked by a very accurate voting mechanism involving hand raising and Derick proving he can count to 30.

I gave a short talk on what happens when you run a PHP script, it might have been overly technical or not really relevant but it's always handy to know.

The slides are available as a PDF. I'll try to remember to put them on slideshare as well.

Some of the other presentations and general discussions were focused on how much QA and testing people actually do. Naturally this led on to the various tools such as selenium, phpUnderControl, phing and of course PHPUnit.

I had a great time and I'll be back there next year along with my own alcohol. The reason being that its about 244NOK for 2 rums and coke and a pint of beer. That's roughly £24 and $48.

July 01, 2008 in PHP | Permalink | Comments (7) | TrackBack (0)

Offline Version Control Systems

I wrote this blog post offline while travelling up to Manchester on the train, I have a 3G card but it doesn't seem to handle high speed trains that well. Also the tracks are neatly tucked within some valleys that probably don't do too much for the signal.

Back to the topic at hand, before I left I did a cvs update for php-src/ext but forgot to do the Zend folder, so at the moment I’m stuck with a non-compiling PHP 6. This has killed most of the productivity I had planned for the train, all my own fault so I don’t mind.

However what I find annoying is the fact that I need the CVS server to do a diff to check my patch and reverting to previous revision? No change without the CVS server.

Solutions?

Well I can’t fix the first issue without an internet connection, I should just make sure I try a build before I left the house, the second though can probably be fixed by using one of the other version control systems out there. Be it Subversion, Mercurial or bzr.

I personally would be happy with Subversion as I can always see a need for some sort of central repository for PHP rather than a distributed system. All the systems we have that rely on CVS would be potentially easier to translate than to bzr.

Gwynne recently took a 2.5GB tarball of the PHP CVS repository and is looking into converting this to Subversion, the recent release of version 1.5 makes it viable with the new merge tracking system but this may be a dead end if she can’t get it converted.
</end rant>

June 28, 2008 in PHP | Permalink | Comments (49) | TrackBack (0)

"Are you guys here on a student trip?" - DPC08

I'll explain the quote in the title later in this post, but first my own quick writeup of the Dutch PHP Conference that was held in Amsterdam last weekend by iBuildings.

The Friday was a tutorial day and I had the privilege of hearing Sebastian talk about PHPUnit for the day. Now I've heard of PHPUnit and I've used the suite to test other people's code but I've never really used it for a project I worked one. The tutorial started with some of the basics about testing in general and why its a good idea but as the day progressed we covered some more in-depth stuff.

One questioned I asked was how do you test a 300,000 line code-base that has existed for a few years and the code is a mix of procedural and OO that has been intertwined over the years?

The answer here is to do some basic tests with Selenium, you can get a fair few done in a very short space of time using the IDE that integrates with Firefox. While this doesn't replace Unit Tests it is a reasonable substitute until we get some proper tests written.

However if you plan to write unit tests but don't know where to start then there is a pear package that helps you look for "smelly" code, this code smell is  likely place where you'll get something broken, a bug or something that could end up on TDF. There is more information in the documentation and the project page.

After the tutorial there was a pre-conference social event held at Werck, though today I learnt from Derick that it means work in English. Must be a great way to bend the truth, "I need to meet some people at work, back later."

There was also the Netherlands playing against the French, though I couldn't muster the effort to fight my way through the hordes into the bar to see the match or even to get some beer.

The actual conference day was enjoyable, I attended both keynotes by Zeev and Marco, I really liked Marco's talking style, it was quite layed back and relaxed. At Zeev's talk we saw the first email regarding PHP to Andi, an interesting thing here was that it was in English and later on I found out this was due to the poor support for Hebrew and RTL languages in mail clients at the time.

In the afternoon I went to the talks on eZ components, PHP security and PHP 5.3/6. These were all great but overall the conference felt a little shot I think a second day of talks could potentially make the conference better There were definitely enough people attending, so maybe next year!

Now to the quote in the title, while travelling from downtown on the Sunday afternoon back to the hotel we were chatting with a few locals on the tram. After asking a girl about where to get Stroopwafels she then queried if we were here on a student trip, I guess Terry must look about 20 ;-). Terry's reply of course was "Do you go to school around here?", turns out she was studying law at University and not still at high school..., the conversation finished shortly after.

June 20, 2008 in PHP | Permalink | Comments (40)

Source Code Highlighting within Slides

I use Apple's Keynote for doing my presentations and naturally these include some bits of code that need highlighting so that it’s easier to read.

There are a few ways I could do this, the first would be to make a screenshot of the highlighted text and then insert it into the slide, this seemed like an awful lot of work to achieve something that should be so simple.

The solution was fairly obvious when I went looking, Keynote includes an object known as Webview that inserts the output of a URL into the slide, this in turn is rendered using Webkit (Safari) in the background and saved. The first time around I used a simple script with highlight_file but this was a pain when wrapping occurred.

In the end I used GESHI which is a highlight library written in PHP that supports the syntax highlighting of around 50 different programming and scripting languages. Specifically I use PHP and the SQL types, though I had to tweak it a little to add some SQLite keywords.

Installation is relatively simple, download GESHI and extract to a folder on your local web server, download my keynote.php script and put it in the same folder as GESHI and finally put some code somewhere for the file to highlight. In my case I have a folder for each talk.

The URL to do the highlighting is keynote.php?file=folder/file.php

Keynote_highlight

You can see a quick example of how this looks highlighting some PHP Code is keynote looks.

There are a few other parameters that you can use to manipulate the output. They are size, language, nolines and ln. These control the text size, the language being highlighted, if lines should be shown and the line number to start at respectively

I recommend that you don't make this publically accessible in case someone attempts to view a file they shouldn't.

June 07, 2008 in PHP | Permalink | Comments (52)

Imagick 2.0

I meant to post about this on Wednesday when Imagick 2.0 was released but naturally forgot due to other distractions.

Earlier this week after several months in development Mikko and I have released a stable version of the ImageMagick extension for PHP, you can make use of all the useful features within ImageMagick without having to spawning a new process.

One of the largest benefits compared to the native image functions built into PHP via libgd is the support for over 100+ formats including PDF and MPEG if you want to extract a specific frame / page.

You can download the extension on PECL, it requires PHP 5.1.3 minimum and ImageMagick 6.2.4+.

October 05, 2007 in PHP | Permalink | Comments (11)

Sir, Would you be interested in giving us your fingerprints?

That was an offer I got on Thursday at Heathrow after I'd cleared security. Apparently as a new security measure they want a photo of me and a copy of my fingerprints as soon as you've left security which they'll check prior to you actually boarding the plane. As you might expect I point blank refused but I got some interesting information from the woman I quizzed.

First she assured me it would be encrypted though she couldn't tell me what sort of encryption was being used or how they were being stored.
All data would be destroyed within 24 hours under the Data Protection Act
No government agency would have access to it.

So based on the information she provided me my next question is why?

According to the lady its to verify that the person who went through security is the one boarding the plane but I'm failing to see what the possible security threat this is preventing.

It's not going to track movement if its destroyed within 24 hours.
I've already been searched so what's the point of my finger prints?

All that comes to mind is that they have a database of fingerprints that they're comparing me against prior to flying, either a no-fly list or some sort of "Wanted" list to stop people escaping the country.

Best news is this will become mandatory for all passengers leaving Terminal 5 and will be rolled out to more terminals in the future if the tests go well.

I think this is nother reason to start taking the train.

On a side note, I don't want my DNA or fingerprints stored by any company or government agency mainly because these are things I leave lying about. I'm impartial to a retina scan as obviously you don't leave one of those on a glass or door handle.

August 14, 2007 | Permalink | Comments (11)

Airport Security

Time for another rant, this time its a little less geeky that my complaint about hosting companies.

Last week I travelled up to Scotland for Susan's Graduation Ball, since it was a long weekend I took a few extra days off, though I hadn't been in work much that week due to the joys of a nice stomach bug. Nothing a few antibiotics can't fix though!

Due to the now almost comical restrictions at airports with hand luggage I had to wear my kilt up since I was a bit short of space in the case since I'd needed to stuff my entire Kilt carrier into it with the remainder of the stuff. So after taking off my jacket, shoes, belt and getting my laptop out of its bag and placing it on the scanner I walked through the metal detector and of course I went off. This is where it gets good, the person who was meant to search me wasn't sure how he was going to manage the leg sweep without looking like a pervert, in the end it was the hand wand but still its fairly annoying.

Today I went through security again (sitting in the BA lounge just now) and luckily I wasn't searched. I'm off to Berlin this weekend to give a talk on Web 2.0 Security, mainly a talk about what not to do when making everything full of that good AJAX stuff.

iBook is also repaired after being dead for a little over 3 months, it had the infamous logic board / GPU failure in regards to a dry joint connecting one of the chips. On Sunday my dad and I went about taking the laptop to pieces before re-soldering each of the legs on the chip, I wish I'd taken photos now as the chip was so small that a 10 times loupe was required. In the end I now have a working iBook again for this weekends presentation.

June 01, 2007 | Permalink | Comments (11)

« | »