Why I think Google needs Twitter

May 4th, 2009

More and more content on the internet is 'real time'. Twitter messages, news feeds, pictures, facebook, etc.. Where we used to browse the web for things that have mostly been written in the past, more and more of our internet minutes are spent watching things that 'just happened'.

I see this as a threat to Google, and it wouldn't surprise me if they finally manage to buy Twitter, because Twitter helps them become more 'real time'.

To give an example, I was just trying to update my profile picture on Twitter, and this didn't work. For some reason it refused my pic without an apparent error messsage. Possibly I'm uploading something wrong, so first I googled for 'twitter profile picture' and got this result:

picture-37

Then, I did the same search on Twitter Search and the result was this:

picture-38

As you can see, this tells me that in the past 22 minutes, multiple people had this problem. (Ironically you can also see from their avatars that it actually is a problem). The Google results on the other hand, have nothing that is relevant if you take into account the 'now' factor.

This is just an example. Searching for 'current content' is getting more and more relevant. Comments on a live show on tv or an address to the nation by the president; Google is useless in finding these things.

So it is my humble opinion that either a) Google will buy Twitter, Facebook or another 'real time' content site, or b) Google will release an updated Google Search that takes the whole 'now' into account in its search results.

Debugging parameters for CLI apps using Eclipse PDT

May 3rd, 2009

I write quite a lot of command line utilities in PHP and luckily PDT makes it easy to debug command line scripts.

The thing with command line scripts is that often they require parameters passed on the command line, and PDT offers an easy way to pass them when you debug a script.

Assuming you already have debugging in Eclipse working (using either XDebug or Zend Debugger, both will work with this feature), here are the steps to debug a command line script using command line parameters:

  1. Right-click the script you want to debug and select 'Debug As...' and from the context menu that appears, select 'Debug Configurations...', like this:

    PDT context menu

  2. In the debug configurations screen that appears, select the 'PHP Script Arguements' tab. In the text box that appears, you can add fixed parameters (e.g. --key=value), but it's much more useful to use Eclipse's dynamic parameters, like this:

    picture-29

    In this case I entered --visitor=${string_prompt:Visitor} which means: pass --visitor= to the script when debugging, but ask me to enter a value named 'Visitor'.

  3. You can use the 'Variables' button to enter variables like this using a more visual wizard. There are many different prompts, string_prompt is just one example; you can prompt for folders and passwords as well, and you can inject certain system variables as a parameter using this wizard)
  4. After you've saved the Debug Configurations, again right-click the script you want to debug, and select 'Debug As...' and then 'PHP Script'.
  5. Eclipse now pops up the prompt, like this:

    picture-30

Voila, you can now debug your command line script by passing in dynamic parameters whenever you start the debug session.

P.S. This not only works in Eclipse PDT but also in Zend Studio for Eclipse and Aptana (in theory, haven't tried either yet).

P.P.S. No, I didn't create a script that allows me to track individual visitors, it's an archive processor for Flackr that uses the Visitor design pattern to make it easier to write multiple processors. I love Design Patterns.

Counting down to the Dutch PHP Conference

April 9th, 2009

It's about 2 months until the next Dutch PHP Conference in the Amsterdam RAI.

It's a step up from last year, with one additional conference day. The speaker lineup is awesome: people such as PHP core developer Scott MacVicar, Andrei 'Unicode' Zmievski, php|architect's Marco Tabini, Xdebug's Derick Rethans, Zend Framework architect Matthew Weier O'Phinney, security guru Stefan Esser, Restful Ben Ramsey, Paul 'KISS' Reinheimer and many, many others. See the full schedule here. It will all be hosted by our own Cal Evans.

I don't have to speak this year, I just get to do the closing keynote together with Cal and Marco. That'll be fun!

From all the DPC's I've visited before, this is the one I most look forward to. It's also nice to see industry adoption of the conference, with big names such as Microsoft and Oracle sponsoring the event. (Microsoft has xboxes and tickets to Las Vegas to give away, see their WinPHP Challenge.)

Oh, and if you order your tickets before April 30, there's a significant Early Bird discount. Register here.

Slides from 4Developers conference

March 10th, 2009

Last Saturday I was at the 4Developers Conference in Poland, as I mentioned before.

There weren't many PHP developers at the conference, and I could really feel the language barrier was a problem (many of the English speaking speakers drew much smaller audiences than the Polish ones), but I met some nice people (such as Neal Ford, Ted Neward and Raymond Lewallen), and in terms of speaker treatment this was by far one of the best conferences I've been to. If you get a chance to speak at one of the conferences that ProIdea organizes, don't hesitate and go!

The amount of speaker dinners/lunches, and long nights in bars with countless Vodka (in the form of so-called 'Polish Mad Dogs') and other alcoholic beverages, and in general the way speakers were supported was amazing! Andrzej, Anna and Magda: thanks for making this a great experience for us, and if you ever do a PHP conference, ping me :-)

Here are the slides from my presentation:

Those who have seen me speak before will notice that this is a more generic version of my "Enterprise PHP" talk, catered to a mixed audience.