Monday, December 22, 2008

Symfony batch in my i18n nightmares

I was working on a new version of the billing system for utilities (used by the national electricity company in East-Timor), adding a bunch of new features including PDF generation for invoice and some reports. I decided to use Zend_Pdf and I believe it is a good choice.

Generating PDF is not something really fun. I used a template pdf and feed it with all the customer information I want. For each single piece of data you want to add, you must provide the position in the page, the style (if you want to change it)...a real pain! I wish we can have a more powerful templating system. It seems some guys have some plans (and codes) but nothing yet release (see mailing list here)...hey! (almost) good news: while I was looking for the link I found that they did release their PDF library (not yet in Zend, nor compatible with Zend_Pdf) named "RE Framework". I need to have a look one of this day...

Anyway, I was thinking to generate all invoices (in DB + PDF version) through a batch in symfony. I started working on it when I faced a "simple" problem: I need to use i18n for each invoices (invoice in the language of the customer), but from a batch I am always getting an error message since it does not have a user and culture define. I tried to initalize a fake one...but no luck. I need to try harder... ;-)

Any ideas?

Legs in the sky

Enjoy a rest 300m from the ground!

Photo taken from the Macau Tower restaurant.

-- Post From My iPhone

Wednesday, December 10, 2008

Thematic Mapping Engine

A very interesting web app (open source of course ;-): Thematic Mapping Engine.
You can play with it online, it is really well done. I hope I will have new opportunity to work on the geospatial arena later next year, I would love to do things like this...

Tuesday, December 9, 2008

Scoop: the upcoming iPhone TV ;-)

Yesterday I was in HK for a few hours and what did I find in a shop on the middle of Causeway Bay? The new (obviously fake) upcoming iPhone TV, here is a shot:

Photo taken with my iPhone-not-yet-TV!
-- Post From My iPhone

Monday, December 8, 2008

Pano for iphone

I played with "Pano", a panorama app for iPhone...and I must said I am quite impressed. Since a picture is better than words, here it is!
This is Macau center (Leal Senado Square)
-- Post From My iPhone

Wednesday, December 3, 2008

Symfony 1.2, now available in shops!

Symfony 1.2 is finally officially out! As usual, it comes with a lot of very good documentation available.
After almost 3 years using Symfony 1.0, I've started to read some documentation for the new version and what I can say is simple: WOW!
I've really enjoyed to work with SF in the past years but I am now sure I will enjoy even more working with the 1.2 release...provided that I take the time to learn all the new "powers". Because this is the drawback of this version: coming from 1.0 you have to learn a lot of new stuff to master symfony. But don't get me wrong, I don't complain, I perfectly understand the need to learn more and all the new powers you get in hands when Peter Parker discovered his spider powers ;-)
Coming from Symfony 1.0, here is the list of what impress me the most so far:
- the form framework
- the new admin generator based on the form framework
- the new routing system...still need to read more about it.
- doctrine integration. Doctrine is not new as such but I used propel before and want now to switch. Doctrine is amazing (see my previous post) and now fully integrated in SF.

Enough for today! I go back to my reading:-)
Meanwhile, SF team is doing again it's famous advent calendar based on 1.2... go job guys!

-- Post From My iPhone

Tuesday, December 2, 2008

Auditorium: a game for sound engineer

Auditorium is a simple but quite unique online game. You have to guide the sound to reach the right part of the auditorium.
I am not a gamer at all, but this game is quite interesting to me. Give it a try.

Tuesday, November 25, 2008

No limit for Firefox

This is simple but brilliant! Alex made what he called "FoxGlove", it is a portable Firefox 3.0 based, fully customized to better integrate with all Google Apps such as Gmail, GCal, Docs, GTalk, Notebook and so on. It is very easy to take on a USB key everywhere. It also integrate a Google Chrome-like theme and you can have several versions with different Google Accounts open at the same time. Indeed it is very very least for me ;-)

Why Google did not think about this before?
Defenitively there is no limit to Firefox customization power!

Monday, November 24, 2008

iPhone 2.2, my view

As everybody I upgraded to iPhone OS 2.2 during the week-end. No big stuff for me, only minor changes. Yes I am aware we now have Google Maps Streetview, we can download podcast directly (although you can not subscribe to podcast but only download one episode), have some changes in Safari UI and so on.
BUT, what I noticed, and this is a big fix for me: caller ID is now working fine for me...Mr iPhone should have read my blog ;-) The problem before was for all phone number that I input with the country code in a format +Countrycode ... It could not regognize them when the person call me. Now it seems working fine, this is a really usefull fix.

Wednesday, November 19, 2008

iPhone compare to the Stone Age

Don't make me regret my purchase :-(
Actually I never used MMS or videocall and I really don't care. It is true that I would like to see video recording (I am sure this will come soon or later) and changeable memory cards (this one will probably never come).

Saturday, November 15, 2008

Firefox 3 rocks

No, it's not new! But I realized not long ago that I do not use anymore Safari on my Mac. The integration with MacOS is now really good, not petfect though: I am still missing integration with Keychain (Mac password manager). I wish also a simple way to sync bookmarks between Safari and Firefox since we will not get Firefox on iphone any time soon.
The 2 most useful new features for me as a user are:
- The new "awesome bar", it changes the way I search my bookmarks and history
- Tags on bookmarks: I don't organize my bookmarks into folders, I just mark them with relevant tags, it's much more convenient.
And more is to come on the upcoming 3.1...

-- Post From My iPhone

Thursday, November 13, 2008

Starting with Doctrine ORM

Preparing myself to switch from Symfony 1.0 to Symfony 1.2 as my default framework, I started to read the Doctrine documentation to get familiar with it - I used Propel as default ORM in Symfony before. I bet I am not the only one in the community...

I have not yet reached the end but I cannot resist to share my feeling about this amazing piece of code. As a symfony developer I do not need to read all Doctrine documentation since a lot of things are automatically generated thanks to the tied integration between the 2 frameworks.

Since I was used to Propel behaviors and installed in most of my projects some pretty standard plugins to create behaviors such as: Slug, Versionning, Nested set, Tags... I came to realize that most of those plugins are actually part of Doctrine out-0f-the-box! Just an example from the documentation to create a simple wiki with i18n (internationalization), slug, search and versionning (it could be apply as well to a CMS or whatever you wants):

fields: [title, content]
fields: [title, content]
fields: [title, content]
fields: [title]
title: string(255)
content: string
Even thought I will propably prefered to use Lucene for the search part, all the rest is amazing: just a few lines in your schema.yml files and "hop!" you got everything ready (I don't even mentioned that you actually nest those behaviors here...). They even have a "Geographical" behavior that I definitively want to test later.
It is also more readable and make more sens - to me at least- to define behaviors in the schema.yml file rather than in each class of the model.

There is no doubt, Doctrine is a good move! And remember: I am just talking about behaviors here, there are much more things in the documentation...I still need to go to read them...

Wednesday, November 12, 2008


This is really what I call creativity on iPhone ;-)

iPhone usage study

A very interesting study on how people use their iPhone and how to improve application based on this study.

Gmail got voice and video

They never sleep in Googleplex! They launched yesterday video and voice chat within gmail. I am eager to test this live. It will for sure shake the all IM market that was not very innovative lately. I like that, we are going to see innovation again in this area hopefully ;-)
Don't forget, you need to install a plugin first.

Monday, November 10, 2008

What kind of camera is this?

I had the surprise to get these photos with my iphone camera:

is my iphone kind of schizophrenic?

Yes indeed, I found a new "features" in my iPhone: "adding wind" to your photo!

What kind of strange distortion!
Anyone got that effect before?

-- Post From My iPhone

Wednesday, October 29, 2008

CAIR and Seam Carving GUI

I discovered this app "Seam Carving GUI" - what a name! This is an open source, all platforms software to manipulate your photos based on the CAIR library (CAIR stands for Content Aware Image Resizing). This is simply amazing stuff! You can resize images (stretched,...) and remove elements of your photo (you know, the guy in the background of your beautiful photo).

From this:
To this (remove small fish and stretched):

This is the kind of app that can really change a photo from good to best.

Tuesday, October 28, 2008

Iphone ...after 2 months

After 2 months, I believe it is time to share my "2 cents" on my days with Mr iPhone. I can say that the iPhone change the way I use the Internet...not the way I use a phone! So when Steve Jobs mentioned that their netbook is actually the iphone, I kind of agree with him (although the keyboard is still a huge difference).

What I don't like.
  1. On the phone side, the Caller ID system is not working. I usually input all phone numbers with a + sign and the country code before because I do not like to edit a number when I am overseas. But my iPhone is not capable to identify local numbers against their complete number (including +country-code)...this is so annoying, I cannot believe they haven't fix this yet, come on Apple!
  2. On the music side, the sound quality. If you are using only your iphone/ipod to listen your music, this is ok but as soon as you start to test or use another mp3 player such as the chinese Meizu, there you will find the difference and it is going to be very difficult to go back to your iphone.
  3. Of course the battery life is too short, but everybody knows this, and I realise that I do not use only a phone but an mp3/mp4 player, a GPS and a computer, therefore my usage increase a lot compare to my previous phones.
  4. Sometimes -I noticed this specially when I lost the signal- the iphone can hang for at least one minute before I can do anything.
  5. I hate Apple restriction to publish or reject applications...Long life to Cydia & Co.
On the bright side:
  1. I was also very surprise by the pretty good quality of the small 2Mb camera.
  2. Apps, apps, apps. Amazing apps available from the Store.
  3. Apps that I enjoyed currently (this kind of list tend to change over time):
  • YouNote
  • BlogPress
  • Byline
  • Google Earth
  • Facebook
  • Twitterific
  • LinkedIn
  • Fring
  • Measures
  • Shazam
  • NYTimes
  • Runkeeper, Fitnio and Trailguru (I am not sure which one is the best for me yet on this section)

1. BlogPress

An iphone app to write/manage your blogs (I actually use it to write this post). Very powerful and simple to use, it can integrated with a lot of different popular blog systems. I found that it is easier for me to blog with this app rather than on my computer. Not that it is easier to use the very small iPhone keyboard but you can blog when you have time, without a computer, and for this BlogPress is worth the money (yes, it is not free. I paid 2.99$ during their discount period but I believe the normal price is 9.99$).

2. Byline
Probably the application I use the most. This is a RSS Reader for your Google Reader account, it synchronizes perfectly, allows offline reading and even have your "starred" post. It is 3.99$ but definitively worth the money for me. I used before NetNewsWire from Newsgator, a free app, and it was good too but I really prefer to have an app integrated with Google Reader.

3. Google Earth - yes it is free!
Just arrived a few days ago and simply well done, as everybody said "the earth in your hand". When you do a search, it also conveniently list your matched contact from your iPhone address book, nice Mr Google ;-)
No need to mention GPS integration and gestures to zoom, move around,etc... too obvious!

4. Measures
A new comer for me. It is a beautiful app for converting anything into something else! It even includes a currency converter with Macau Patacas (not common indeed)!

-- Post From My iPhone (and finalize online...)

Free virtual trip to China

Some guys got strange ideas sometimes... They have developed a Firefox add-0n to allow you to surf the web like if you were behind the "Great Firewall of China". Yes, you read it well! You can now experience the amazing feeling to see how is the Internet from a chinese point-of-view ;-)
Enjoy the experience being block for any kind of pretty common websites! Welcome to China Channel Firefox Addon.

Seriously, this can show you how bad the censorship is in China, and for webmaster a good way to test if their websites are censored by our best friend.
Talking about this, I presume my blog is going to be banned as well...

Enjoy your FREEDOM.

Friday, October 24, 2008

My iPhone very own record!

The iPhone is well known to have a pretty short battery life. This is BAD! But, don't forget that usually you use an iPhone almost like an EeePC rather than like a standard mobile phone.
I could run my iPhone for more than 3 days without recharging, not bad at all as I was using the 3G for web browsing, rss feeds. Wifi and Location off.

What about you?

Posted with LifeCast