Tu fais quoi dans la vie? Je suis développeur Wordpress.

Vu que l’anglais ça fait mal à la tête, je vais poster celui-ci en français, histoire d’être sur de me faire comprendre. Je vais également commencer par un petit disclaimer : oui, ce blog utilise wordpress. Sans vouloir chercher des excuses (même si…), c’est plus une solution de facilité qu’un choix fait par conviction qui me fait utiliser Wordpress. Certes, je pourrais me développer mon propre blog, ça ne me prendrait pas longtemps. C’est promis, j’y pense. Aller, on enchaine.

Travaillant dans le web, il y a plusieurs choses qui me frustrent, m’énervent ou me donne envie de tuer des bébés pandas. J’ai en général une bonne capacité d’absorption vis à vis des choses qui me posent problème, mais il y a toujours un moment où j’explose. Ce soir, c’est Wordpress. Comme je vous l’ai dit, ce blog utilise ce moteur. Pourtant, je vous le dis haut et fort : wordpress, c’est de la merde.

  • Wordpress a été codé avec les pieds. C’est un gros tas de code moitié procédural, moitié objet mal conçu, qui relève plus de l’usine à gaz que du moteur de blog. Je crois que c’est Damien qui me disait qu’en posant la question à un des créateurs de wordpress, ceux-ci refusaient de recoder un moteur propre pour maintenir la rétrocompatibilité avec tout le monde. C’est vrai que ce serait dommage de forcer les gens à quitter PHP 4.
  • Wordpress, c’est une nouvelle surprise tous les matins. Il m’est arrivé plusieurs fois d’arriver au bureau, et de constater un problème sur le blog de la société pour laquelle je travaille. Je crois que mon préféré reste celui des catégories qui disparaissent subitement. C’est là qu’on prend le temps de bien apprécier le slogan de wordpress “Code is poetry”. J’ai envie de rire. Ou de pleurer. Ou peut-être les deux.
  • Mais plus encore, Wordpress c’est une communauté de développeurs. Une communauté de gens qui vendent l’installation, la customisation et l’intégration d’un design pour wordpress. (Je vais montrer un peu de bonne foi quand même, dans le cas ou le client demande un blog, oui un wordpress pourra faire l’affaire). J’ai vu des boutiques en ligne, des sites collaboratifs et bien d’autres trucs reposer sur des plateforme wordpress. Non mais on est où là?

C’est un dialogue qui me fera toujours sourire je pense :

- “Tu fais quoi dans la vie?”
- “Je suis développeur”
- “Ah? Tu développes sur quoi?”
- “Wordpress”

Et c’est généralement dit sans trembler, notez l’impertinence. Je crois que je pourrais faire un lolcat avec ce dialogue. Vous l’avez compris, ce qui me dérange dans tout ça, c’est que maintenant n’importe qui se prend pour un développeur PHP parce qu’il va ajouter un “the_time()” (toi aussi, réinvente la roue!) dans un template PHP. Alors qu’avant, la conception de site internet était quand même quelque chose qui avait l’air compliqué, aujourd’hui ça l’est beaucoup moins.

Alors non messieurs. Etre développeur PHP, se targuer concepteur de site web, ça va beaucoup plus loin que connaître par coeur le codex de Wordpress (dont l’absurdité me donne envie de pleurer). Et fort heureusement d’ailleurs, sinon je ne crois pas que je serais resté très longtemps développeur Web.

En me relisant, je crois que je pourrais facilement passer pour un connard de développeur élitiste, mais je vais prendre le risque. Ceux qui me connaissent vraiment sauront de toute façon que ce n’est pas le cas. C’est plus le développeur frustré qui parle ici, parce que pouvoir se considérer (et être éventuellement considéré) comme bon développeur, ça représente beaucoup de temps, de persévérance, de volonté à vouloir comprendre et s’améliorer (souvent due à une vraie passion pour le domaine, donc ce n’est pas non plus le bagne hein).

Du coup, j’ai réfléchi et je l’ai annoncé sur facebook :

(Du coup, je balance aussi ceux qui soutiennent le projet, haha)

Google PHP performance tips

I think I’ve never been retweeted that much so quickly. I just bookmarked using my old delicious account, a post from google with a few tips to optimize your PHP scripts. You really shouldn’t take them for granted (not sure that can be said, I’m just warming up with my english). At least, you should take all of them, for granted.

Upgrade your version of PHP : is this really a performance tip? Even if that’s right, that’s a shame if you waited google telling you this to upgrade your PHP skills. If you’re still using PHP 4, please go away. Fast.

Use caching : I think the “smarty” part was a joke.

Avoid writing naive setters and getters : Even if that’s probably true about some of my setters and getters, I really don’t think using public variables is a good solution, you really don’t know when you will have to add some tests. Not doing any tests on your variables is a really bad idea, by the way. Especially with PHP.

Avoid doing SQL queries within a loop : Before trying to build an ugly and weird SQL query, I really suggest you to take at look a SQL transactions (there, for example).

That’s all folks. As I said, I’m just warming up!

An introduction to Youtube Chromeless Player

A few weeks earlier, Google released a chromeless player for Youtube. The last one was using Actionscript 2 (*sigh*) and you had to use a crappy proxy to use it with Actionscript 3. This one is really great cause you don’t have to “bother” with a swc file, all you have to do is to load a swf file :
var loader : Loader = new Loader();loader.contentLoaderInfo.addEventListener(Event.INIT, _onLoaderInit);loader.load(new URLRequest(“http://www.youtube.com/apiplayer?version=3″));
var loader : Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, _onLoaderInit);
loader.load(new URLRequest(“http://www.youtube.com/apiplayer?version=3″));
Problem is, there is a lot of methods coming with this player and you can’t have introspection with FlashBuilder, FDT or whatever you’re using.
That’s why I created a simple library to use it. It’s not done yet, I still have comment work to do, and a few things I’d like to implement (dispatching more events, being able to get snapshots, and a few things like that).
You can get this library on Github, all feedbacks are welcomed!

A few weeks earlier, Google released a chromeless player for Youtube. The last one was using Actionscript 2 (*sigh*) and you had to use a crappy proxy to use it with Actionscript 3. This one is really great cause you don’t have to “bother” with a swc file, all you have to do is to load a swf file :

loader

Problem is, there is a lot of methods coming with this player and you can’t have introspection with FlashBuilder, FDT or whatever you’re using.

That’s why I created a simple library to use it. It’s not done yet, I still have comment work to do, and a few things I’d like to implement (dispatching more events, being able to get snapshots, and a few things like that).

You can get this library on Github, all feedbacks are welcomed!

I’m working on a more detailed example as soon as I added everything I wanted :

FlashForward-mini(By The way, Flash Forward is a really great (and addictive) show)

Use AIR 2.0 SDK with Flex 4.0

As you may have heard, AIR 2.0 (codename “Athena”) is now available on Adobe Labs. I won’t make you a list of all the cool new features, everything is well explained here. I’m going to show you a way to merge Flex 4.0 sdk with AIR’s which was kind of a pain for me : I tried a few commands like “mv -v”, “tar” (using the linux release), I even tried to do it manually. None of them worked, so I asked on the Adobe official forum and I discovered ditto (remember, I’m using MacOs X) :
ditto air_sdk flex_sdk

And voila! air_sdk folder’s content will be merge with flex_sdk’s (existing files are replaced). Now it’s working and I already had fun playing with Native API :

PHP Console

PHP Console

Blog post coming soon!

Bonjour Paris!

Didn’t think using a french catch-phrase in an english blog would make me laugh that much (considering the fact that I’m, well, French). Anyway, I’m in Paris for a couple of days, going there. I’m about to meet a lot of people I talk to through Twitter, blogs, forums and such.

I’m pretty sure that’s gonna be awesome!

Flex is bloat

I’m sure some of you may be kind of intrigued with this (really provocative) title, considering the fact that I’m a huge Flex fan. I don’t have much experience with this framework, but I really enjoyed using it for the past months. Also, I just love DestroyTwitter, a (really awesome) Twitter client built with AIR by Jonnie Hallman.

One day, I asked him (by email, never met him) if DT was built with Flex or if it’s was pure AS3, this is what he said to me :

[...] It was developed in pure AS3. Flex is bloat :)

-Jonnie

I’m not going to say this kept me up at night, but I’ve been thinking about it lately and going back to Crumblr, I started to get pissed at Flex (mostly because of MXML) and I wondered if a pure AS3 application wouldn’t be the solution.

With that in mind, I decided to restart Crumblr (which wasn’t that advanced, to be honnest) and I won’t use Flex for this project.

Wait & See!

A TextMate gem : copy source as RTF

The first thing I did when I started using my mac was to download and install TextMate, the best code editor I have ever used. It’s really cheap (about 50$) and it makes every single coding session really productive thanks to its bundles. Recently, I had to prepare a keynote to train some peoples to OO PHP and especially the new stuffs came w/ PHP 5.3 (namespaces, closures, etc.).

I really had some fun preparing this keynote :

Capture d’écran 2009-11-08 à 19.27.29

But to be honest, it was quite a pain to have colorized PHP in my slides.  I chose to copy my code from TextMate to a nice website called pastie and then copy my code from pastie to Keynote. Now it’s over, Thoas told me about a very nice bundle to copy source code directly as RTF, so I no longer have to use pastie.

If you’re interested (and you really should), you can download and install it there

I wish I has known about this before I finished my 50+ slides…

Back so soon?

As you may have heard, I turned into a really stupid guy for 5 minutes and removed my previous blog. That made me realize it was the right time to develop my own kick-ass blog with Symfony, Flex, maybe a desktop AIR app… Unfortunately, I do miss blogging and that’s why I quickly installed another Wordpress* and that’s why this post is titled “Back so soon”…

In case you do care, I’m still alive, working at NOE-Interactive, a french webagency where I do project management and development using PHP, Flash, Flex and such fancy technologies! Besides, I switched from my old PC to a fancy new Macbook pro which makes everything a lot more faster. Finally, I got back to work on Crumblr after a lot of trouble when I had to migrate to FlashBuilder beta 2. I was about to shot myself when I finally succeed, yeah me!

You may have notice the URL “r12t.fr”, I know it’s weird to have a french domain name whereas I’m writing this post in english but I’ll probably speak french too, so… If you are curious about “r12t”, it’s just an idea I had when I was looking for a short but meaningful domain name. Hugo is the only one to know what r12t means but I hope he’ll keep it quiet.

That’s all for tonight, see you guys!

* I know what I said about Wordpress, that’s why I hate myself so much right now

Edit : actually, I’m back on palleas.com, using r12t.fr didn’t seem right for me…