Wednesday, March 18, 2009

Congratulations Ronan

With 17 poinst scored against Scotland in one of his best performances so far, Ronan O'Gara is now with 492 points the highest scorer in the history of the tournament, overtaking unlucky Jonny Wilkinson who remains at 479. Chris Paterson, even if more than a hundreds of points down below, still holds his perfect stripe.


Peter Stringer, man of the match, played at a very high level, showing he masters many of the little techniques that belong to a very good scrum half. This time I really liked him.

And congratulations go to Ireland as well, as they are now just a match away from a deserved grand slam. Looks like Declan Kidney knows his job... I am really looking forward to the clash against Wales, hoping that what we saw against Italy was just a diversion from the real rugby they can play and that we will enjoy a terrific match.

Tuesday, March 17, 2009

NetBeans and Web Services

NetBeans is a great tool when it comes to web services (just like for all the rest, of course), and creating a web service client is just a couple of clicks away. First of all you right-click on Web Service Reference, expand the New menu item and select Web Service Client...


...then you simply tell the system where the WSDL is located, choose a client style and you're done.


NetBeans prepares a reference to each operation that you can simply drag wherever you need it: NetBeans will create a skeleton for you to customize.


I have just received the happy assignment of documenting all the tests for a system we're realizing on the IBM i5 platform using RPGLE. The project started with more than 600 pages of detailed requirements we delivered more than one year ago, without a single line of code. Now it looks like the customer has decided that we should start developing (at last!), and I wanted (and I still want) to avoid rewriting the Ulysses, as nobody is probably going to read it (probably the same fate shared by our detailed requirements, even if they were actually very good).

Luckily the system must expose all its features via web services, and we must also integrate them in a Java web application, so I thought "well, I have to prepare a facade and test it anyway, why don't I write some fixtures and document the system with Fit tables?"

After some debates with non technical managers, who often prefer a sound ream of paper, I convinced them of the advantages of my solution, then I started working right on it:
  • deploy a new instance of FitNesse (copy and launch would be closer)
  • create a simple test table
  • create a new project in NetBeans for the facade
  • create a new web service client
  • create a new class that uses the web service
  • create a new project in NetBeans for the fixtures
  • add the reference to the facade
  • create a new fixtures for the test table
  • Test!
"Null pointer exception? what do you mean with "Null pointer exception"? Let's check the output...

javax.xml.ws.WebServiceException: Failed to access the WSDL at: file:/C:/my/path/to/Project/xml-resources/web-service-references/SERVICE_WS/wsdl/1.2.3.4_12345/web/services/SERVICE_WS.wsdl. It failed with: C:\my\path\to\Service\xml-resources\web-service-references\SERVICE_WS\wsdl\1.2.3.4_12345\web\services\SERVICE_WS.wsdl (Impossibile trovare il percorso specificato).

That's strange... we'd already use this reference and jar trick in other projects and it worked perfectly well... following tonyx's advice I tried to work out the reference to the wsdl file, directly cabled in one of the NetBeans generated classes. After some experimenting I managed to tell NetBeans to always refer to the online wsdl for classes generation: you simply right-click your reference, select the menu item Edit web service attributes and from the wsimport options you add the option wsdllocation with the URL of the wsdl as a value.



Now my FitNesse instance happily colors my test table! Ops... red cells? the service is not working as expected... well, when do you want to know you have a problem? As soon as possible, which is now. Hey, you there, RPGLE guys... take a look at this! :-)

Monday, March 16, 2009

Wales still hoping

After beating Italy on their own ground Wales is retaining hope for the title, even if after this narrow 15-20 escape they'll have to utterly defeat Ireland in the Millenium Stadium (yes, I wish I was one of the lucky possessors of a ticket!).

The defeat against France seems to have hit the Welsh more than it seemed ad first, up to the point that they were very close to losing the match to the best Italy seen so far. Shane Williams continued his scoring stripe, also keeping his average of one try per match against Italy; Shanklin's try finally gave Wales some of the breath they needed. Nevertheless, scoring two tries against zero wasn't enough to say that Wales really deserved to win, as what really costed Italy the match were their errors.

Sergio Parisse was voted man of the match, and I really appreciated his perfect positioning and energy, if not the careless way with which he handled a couple of balls, but that's ok in the end.

Will Italy surprise us all next week? they still have a long way to go, but France could still be shattered by their match against England...

Friday, March 13, 2009

Manifesto for Software Craftmanship

A new manifesto is born in the world of software development: the Manifesto for Software Craftmanship. Have you signed it yet?

Tuesday, March 10, 2009

So long... for a little while

No matter how many times I have read it, I really can't help being moved when after some 900 pages I run across sentences such as these:

...now listen to my lay. For I will sing to you of Frodo of the Nine Fingers and the Ring of Doom.
And when Sam heard that he laughed aloud for sheer delight, and he stood up and cried: 'O great glory and splendour! All my wishes have come true!' And then he wept.

or also

But Merry stood at the foot of the green mound, and he wept, and when the song was ended he arose and cried: 'Théoden King, Théoden king! Farewell! As a father you were to me, for a little while. Farewell!'

and... well all the last part of "The Grey Havens" section, but that would be too much quoting... let's just be content with

He drew a deep breath. 'Well, I'm back', he said.

It's true that the book's greatest defect is that it's too short... that's not a great problem, because I expect to start it anew within some months, as always.

Friday, March 6, 2009

Again on detailed requirements

Some time ago I wrote about how detailed written requirements are just, well, detailed written requirements. They don't add value for our customers, at least not direct value, they can just help them to build or enforce their vision about a system. And at a high price.

Clashing with reality, sometimes you just have to produce these huge documents even if you know that no one will ever read them, and you'll sign contracts that say that you'll produce exactly what is "so clearly" written.

Pity that when you actually try to read through these 600 pages and understand what's expected from your team, most of the times you find out that you have to start out again, wasting your time and your customer money; I like very much this example borrowed from Mike Cohn, who refers to the following requirements written in IEEE style:
  1. the product shall have a gasoline-powered engine
  2. the product shall have four wheels (mmm I see where we're going)
  3. the product shall have a rubber tyre mounted to each wheel (yes, yes)
  4. the product shall have a steering wheel (definitely! we're on it!)
  5. the product shall have a steel body (of course it should)


At this point it should be clear to everybody we're talking about a car. But... would not be easier if we just had the customer at hand in case of need and a simple card with the user story "the customer needs a comfortable product with which it's fast and easy to mow the lawn"? Yes, this customer just wanted a riding lawnmower. What happens if you find it out only AFTER you've built a car? Do you think it is always possibile to attach a rotary blade under a Cadillac?

Get this one. The same holds true for software systems. So you'd better consider it before you embark on the quest.

Wednesday, March 4, 2009

The game is not over until it's over

And this spectacular try by Shane Williams demonstrates it, together with the conversion by James Hook.