Archive for April, 2008

Use Yahoo! Pipes For Manipulating RSS Feeds

Wednesday, April 30th, 2008

With Pipes, I think Yahoo! has a really interesting and powerful solution. Yesterday, I did a quick demo to my colleagues during an internal Lightning Talks session showing how they could tune their blog feeds in order to integrate better in our corporate planet blog (still under development).

For this, the programming is really simple. In the case of my own blog, I only needed to filter out posts marked with the ‘personal’ category. The pipe looks like this (I’m not providing a link to the original pipe, because there is a good chance it will get changed by the time you access it):

Simple Yahoo! Pipe

Simple, or what?

Notice the list of available components on the left-hand side, with documentation on the lower-left panel. Also, the ‘debug’ panel on the bottom of the page shows the output of a particular element. Really convenient.

I have also used Yahoo! Pipes to aggregate several blogs coming from my colleagues, the end plan being that to show them on a common page. Aggregating several blogs is more challenging, because you do not control all aspects of a feed. So you need to do slightly more advanced processing.
In the case of our blog, I had to:

  • add an author element to some feeds that didn’t have one
  • remove duplicate posts
  • truncate descriptions, as some were taking way too much space on the final page
  • some feeds had elements containing similar values (author, typically), but with different name, so I copy them to the appropriate element
  • do various minor clean-ups

Obviously, the resulting pipe is more complex. Still readable, though:

Complex Yahoo! Pipe

All in all, I am very impressed with the technology. I’m not going to say that anyone can use it, even non-programmers, but it is certainly open to many more users than standard programming languages.

Microsoft seems to have a competing technology with Popfly. One difference, though, is that it requires the installation of the Silverlight runtime (and a Passport login — I used to have one, but lost it years ago), which makes it a bit more clunky to work with. Yahoo! Pipes only requires a Javascript-enabled browser. A casual look at the Popfly homepage suggests that most usages of the technology are mostly made by people already using MS products (many implementations for the Zune, for example). However, Google Trends suggests that Yahoo! Pipes and MS Popfly actually have a similar mindshare.

Another service that is competing with Yahoo! Pipes is Feedburner. More more limited, though. For example, if the ‘author’ element is not provided, you have the option to provide a value. But it must be hard-coded (impossible to get it from another element in the feed, for example). Feedburner has a feature called Feedburner Networks that would have been of use for us, but it seems to be in beta, and only those who join the beta program last year that play with it.

In fact, Feedburner is not even trying to compete seriously with Yahoo! Pipes. Their big thing is marketing: they provide a good number of tools to compute statistics and traffic information. This is rather nice. My main concern is that they have been acquired by Google a year ago, and it seems that few new features have been created since then. I’m sure they are working on integrating with Google Analytics, but where’s the meat?

That said, I am at least using it to clean-up a feed that Yahoo! Pipes failed to read. So everyone can play nicely together, you see! ;-)

Anyway, go and check out Yahoo! Pipes. Really impressive stuff.

Test-Driven Requirements versus functional test automation

Wednesday, April 30th, 2008

Gilles nous propose une intéressante explication des tests fonctionnels démontrés dans le cadre du cours sur Test-Driven Requirements, qu’il donne à Valtech Training.

Le retour des Network Computer

Wednesday, April 30th, 2008

A l’heure où je vous parle, je suis devant un banal ordinateur.
Rien de plus commun que cet engin doté encore d’un disque dur, d’une mémoire et même d’un lecteur de disquette (je sais, je suis vieux). Mais est-ce moi, ou ma machine qui est vielle.
Il y a presque 20 ans j’ai démarré avec un « 3270 », quel engin barbare (merci IBM) pour faire de l’informatique. Terminal passif, juste un écran et un cable réseau connecté à Big Blue.
Mais en finalement, pas si désuet que ça.
Pour gérer ces mails, il y a Google (Gmail)
Pour faire ces spécifications et autres plans chers à nos Ingénieurs Qualité, il y a Google (Google Docs)
Pour faire nos suivis de projets, statistiques en tout genre, il y a Google (Google Docs)
Pour voir nos photos de vacances, il y a Google (Picassa)
Pour suivre la presse, il y a Google (Google Reader)
Pour voir les films, il y a Google (bon là, c’est YouTube, pas encore racheté par Google?)
Et maintenant, même pour développer nos applications, il y a Google (Google App Engine)
Et pour ranger tout ça sur mon bureau, il y a encore Google (IGoogle)

Donc, pourquoi s’embarrasser d’un vieil ordinateur, avec disque dur de 180Go et mémoire de 2Mo, pour finalement accéder à Internet.
Même Windows, à quoi sert-il, si ce n’est lancer le navigateur.
Même le système d’exploitation est remplacé par le navigateur, YouOS (www.YouOS.com)
Reste à avoir un bon fournisseur d’accès, et voilà !

PS : Google = Google, Yahoo, et Cies

Découvrir Windows PowerShell

Tuesday, April 29th, 2008


Petit sondage :
Qui travaille sous Microsoft Windows ?
– tout le monde ?
Qui a besoin de cmd.exe ?
– tout le monde (maven, scripting, etc.) ?
Qui trouve l’invite de commande facile à utiliser ?
personne ?
C’est par ce rapide sondage qu’a commencé la démonstration de Cédric Rup sur la nouvelle console de Microsoft : le PowerShell.

En effet, en novembre 2006, Microsoft ré … (suite)

Une bonne couverture de tests doit s’accompagner d’une fragilité des tests

Monday, April 28th, 2008

Une bonne couverture de code par les tests est primordiale. En même temps, un taux de couverture élevé ne signifie pas grand chose. ce que je vais appeler la fragilité des tests est un élément très important.
(more…)

Implementation of “Creating Change One Tic-Tac At a Time”

Monday, April 28th, 2008

Those of you who came to CITCON London 2006 might remember the talk by Jeffrey of the same name (I have a couple of notes from back then, also see the entry for Agile 2007 conference and comments on Alistair Cockburn’s idea — Jeffrey & Alistair collaborated on that talk). This was also discussed at CITCON Brussels last year on a session arranged by Douglas Squirrel: Karma for Continuous Integration.

Essentially, the idea is that by giving token gifts to team members, you can get them to fundamentally change their working habits.

Well, redsolo has implemented a plugin for Hudson that does pretty much what Squirrel was suggesting: allocate points depending on what the developers are doing. The points are awarded or removed on build breaks, tests passing or failing, and on build successes.

Now, if I remember the discussion from CITCON Brussels correctly, the conclusion was that such a tool did sound like over-engineering a social problem. That was worth trying, so I asked for help on the CITCON Mailing List. Alexander Snaps was kind enough to give it a try with his team.

The outcome is that one of the developers was quick to point out that the point allocation was not entirely fair. This is an interesting result, because it shows that the points system works: developers do care (at least in the short run) about things as trivial as points. On the other hand, of course, it shows, again and again, that the devil is in the details: it is close to impossible to allocate points in a perfect way. You will always find another special case with a different point allocation pattern. Now, you could spend a long time trying to implement them all. But that this is really over-engineering…

Best would be to let the developers decide for themselves. Give them simple rules (one point per new successful test!) and let them request the point by themselves. They will figure out the details.

Auto contrôle ou auto flagellation

Friday, April 25th, 2008

Auto contrôle ou auto flagellation

8aweek donne des leçons à la communauté Agile. (sur InfoQ)

8aweek veut nous faire croire qu’on n’est pas capable de se responsabiliser soi même.
8aweek propose un outil de type toolbar qui nous aiderait à « contrôler notre distraction» sur internet. L’utilisateur spécifie sur quel site il estime « perdre du temps », et la toolbar s’occupe de contrôler son accès.

Ne sommes-nous pas plus responsable que ça que nous ayons besoins de nous auto-flageller ?
De toute façon, si la toolbar s’occupe du contrôle, il y a toujours moyen de la désactiver. Peut être vont-ils inventer un outil qui vérifiera que la toolbar est bien active, et finalement même pour les sites non « distractifs » ne seront plus accessibles.

Le meilleur, c’est qu’ils ont utilisé l’Agilité pour faire cet outil.

Le risque, que nos managers nous imposent sont utilisation

Surfer libre !

Dans un nuage

Friday, April 25th, 2008

Ça y est, j’ai enfin réussi à faire fonctionner le nuage de tag Technorati.

Le “Cloud” comm’y dise!

En fait, il faut modifier les paramètres par défaut de recherche de post dans Technorati pour son propre blog :

Par défaut, il ne cherche que sur les blogs avec autorité et j’avais mis en langue Française.
Reste plus qu’à faire fonctionner le ping automatique (soit disant) de Blogspot vers Technorati, et le « Cloud » devrait se mettre à jour

Scrum en Chine

Wednesday, April 23rd, 2008

Hé oui, même Scrum va en chine, il n’y a pas que la flamme.

L’article présente un retour d’expérience de 5 cas de mise en place de l’agilité (Scrum) dans les entreprises chinoises.

Il est, je dirais normal, d’y voir les mêmes causes d’échec,

  • la non application des principes de base par les équipes (Croire que Scrum se réduit aux scrum meeting)
  • la non compréhension et donc adhésion du management aux principes Agile

Ça parait bête, mais faire de l’Agilité sans en faire, ne peut que nuire à son image.

Bonne note : 68% des gens se sentent plus productif depuis leur passage à Scrum

Synthèse sur le blog Xebia
Post d’origine sur InfoQ

Port of an J2EE application (with Hibernate) to Ruby on Rails (1.2.3)

Monday, April 21st, 2008

Last week, I ported a J2EE application, using Hibernate for persistence and Capestry for the MVC part of the application to Ruby.
I logically choosed Ruby on Rails as it is the main Web framework for Ruby.
In this post, I describe how I did to perform such a port…
!Important! the application I first wrote this application in Franch, I tried to refactor the code in English, but… I haven(t finished at this time, … sorry folks !

Introducing the bank on line application

This application is composed of 3 models : Client, Compte (account) and Operation
A client has n Comptes (through reference_client) and a Compte has n Operations (through compte_id) :

The application allow the user to :
*login
*see a list of his accounts (after being logged in)
*see the details of one of his account (actually a list of the operations on an account)
*order a transfer between 2 accounts provided that the balance is positive (and the accounts exist)
Quite simple from a user point of view…

Creating the application with Ruby on Rails 1.2.3

The best way to port this new application to RoR, was to create a new RoR project
rails bankonline -d sqlite3
(by the way, I was using the sqlite3 database, to allow an easy installation of the application, the J2EE application was using HSQLDB)
cd bankonline
I was using for this Rad Rails visual editor on a windows platform (no comment…)
The first step to port this application was to create the 3 models.
ruby script/generate model Client
ruby script/generate model Compte
ruby script/generate model Operation
Then I put the contraints on each of these models (the has_many and belongs_to relationships to stick to my diagram), editing their definition files in app/models and also the database definition files, in db/migrate
Once this is done, I can run
rake db:migrate
to load all my db/migrate scripts. (in case I want to revert the changes, I can use rake db:migrate VERSION=0, or VERSION=1 if only want to reverse the migration after the script)

To fill the database with data, I add another migration script :
ruby script/generate migration add_data
I edit it to add some lines in the database and then I migrate :
rake db:migrate

Then the 3 corresponding controllers :
ruby script/generate controller login
ruby script/generate controller gestion

Implementing the login system (session based)

For this, I took example on the depot application login system, from the pragmatic programmers’ book “Agile Web Development with Rails”, but I chose to use not encrypted passwords.
I also chose to use database based sessions, so I edited the config/environment.rb file, line 31, to allow :
config.action_controller.session_store = :active_record_store
Then, I add to create a new table to hold the session data :
rake db:sessions:create

Of course, you need a little bit of code in your app/controllers/login_controller.rb, you have to implement the login and logout methods (or actions, to speak rails); you may also notice the apparition of a “before_filter” call.
The authorize filter is defined in the app/controllers/application.rb file, it will be loaded for every controller, and will check tha t a valid client is in session, or else, it will redirect to the login action, in the login controller.
Finally, you will have to define the views, both in app/views/login, they’re called login.rhtml and logout.rhtml
One last thing : you also need to modify the layout, in app/views/layouts/login.rhtml to display the flash notice before the yield (which includes the display of the view)

<%= flash[:notice] %>

Implementing the account listings and the transfer functionality

We have to code the controller, GestionController, located in gestion_controller.rb
You’ll notice that I’ve replaced the service class in Hibernate by methods inside the controller in Rails, I didn’t want to put it in the model, since the model can’t know how to transfer money.(I think we can discuss that point, but as long as the helpers are dedicated to the view…)
I’ve also used exceptions to raise errors (if the origin account balance is smaller than the transfer amount)
You also have to include the flash notice in the layout, app/views/layouts/gestion.rhtml

That’s it !
launch your rails app
ruby script/server
and try it out in your web browser at : http://localhost:3000/login/login

In a few days I’ll complete this article with the tests and fitnesse fixtures …
To continue …

First version of Bank online RoR to download