The Joy of FirePHP: A Crash-Course

03.12.2009

Last month I proposed an article for NetTuts. And today it got published. Please have a look. Even tweet about it! Go on…

Simple Usability Testing

23.09.2009
Silverback by ClearLeft is a wonderful usability testing application that makes it dead simple to record and manage your test sessions.
If like me though you can’t afford to shell out $50 right now, here’s a way to do some bargain basement usability recording.
All you will need is an Intel Macbook/Macbook Pro running Mac OS 10.6. This comes with Quicktime X, which now has screen, audio and movie recording built — so it can record what’s happening on the screen, video from a webcam and audio through your built-in microphone.
Ok so it’s not quite as polished as Silverback, but it works. Unfortunately, because you can’t start both the movie recording and the screen capturing at the same time, they will be out of sync for a few seconds.
If you have some video editing software that allows you to match them up and overlay (iMovie doesn’t do this yet), a quick bit of editing will go a long way when you need to review those test sessions!
The way I do it is:
  1. Start Movie recording (this is the webcam)
  2. Minimise the live preview
  3. Start Screen recording
At the end of the session:
  1. Stop Screen recording
  2. Stop Movie recording
If anyone knows of a way to get the two to start at the same time, that would be great (an AppleScript would probably do it, but I’m a virgin at it). Also, can you recommend any good cheap/free video editing tools that can handle movie on movie overlays?

jQuery 1.3.0 and Google AJAX Libraries

16.01.2009

I used to use Prototype and script.aculo.us, but once I tried jQuery there was no going back. It makes my Javascript coding so much simpler! Arguably, so do the other libraries out there, but there are a million reasons why I love jQuery. Here’s a few:

  • It’s fast
  • Fairly well documented
  • Doesn’t rely on any other libraries
  • Did I mention fast?
  • and many more…
I found out via Twitter the other day that it had been updated to the next major version: 1.3. This is a phenomenal leap for jQuery. It has improved its speed and efficiency by huge factors. It’s also added some new functionality and a cool new API doc.
But that’s not all. Something I’ve been trying to start using is the Google CDN versions of these Javascript libraries. It seems they’re staying on top of hot new releases and proving that using their service will provide certain benefits.
It still has potential though. Who knows how far Google will go with hosting these libs and their derivatives? And as all of these libraries start to inter-depend, shouldn’t we have some way to cater for the dependencies in a measurable fashion?
What if the choice of library isn’t a fixed entity! For instance, you may build a CMS incorporating some jQuery stuff, but what’s to say that you don’t want some MooTools in there? All available through Google, but you have to trawl to the AJAX APIs pages, check the versions and type the code.
Whilst it’s not critical at this stage (as there are only a few libraries), it would be good to organise this in some sort of consumable service. How about a neat XML feed that gives you all available versions of all the libraries they have AND explicitly identifies any dependencies?
I have produced said feed! It is currently residing at http://scrumpy-jack.com/google/jslib-dependencies.xml but I want Google to host and maintain it as part f the AJAX Libraries API project. Vote for that here: http://code.google.com/p/google-ajax-apis/issues/detail?id=90
If you find the feed useful let me know in the comments. I will be keeping it up to date and soon I’ll post some sample code for consuming the data in PHP.

Enabling PHP extensions on a Mac

14.01.2009

So I hit my first attempt at using something not bundled in Apple’s ’safe’ PHP build for Mac OS X. I decided to implement memcached on my big project. I found out that memcached is pretty easy to set up and had that running in no time.

The problems start when trying to get PHP to talk ‘memcached’. Windows binaries come bundled with the latest stable release of the PECL Memcache library, but Apple has decided not to bundle it into the PHP Apache module.

Then I got thinking: “Well what about other extensions that I might need?”. I resolved to get this working so I knew what to do for future extensions!

I’d read so much about how Apple has disabled extensions and there’s no way to make it work… blah blah blah… Then I found this brilliant tutorial by Erik Giberti.

Stupidly though I didn’t follow the guidelines to the letter (I was probably distracted), but Erik provided continuing support. I Twitter’d him and he seemed more than happy to oblige. One of the good guys!

Upshot… I now have my first working self-compiled extension to PHP loaded and empowering my local development platform. That wasn’t so bad, was it?

For future reference:

  1. Download latest stable extension from PECL
  2. cd Downloads/{library_name-x.x.x}/
  3. phpize
  4. ./configure (may need extra compiler options!)*
  5. make
  6. sudo make install
  7. Update PHP ini with extension=(whatever the installed file is)

You may need to find out what your extension_dir ini variable is (HINT: phpinfo!) as this is where the .so file will need to be. In point 7 just put the file name not the path.

I will no doubt be adding more libraries in the coming weeks. If I get any trouble, I will let you know. Sound off in the comments your issues with PHP extensions in Mac OS X

UPDATE 04/09:
*If you’re running 64-bit architecture (and more than likely have a 64-bit build of PHP) you should run the followingat point 4 instead:
MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp” CCFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” CXXFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe” LDFLAGS=”-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load” ./configure

Zend Studio 6.1, TinyMCE, and Scotland

29.09.2008

Again I find my blog post titles not really resembling any coherence… if you follow the TWiT podcast you’ll notice my titles are starting to follow the ethos: it’s more a summary of what’s covered than an introduction… Still it works for now.

I haven’t posted in an age and three-quarters because I went away to Scotland for a week during September. I’ve had difficulty keeping up with all the stuff that’s happening in the world of late. It seems that financial markets are going to pot. So for the time being I will be keeping my head down trying to secure my very bleak future. I suggest you do the same.
In slightly lighter news, Zend released Framework 1.6 and Studio 6.1. Also I noticed that my favourite, open-source, JavaScript-based WYSIWYG editor, TinyMCE, has recently been updated.
Back to work!