January 10th, 2008 by Ivo
Tonight was a fun night of experimenting with web stuff.
I'm in London this week, and this morning I got an email from the office that they changed my mobile plan so I could use mobile internet abroad for a flat fee per day, and since I have a fancy phone now it was playtime tonight!
I turned on my iPod, left the hotel and set out to do some sightseeing. Took the tube to the Embankment station and took a cliche picture of the Big Ben. Using the 'upload to flickr' feature of my phone, I uploaded it to my flickr stream.
Roughly 7 minutes later the upload finished and I was able to twitter about my accomplishment. The reason it took 7 minutes was that my phone had switched from HSDPA to GPRS, which is pretty sluggish, and the fact that my phone's cam is 5MP.
I got hungry, and used Google Mobile Maps to find the Hard Rock Cafe (always a nice place to dine when you're not with company), and the way to get there.
By the time I passed the large Pepsi Thingee at Trocadero, I had found out that my phone can scale down the image before posting to flickr, so my picture of the Pepsi Thingee uploaded a lot faster.
At trocadero I used an underpass to cross a road, at which point my phone not only disconnected, but completely crashed. I had to take out the battery to reset it.
Anyway, on to the Hard Rock Cafe.
I arrived at the spot where the Hard Rock Cafe was supposed to be according to Google, but there was only a really small street and I didn't see anything resembling an HRC. But a closer look revealed a small door with a Hard Rock Cafe logo in the back of a sort of alcove. 'Wow', I thought, 'must be the smallest HRC ever. Without Google Maps I would never have found this'.
So I went in and about 2 steps inside I encountered a guy, sitting on a staircase eating fries. Hmm, this must be the weirdest HRC I've encountered so far.
He looked as stunned at me as I looked at him, and after an awkward silence I said:
"Are they closed or what?"
"Closed? You want to eat?"
"Sure we're open. but USE THE FRONT DOOR!"
"Ah, eh, hmm..." (quick! think of an excuse that doesn't make you look foolish!) "Google Maps sent me here!"
"Well, Sir, then Google Maps IS WRONG."
I walked around the block, had a lovely dinner, twittered some more, checked up on my email and eventually used Google Maps to find my way back to the hotel.
So it was a nice mobile-assisted night.
And now I'm here in my hotel room, typing this post in a local textfile because internet at the hotel doesn't work and the building seems to block my cellphone signal.
Some drawbacks: The battery of my phone, which was full when I left, was nearly empty by the time I got back. And on my laptop I noticed that the pictures I took were way more blurry than I could tell on the mobile phone screen.
But all-in-all, I think the mobile web is fun. In particular the popular web 2.0 sites do a decent job of providing a proper mobile version of their services.
A few people on twitter advised me some alternative mobile software (mobypicture) that should make it even easier, so I'm going to try that out on my next sightseeing-with-phone tour. I'll try to use some more websites next time as well, such as a website that can plot my route using google maps, and try uploading to youtube from the phone. It would be nice if there was a site that combines google maps, twitter, youtube and flickr. Ideas anyone?
July 27th, 2007 by Ivo
Also, I was annoyed with having to consult many different resources when I plan a business trip.
So I began building frekfly, my own little mashup.
The first version, which took me only a few hours to built, offered only a google map, basic weather information, flickr images and currency conversion. To built this, I used the following tools:
- PHP5's Webservices API, which made it possible to consume webservices with only very few lines of code.
- The Flickr API to retrieve images
- Google Maps for the map display
- Some webservicex services, for weather, geographical and currency information.
- Zend Framework, mainly for its Zend_Service_Flickr class, which makes consuming the flickr rest service easy.
- ATK, for its debugging console and file-caching.
It's really easy to construct an application like this in PHP, given that a few lines of code give you access to any available webservice. The first version of the app did not even use a database, everything was retrieved from webservices and cached in files.
Then, I wanted more. When I travel for work, I usually need hotels that are located close to the airport, so I looked for a webservice that could provide me with hotel information. I requested access to the API at expedia, but they have a manual approval process and I'm still waiting for a response. Luckily the people at booking.com were a lot more helpful and they provided me with an iframe based interface to their hotel reservation engine, and they even styled their pages according to the design (well ok, that's not really a design yet, is it ) of frekfly.
The only thing missing from their API was the ability to search by latitude and longitude, which was my close-to-the-airport criterium. However, they kindly send me a dump of their hotel database including the coordinates.
So in version 2 I had to add a database, and I used the database abstraction layer of ATK to easily access it.
Version 2 is what is currently online. I may post some code examples of the webservice interfaces later on, because I found this to be a very instructive experience.
In the next version, I want to add other nifty web-two-point-oh features to the site, including the ability to have visitors enter comments and details, so they can help complete the airport information. (such as 'are there better restaurants before or after security?'). Here I plan to use the JSON functionality of Zend Framework, to make this very 2.0-ish.
Issues to deal with
One of the major disadvantages of mashups is the fact that you're dependent on external systems. At night, the site is hardly usable because webservicex is very busy at that time and gives a lot of timeouts. Of course, this is countered by caching, but I can't cache every output for every airport on the planet, so caching is based on a 'retrieve the first time its needed' approach. So that's a disadvantage at this point.
Another interesting issue you have to deal with when writing mashups is standardization in naming, or rather, the lack thereof. For example, I consult 2 different webservices and a few file based airport resources to get airport information, but each of them use different names for the same airport. Where possible, I use the official 3-letter IATA code, but some of them do not support that.
So instead of actually matching data from different sources, you have to use a more probabilistic approach, where you say "hmm, 'Schiphol Airport Amsterdam' and 'Amsterdam, Schiphol' are probably the same airport.
I had a similar issue with the weather service; it doesn't support latitude and longitude, so what it does is 'guess' what the nearest weatherstation is, based on the airportname, the nearest town name, the biggest city close to the airport and finally the country capital if all else fails.
These are all issues to deal with in a mashup-based application, and I would encourage everyone to built a mashup at some point, because it teaches you things that you don't usually encounter with standard mysql+php based websites.
March 9th, 2007 by Ivo
We are recruiting people on a regular basis, and since it's sometimes difficult to find people with both a computer science background and PHP experience, we also recruit people that are fluent in other languages. Teaching a c++/java/delphi-guy to do PHP in general is easier than teaching a PHP hobbyist good engineering practices.
So yesterday I was reviewing a code sample that a job applicant had written during a test and I encountered the following line of code:
It's not hard to guess what his background was , but I was initially stunned that this actually works in php.
My first thought was that this was because I installed the Java Bridge from Zend Platform, but the bridging API does not allow the direct use of java objects like this. So was there some evil hidden hack in PHP?
Of course not; eventually the truth was uncovered by the notices in the errorlog:
PHP Notice: Use of undefined constant System - assumed 'System'
Ah, that makes sense. It just sees them as constants which do not exist and are interpreted as strings, and apparently, this is a valid PHP statement as well:
I cannot find any practical use for being able to write a statement without assignment or output like that, but it does enable code beautification:
Of course I would have to strongly advise against this but it was fun to notice that this works.
P.S. shameless plug: this week we launched the first preview of our new web 2.0 pet project: http://www.mockatoo.com; not much to see just yet, but consider it a preview of what we are up to.
August 1st, 2006 by Ivo
We eventually managed to hire Bart Helms, the lead developer of the web 2.0 time tracking site 14Dayz.com.
We won't take over 14Dayz, as that site remains with the company Bart worked for, but we do hope that adding Bart to our team will help improve Achievo's usability, and also bring some more web 2.0 stuff to ATK and our other products (which, I promise, we will use wisely and subtly).
In a time where many web 2.0 sites seem to be built using Ruby on Rails, it is interesting to note that Bart developed 14Dayz entirely in PHP.
I wish Bart the best of luck at Ibuildings, I hope he will enjoy working here as much as I do.
May 11th, 2006 by Ivo
Tobias today had a post about the term 'Web 2.0'. He's not the first to disagree to using the term, but I feel that Web 2.0 is not about technology, it's a movement. So I felt compelled to write a reply to his post. Since the comment got rather lengthy, and expresses my opinion about Web 2.0, I thought it would be appropriate to post the comment on my blog as well. Here's Tobias' point:
'So, please, stop that stupid "Web 2.0" term. It simply sucks.'
And here is my reply:
I disagree. Technically, you're correct. Yes, the technology has been around much longer, and yes, the web technically consists of hypertext and other technologies.
But that is not what Web 2.0 is about. Web 2.0 is a movement, not a technology. It is the next generation of the internet. It is much broader than the set of technologies it is built upon.
For starters, it is the difference between the early, mostly static, web that was just a way of presenting information in various ways, and the new, more interactive, collaborative, way to deal with information on the web.
And it's not just about Ajax. It's also about how sites like Flickr, del.icio.us and digg.com thrive and make the web to the collaborative experience it currently is.
It's also about how RSS and podcasts provide new ways of distributing information.
In many ways, the web is growing up. What better techie-term to apply to that than 'Web 2.0'? If you ask me, the term fits perfectly.
Also, it's not about marketing. The best 'web 2.0' sites hardly do marketing. They grow because their communities embraced them for what they provide, for their usefulness.
Was the renaissance bullshit because paints and brushes already existed years before? No. So the fact that the technologies that make up Web 2.0 are older than the realisation that we're moving in a new direction does not make Web 2.0 bullshit either.
It's combining existing technologies in creative ways and making them work in a way beyond what their inventors had thought of.
So please, stop the 'the web 2.0 is bullshit because the technologies already existed for years' bashing and start to realize that the internet *IS* evolving and maturing to a degree where we can truly speak of a 'next generation'.
We're all already a part of it, whether we want to or not.
Welcome to the future.