## Thursday, December 10, 2009

### File import in SQLServer 2005

After some tries, and despite of all the ultra-mega-super-lightning-integrated environment provided by Microsoft, I still think that the fastest way to bulk load a csv file into a SQLServer 2005 table is to use plain old Transact-SQL. Assuming you have a csv file with the same structure of an existing table, all you have to to do is write a few lines in your query window and fire an F5:

BULK INSERT your_table
from 'absolute/path/to/your/file'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)

Obviously, you could also use different terminators, but all you need to do is to alter the specified parameter.

## Wednesday, December 2, 2009

### Progress?

You work for a company that produces custom software products. One of your customers experiences a warning message. To give you the best feedback possible, he disciplinately gets a printscreen of the application displaying the message and one of the directory that contains the files produced by the application.

Well educated customer, ain't he? at this point, as you have a helpdesk account, he e-mails the picture with some explaining text...

...too simple, isn't it? that's why he actually printed the images, scanned them, converted them into a pdf and emailed it...

Of course this enabled him to pen down a couple of notes on the images, but... ehm...

## Monday, November 30, 2009

### Climbing the ranking

Italy has climbed up to 11th place in the international ranking defeating Samoa 24-6. Unluckily Sergio Parisse could only join the match from the sideline for a serious injury occurred to him a couple of days before the match. That said, the match didn't have much to offer, starting from Bergamasco kicking penalties. Not because of Bergamasco, who even scored, but because he's not a kicker. Is it possibile that Italy doesn't have one? Italy have had no real kickers after Diego Dominguez (who, to cross the t's and dot the i's, actually came from Argentina), and that should really change in order to avoid trashing away all the possessions hardly gained by the scrum, the very same scrum that collapsed the All Blacks even if Dickinson didn't seem to notice it.

I went shopping after the first period, as what I saw was enough. The match against South Africa was a better one, the Springboks perfectly did what every youth coach teaches his children: all the fundamentals, by the book. Simple, yet effective, and a pleasure to watch. Looking forward to the Six Nations, longing for a breathtaker like Wales-Ireland.

## Wednesday, November 25, 2009

### Sustainable pace?

Always been one of my favourite practices. Too bad I fail to practice it more often than I'd like to... 7 extra hours in three days, up to 2 a.m. on Sunday morning and a holiday spent working. There's really a lot of space for improvement!

## Friday, November 20, 2009

### Target 500 reached and passed

As our CI server is approaching to the 300th build of the project I'm working on, I am proud and happy to announce that we have reached and passed the 500th test, as we now have 528. Maybe #500 was mine, maybe it was lm's... or maybe it belonged to someone else. What really matters is that now it belongs to everyone, and it adds up to the status of good health of the codebase.

The number of tests has constantly grown, and the bar is almost always green - even if I should say that, using Hudson, the ball is blue (or the bar is blue, if you delve into details). I'll never get tired of saying it, CI server are really a wonderful tool - obviously if you provide tests for what you build, but that goes without saying.... or does it?

## Wednesday, November 18, 2009

### The Rocky Horror Picture Show Revisited

Enjoy the Rocky Horror Picture Show in just 30 seconds!

## Monday, November 16, 2009

### Moving target

That's it, despite I'm back to work, despite my wife trying to slow me down, I've just finished reading my 60th book in 2009:

That moves the target for December 31st; I'd like to reach 30000 pages, but I'll never do it, so I'll try to reach book #69 (if I have to pick a number let me pick a good one!).

## Saturday, November 14, 2009

### All Blacks not so ready for Italy

New Zealand defeated Italy 20-6 in the wonderful frame of a completely full San Siro Stadium, featuring more than 80.000 supporters. But the black pack was really disappointing, and Ellis surely doesn't have the fastest hands around: the Italian scrum really bashed them beyond any hope. The official website allblacks.com reports

However, in the last six minutes as 13 successive scrums were set five metres from the All Blacks line, and Neemia Tialata, having changed to the loosehead prop was sin-binned for taking a scrum down, the Italians were not able to get past a determined All Blacks pack.

What they forgot to mention is that those 13 scrums derived from as many penalties awarded by the referee due to a literally humiliated pack that could only but cheat to prevent Italy from rolling over them. Parisse after the match said to Dickinson that he should have taken a decision, awarding a well deserved technical try. Well, he simply didn't. It wouldn't have changed the outcome of the match, but it would mean a lot for Italians. Scoring a try against New Zealand is something you bring with you for a lifetime, and I know what I'm talking about. Today Italy have been stolen this achievement. Would Dickinson take the same decision if Italy collapsed the scrum for so many times? Surely in the Six Nations against England just a few years ago Italy was punished for much less. Anyway. My friend Pancho, who was just above that small plot of land ploughed and ploughed by the forwards, pretty much agrees with me, and he says that also all the other 80.000 supporters do. At last this was not just an opinion of mine, was it?

The Italian movement has surely grown, but it is not enough, like the last Six Nations has shown. Their growth also passes through matches like this: a lost opportunity, a good match with a bitter taste. Will the Federation be able to choose the right strategy to keep the movement growing? Let's put the matter off...

That said, the stadium was wonderful, the anthems were very exciting and the haka was thrilling, as always (as an aside: I'm talking about the Ka Mate, as I never liked the Kapa O Pango). Pity that today the All Blacks didn't have much more to offer.

## Friday, November 13, 2009

### All Blacks ready for Italy

Tomorrow is the long awaited day of the clash between Italy and the All Blacks in San Siro, Milan, where 80.000 supporters are ready to cheer for their favourite team but most of all to enjoy a good afternoon of rugby.

Statistics are awfully against Italy, who lost their last match 27-6 in June. Longing for a try!

## Wednesday, November 11, 2009

### How to test a very particular factory

@Test(expected=IllegalArgumentException.class)
public void makeBaby() {
Family family = moz.getFamily();
assertNotNull(family);
assertEquals(2, family.getChildren().size());
BabyFactory factory = family.getWife();
assertNotNull(factory);
Baby babygirl = factory.makeBabyGirl("Mila");
assertNotNull(babygirl);
assertEquals(3, family.getChildren().size());

}

Probably you should also set a timeout for the test, which should complete in about 40 weeks ;-)

### A little quote from the Rocky Horror Picture Show

...for tonight is the night that my beautiful creature is destined to be born!

Frank'n'Further

## Tuesday, November 10, 2009

### 6th Italian Agile Day

Better late than never, let me remind you the 6th Italian Agile Day which will be held in Bologna on November 20, 2009. Due to previous engagements (do I hear "baby girl coming"?) I won't be able to be there, but if the coverage will be as good as the one provided last year I won't miss the contents.

What I'll surely miss is the opportunity to meet so many brilliant people at the same time...

## Friday, November 6, 2009

Reading this article makes me think that I'm probably the only fool that changes his car because it is too small to allow all children seats to be properly positioned...

Well I'm happy to be a fool! When people tell me that I could always have a car crash with a madman running at 160 mph - in which case my efforts would be useless - I always answer that I can't control madmen, but I do have control on what I do. If spending money can save the life of my children, I am definitely going to spend it. I don't care if everyone laughs at me, I'm grown enough to have a mind of my own. And, guess what, I agree with it ;-)

The same goes for allowing people to smoke near me or my family: even though our world is polluted - and I can't control that - if I can spare us just the tiniest bit of crap I will. End of story. Sayonara. Bye bye.

## Thursday, October 8, 2009

Yesterday I hit book 50... 19426 pages. I still have almost three months ahead to further increase my stats, even if I hope I will have less free time.

As an aside, today I saw quite a round number in my stats:

Cool, so I just posted it!

## Tuesday, September 29, 2009

### Words of wisdom from Master Po

I am not a big fat panda... I am THE big fat panda!

## Saturday, September 26, 2009

Due to a nice guy that didn't stop when he had to yield, now I happen to have quite a lof of free time, so I have decided to catch up with my reading stats. I was already ahead with respect to last year, but more than three months ahead of schedule I have reached the same number of books I read last year, which is 45. The number of pages I read is slightly less than last year, as we're talking about 16791 versus 16929, which means that the books I read this year are averagely 3.06 pages shorter.

That said, I have in mind to further increase my stats, I'd like to reach Francesca, who last year read more than 100 books... though target, I don't think I'll reach it but hey, the fun is the trip, not the destination ;-)

## Friday, September 11, 2009

### How to deal with collations

Sadly, the need to inspect a database to find orphaned records is not uncommon. One typical query you might write would probably look like this one:

select *
from table_one
where my_key not in
(
select my_key
from table_two
)

Every now and then the keys you need to compare are strings with different collations, so a query like the one above would yield error messages. To resolve the problem you can cast one of the field:

select *
from table_one
where my_key not in
(
select cast (my_key as ${type}) collate${collation}
from table_two
)

Obviously, ${type} and${collation} are just placeholders. If you are using SQL Server you can execute the Transact-SQL sp_help procedure to get the informations you need for the cast:

exec sp_help table_one

Of course, numeric keys would solve the problem at its roots. But... have you ever heard of natural keys and legacy databases?

### Why British people play rugby

Englishmen play rugby because they invented it. Welshmen, Irishmen and Scots play rugby because if they bashed Englishmen in any other way they'd end up in jail.

Thanks to Pancho for the hint.

### Shared forlders in VirtualBox

Just a reminder... shared folders defined in VirtualBox can be accessed as network resources, e.g. if you have a Windows system you'll find them in My Network Places/Entire Network/VirtualBox Shared Folders.

## Thursday, September 3, 2009

### How to fold code in NetBeans

NetBeans editor has always had several nice features, one of which is the possibility to fold code thus eliminating unnecessary noise when working. Normally you can collapse methods, comments, imports, javadocs, and so on just clicking the + sign on the left (or using the CTRL + KeyPad- combination). To expand the collapsed section you can obviously click on the - or use the CTRL + KeyPad+ combination.

NetBeans also offers you the possibility to arbitrarily collapse contiguous lines of code: all you have to do is select the lines you want to collapse and press ALT + Enter, thus showing available suggestions given the context (in our case
Surround with //<editor-fold defaultstate="collapsed" desc="comment">...)

I also found an interesting post on code folding, so I'd like to add my two cents on the subject.

I personally think that all imports in Java classes should be explicit, as I want to precisely know what I'm importing. If I only see a couple of lines with asterisks I might think everything is fine, but that could be hiding the fact that I'm importing a thousand classes, which is definitely a smell. That said, I think this can be slightly different, say, when using Java persistence (or in similar situations): I surely want to see all "important" imports (nice alliteration, huh?), but I might want to hide persistence related imports. This would lead me to a hybrid hiding strategy, which can be confusing, but would hide unnecessary noise in the code, which is good.

About method collapsing I pretty much agree with Dustin, but every now and then I happen to collapse method when I work, e.g. if I want to see different portions of code at the same time on a narrow screen - otherwise NetBeans has the Clone Document feature that lets you reposition a copy of the code you're working on pretty much anywhere on the screen(s) - and I cannot/don't want to move methods around. Of course there should not be too many methods between the portions of code that I want to inspect. Anyway, I always use this kind of folding as a temporary solution except for "non-important" or standard code, e.g. plain setters and getters in simple beans, unlike Dustin who likes to keep all executable code shown - even if I can see his point.

## Monday, August 17, 2009

### No comments, just a rant

Sometimes I'm so tired to throw pearls to the pigs... pigs who are supposed to listen because all you say is in their own interest... There will be a day when I will give some people the axe. Right in the middle of the forehead.

## Friday, August 7, 2009

### Build #100

I have been a bit inactive on the blog in these days. This is why:Nice birthday present, insn't it?

## Thursday, August 6, 2009

### Checking beans properties with JMock

JMock is a great tool when you have to test how an object interacts with other objects for which you still haven't written a single line of code; all you have to do is to annotate the test class...

@RunWith(JMock.class)

...define a mockery...

private Mockery context = new JUnit4Mockery();

...and finally write a test method in which you define the mock objects you need, specify their behaviour then you execute your code and test the results:

@Test
public void testGetTable() {
System.out.println("getTable");
context.setImposteriser(ClassImposteriser.INSTANCE);
final LookupTableRepository repository = context.mock(LookupTableRepository.class);
final LookupTable table = context.mock(LookupTable.class);

context.checking(new Expectations() {{
oneOf(repository).getTable(with(equal(tableName)));
will(returnValue(table));
oneOf(factory).make(with(equal(table)));
will(returnValue(expResult));
}});

assertSame(expResult, result);
}

So far, so good. But what if you need to check that your object interacts with others passing as a parameter another object it has just built?

This is where custom matchers come in: you simply add an expectation that specifies that the parameter you're interested in has one property (or more) with a given value:

context.checking(new Expectations() {{
Matcher<LookupTable> tableNameMatcher = Matchers.hasProperty("tableName", equal(tableName));
oneOf(repository).save(with(tableNameMatcher));
will(returnValue(table));
oneOf(factory).make(with(equal(table)));
will(returnValue(expResult));
}});

In this example we expect our instance to ask the repository to save an object whose tableName property has the specified value.

Obviously, the matcher can be combined with others:

Matcher<LookupTableItem> codeMatcher = Matchers.hasProperty("code", equal(code));
Matcher<LookupTableItem> descriptionMatcher = Matchers.hasProperty("description", equal(description));
oneOf(repository).save(with(allOf(codeMatcher, descriptionMatcher)));
will(returnValue(table));

## Thursday, July 23, 2009

### First Iteration in itinere

For the second time in the sprint - but the first one does not count because we merely cut funcionalities that were not needed anymore - our Burndown chart clearly express what everybody has felt in the last weeks, even if it was unsupported by facts (at least until yesterday): we will deliver.

Once more I'd like to stress the importance of such a tool: we always know what is going to happen, and we can take informed decisions.

As I said, the first big slope is a cut due to a modification of the contract; the second came after most architectural decisions had been tested and taken, just as expected. For this first iteration we choose the part of the system we knew best and that - not by chance - is the basis upon which we will build the whole system. Nevertheless, we mostly focused on architecture, even if we will deliver actual funcionality. The project follows a test driven approach and a domain driven design, and we just anticipated a little more than we needed at the time because we know we will need it within a couple of months (so the YAGNI thing does not apply here).

So the bar is green, our Hudson happily smiles and so do I; first demo next week, maybe more on this after the retrospective.

## Wednesday, July 1, 2009

### Feed for tags in Blogger

Should you need to provide feed to just to some particular posts with a specific tag in Blogger, all you have to do is to use the address http://${yourblog}.blogspot.com/feeds/posts/default/-/${tag} e.g http://andreamoz.blogspot.com/feeds/posts/default/-/NetBeans.

There are many more possibilities, as you can find googling around, but if you just have to get your blog on Planet NetBeans that should be enough (at least I hope so).

### NetBeans and libraries

I just upgraded my NetBeans to version 6.7, and being quite lazy I didn't want to recreate all previous libraries and references, but obviously I need them. Yes, I might have decided to keep all settings from the previous version(s), which I regularly backup, but my interface had something strange and the dimensions of some widgets were quite quirky and my knowledge of the program does not go that far.

Anyway, after restoring the project I'm working on, NetBeans informed me of some missing references, just as expected.

Happy as a clam, I took the previous build.properties file, restored the lines that referred to my libraries (libs, sources and all) and... NetBeans stabbed me in the back! Still, it couldn't see the libraries!

After some restartings of the program and of the system (hey when you're working with Windows you get used to it... isn't it sad? and it often it works... isn't it sadder?) NetBeans still ignored my cries. It turned its back on me, despite all my affection steadily grown in all these years.

I gave up and recreated the libraries manually, but immediatly thereafter I checked the latest modified files in the .netbeans directory and found out what was missing... what I was missing, so actually NetBeans didn't stab me in the back so we're still in love. Yes, if you're wondering it, I had to apologize, but it happily welcomed me back.

Anyway, romances aside, when you create a library NetBeans not only adds the references in your build.properties file, but it also create an xml file in the config/org-netbeans-api-project-libraries/Libraries directory.

Should you need it... now you know!

As a sidenote: apparently NetBeans doesn't always allow the removal of different plugins at the same time, and it took me several tries to disable the profiler (actually I had to remove it, as I didn't manage to just disable it). More on the new version will probably follow, up to now I just can say that my peer likes the new colors of the splash screen.

While you wait, go get it yourself!

## Tuesday, June 30, 2009

### Goodbye Pedro

After winning four Italian titles, after playing with the Italian National Team, after many satisfactions Pierpaolo Pedroni has been - way too early - summoned to play in the selection of rugby legends in the most beautiful stadium over the rainbow.

When my friend Pancho gave me the news I couln't believe him, as I had just met Pierpaolo, who was only 45 years old, less than a month ago in Cernusco, where he won the Vets cup with the Alcolizzati.

Somebody says that rugby players never die, at the most they hand the ball. Goodbye Pedro, we'll meet at the fourth half.

## Friday, June 26, 2009

### NetBeans and Frameworks

NetBeans seamlessly provides an integration with the most common frameworks, e.g. GWT, jMaki, Spring Web MVC, JSF, Struts, Hibernate.

When we create a new project we are asked whether we want to use any of these frameworks in our application. Should we need to add them later it is very easy to do so: from the project properties you select the Frameworks category, click the Add... button, select the framework(s) you need and you're done, as NetBeans takes care of (almost) everything, e.g. if you add the Hibernate framework NetBeans will add the necessary libraries and references and create a hibernate.cfg.xml file.

What I never managed to realize is how you get rid of a framework, as there are no Remove buttons whatsoever. That's where a versioning system comes useful (disclaimer: this is definitely NOT the only reason for which you should use one). If you have your whole project under versioning (including NetBeans administrative files) as we do, after committing everything on the repository you can simply add your framework and ask your versioning system to show you the changes and use a simple diff on each modified or added file and save the differences for future reference: in this way you can pretend you know the NetBeans internals like the back of your hands, while you just used a sleight of hand.

If you want to remove the framework now you can just revert all modifications and delete added files, but if you want to remove it after some other coding you can always go back to your reference files.

I'm sure there's a way to automate all this at least a little bit, but for now I'll be content with this.

## Tuesday, June 23, 2009

### Testing an interface in JUnit4

How do you test an interface? Obviously, there is no way to instantiate it directly, so you have to write a test for each different implementation. I feel shivers down my spine even as I write it... that awfully smells like duplication, which - should you ask - is bad. Nevertheless, I'd like to test every possible implementation.

As JUnit Recipes reports, this is quite simple:
1. Start from the test case for one of the implementation (I assume you have them, don't you?)
2. Create a new abstract test case in which you will define the expected behavior
3. Have your test case extend the abstract test case
4. Move the code that instantiates the object under test into a separate method, storing the object as a reference to the interface and not the implementation.
5. Adjust the rest of the code referring to the interface behavior accordingly
6. Create an abstract creation method for each concrete creation method
7. Move all tests for the interface to the abstract test case
At this point in the test cases for the implementations there should be only implementation specific behavior, not related to the interface.

I tried it all in JUnit 4... and it didn't work, as when I ran the tests for all the project I got a wonderful java.lang.InstantiationException (actually several of them) for the abstract test case.

After some personal tries and a bit of googling I found that all I needed to do to have everything run smoothly was to add the @Ignore assertion to the abstract test case. Now we have no excuses!

## Monday, June 22, 2009

Don't comment bad code - rewrite it.

The quote belongs to Brian W. Kernigham and P.J. Plaugher (and I'm sure to many others). It might sound simple... yet I perceive it as so powerful! It puts your back to the wall with the choice to devote yourself to leave your campfire slightly better than you found it... or to simply turn your head.

Uncle Bob has a similar opinion on the subject:

"Ooh, I'd better comment that!" No! You'd better clean it!

Commenting bad code derives from the fear to actually modify it. But beware:

Fear is the path to the Dark Side.

### Get rid of modifiers

When you are performing queries you sometimes want to treat modified letters like their corresponding unmodified ones, e.g. è should be treated just like a plain e.

The first algorithm that comes into your mind is probably a long switch of modified characters, which is horribly ugly. The second one could be a map, slightly better but still ugly. Both approaches require quite an amount of work, and I didn't (I still don't) like them.

After investigating a little and asking some friends I was more or less resigned, until Gabriele pointed me to what I was actually looking for: the java.text.Normalizer, that lets you transform an ugly string into a neat one with just a single line of code:

result = Normalizer.normalize(myString, Normalizer.Form.NFD);
return result.replaceAll("\\W", "").toUpperCase();

Now, that's what I call quite good...

### What do Scrum and Nintendo Wii have in common?

Find it out here.

## Wednesday, June 17, 2009

### What's in a programmer's head

I would like to say "humility", as there should be in other professionals. Instead, what I most experience is hubris, which can be good - but it can also hinder you.

That's why we should always listen to people who criticizes us, especially if they know us well (and if I may add, when they stop firing at us it'll mean they don't care anymore, and that would be very bad). To quote Senator Amidala:

Our mentors have a way of seeing more of our faults than we would like... it is the only way we can grow.

I am reading several resumes, and I often find sentences like "five years experience in (you name it)". What I would like to know in advance is if that means "I've constantly grown in the last five years" or "I've repeated the same six months experience ten times". I'll let you reckon which is the most frequent case.

### Embrace Change

Not only the subtitle for Extreme Programming Explained. Changes happen, that's the only thing you can be sure of. Things change, people change, hair styles change (actually I'm quoting here). So we must be open to change.

I've seen POs swap projects, new projects created, weeks of planned work cut, people added to workforce, people cut from workforce, and much, much more in less that a fortnight. Is that bad? it is, if you're lost with no hints. On the other hand, it is also an opportunity.

If you spent some time in serious planning you have a good basis on which you can build your ability to steer the change. That does not mean that you need a good plan (which could now be completely worthless), but that you have a solid knowledge of what's on the table, and that means more information, which translates into a conscious decision instead of a jump in the void (or at least it mitigates the risks).

And let me say that again:

The waterfall model is wrong!

### Milano Rugby Festival 2009 Pictures

On the official site of the event you can find a bunch of pictures of the 2009 edition of MRF; I'll just post this appetizer... or is it?

See you next year!

## Friday, June 12, 2009

### Estimating or Guesstimating?

Everybody would like to know in advance all informations, risks and variables when they need to estimate something. The purpose of estimating is manifold, so we always have to give our best because a wrong estimate might reflect on many things.

What we always have to remember is that we seldom can estimate on a completely solid ground. That's why we normally introduce a corrective factor, which is absurdly big at the start of a project and narrows while the latter proceeds.

Sometimes you lack important pieces of information, nevertheless you have to guesstimate. It should be clear to everybody (at least it is crystal clear to me) that if you guesstimate an effort of 100 it could actually be a value between 60 or 160 (PMI says between 75 and 175, which is a more pessimistic but probably better correction). Guesstimates are not contracts, and they cannot (they shouldn't) be used against you. Thus, we must not be afraid of guesstimating; it often helps us to clarify some aspects of what's ahead of us.

"I don't have enough information" is a very good justification, and it must be respected, but it cannot be an excuse. I know it can be subtle, but that's how I see it. After all, as an old keyring of mine reported...

right or wrong, I'm still the captain

## Tuesday, June 9, 2009

### Alcolizzati rule

Alcolizzati are back... just as we all remembered them: as winners. This time they beat 26-7 the Heath RFC from England to win the Vets 10s Cup in the Milan Rugby Festival held in Cernusco last weekend.

The Ingolstaadt Baboons (GER) lost the Bowl Final to the NRDC Rugby (ITA), just as the Mucche Pazze (ITA) lost the Shield Final 0-22 to the London Nomads (ENG). Butleigh (ENG) won the Plate Final defeating for 17-0 the Ragazzi Sani (ITA).

Winners of the Cup Final are the Sabbie Mobili (ITA) who defeated Benfica (POR).

But the most important prize of the event was, once more, awarded to the Ingolstaadt Baboons, who obviously decided to specialize in that very difficult competition which is the Cassie Pienaar Trophy.

## Monday, June 8, 2009

### Thanks to all Chickens

El Dì del Ghezz was a truly wonderful event, featuring Chickens from the 40s (some tottering, some still showing their skills, every single one as happy as a child) to the younglings, all with the green and yellow shirt. It was a great occasion to meet many friends I'd lost contact with, either teammates or opponents.

I bet "el Ghezz" spent all day smiling down at us.

Just for the record, the Chickens of the 70s beat the Chickens of the 80s 4 tries to 2 (goal kicks don't count in these occasions), showing that the heart still counts more than age ;-) even if I should say we drew, in perfect Chickens style.

I just played for a few minutes, but they were more than enough to awaken the beast in me: I just can't get enough... and I'm longing for more. Who knows. Up to now, I just can say that my first and last day with a rugger have been in green and yellow, so thanks again to all Chickens.

## Friday, June 5, 2009

### I'm still ill (and I don't want to be healed)

Rugby is the most extraordinary disease in the world, and a couple of days ago, thanks to my friend Gigi, I found out (should I need more evidence) I'm still infected.

Tired but happy, I completed almost one hour of touch rugby with many enthusiastic players, some of which really gifted (you can spot them quite easily, even from the smallest gestures). I want to personally thank each of them for the warmest welcome and for the great support. I'm looking forward to meeting them again at the Milano Rugby Festival which will be hold in Cernusco this weekend.

It was great, and it was like these ten years had never passed. Well, they actually have, as I couldn't do all I used to, or all I'd have liked to, but that does not matter. I was there. And I played. I also got a couple of bruises!

The evening went on even better, dining at La Ciotola di Jarop with other rugby players (some of them former rugby players, which, as I already explained, to me means "people who used to play rugby, don't play anymore, but still have rugby in their heart"), owned by Pierpaolo, another team-mate of them. Highly recommended!

And tomorrow will be another great day... el dì del Ghezz!

## Tuesday, June 2, 2009

### The gum shield is ready

Even if I must admit I have lost a bit of my touch, as moulding it took me far more than it used to. But the real question is... will I be ready? My friend Pancho wittily asked me if my opponents would be, and I answered him that they were already more than ready about ten years ago. We shall see. All I can say now is that I'm really looking forward to this special celebration.

Hope to see you there

ps tomorrow I'll have a small appetizer, playing touch in Rome

## Tuesday, May 19, 2009

### Ajax and Web 2.0 Programming (with Passion!) Certificate

Another addition to my collection... Mr Sang Shin has just published the Certificates for the Ajax and Web 2.0 Programming (with Passion!) free online course, and mine is one of them.

Now I have a problem, as I'm running out of Sang's courses to follow... By the way, as always, I really want to thank him again for the great work he does for all of us.

Passion!

## Wednesday, May 13, 2009

### Become fluent with fluent interfaces

It's been a while since I first read about fluent interfaces, and of course it's been a while I've been using them too, like every test infected guy.

Yesterday I finally decided to give them a try and implement one for a Builder: implementing a fluent interface is embarassingly easy, as basically all you have to do is create setters that return the builder itself and a method that returns the object you're creating.

To give the simplest example that comes to my mind, if you wanted to create an order you could write someting like
OrderBuilder.createOrder()
.forCustomer(customer)
.with(STEAK, 1)
.with(FRIES, 1)
.with(BEER, 3)
.build();
The builder actual code might look something like this:
public class OrderBuilder {

private final Order order;

private OrderBuilder() {
this.order = new Order();
}

public static OrderBuilder createOrder() {
return new OrderBuilder();
}

public OrderBuilder forCustomer(Customer customer) {
order.setCustomer(customer);
return this;
}

// ...similar setters ...

public Order build() {
// ...maybe perform some validation
return order;
}
}
After playing with my code for a while I discovered that implementing a good fluent interface is not as easy as it might seem at first: you have to carefully think about what you really want to do (program by intention), how to clearly express it, and have your APIs reflect it. Nevertheless I think I'll experiment with them a little, they could be another nice trick in my toolbox.

## Friday, May 8, 2009

### Scrum for non software projects

I have written several times that I normally use Scrum for the manteinance works my house requires, never going down to the nuts and bolts of it. Starting from a discussion initiated from Terry, I finally decided to jot down something.

Sprints are necessarily timeboxed, as every iteration can only be run during weekends. My wife is the Product Owner, and I play the double role of Scrum Master and Team Member (or just team, as I'm practically the only one that gets his hands dirty...).

We have a ever growing product backlog that we (or should I say she) prioritize, extracting the sprint backlog - which is the stuff we plan to do for the weekend at hand. The product backlog includes things like installing the watering system for the garden, hanging pictures and mirrors, cleaning the garage, and so on and so forth.

During the week I, as a SM, try to remove the impediments, e.g. we know we will be needing a wheelbarrow so I have to borrow one. On Saturday and Sunday morning we have the standup meeting (actually it is a sitting meeting, as it happens at breakfast). Then, while she keeps an eye on the kids, I switch role and start working.

Then, tipically on Monday evening, we hold a retrospective.

It works great. And if you think that Scrum is not appropriate because the domain does not implies uncertainity and frequent changes, well, you're wrong as it really does!

## Wednesday, April 22, 2009

### Does a Tomcat ride on a Mustang?

Not always out of the box... on a couple of servers (and, obviously, in the worst time possibile) we experienced the total impossibility to start the Tomcat service (both the 5.5.17 and the 6.0.18) on a Java SE 6, and all we got was a "[2009-04-21 13:59:37] [924 prunsrv.c] [error] Failed creating java C:\Programmi\Java\jdk1.6.0_11\jre\bin\client\jvm.dll" message.

Googleing around, we only found references to endless updates to the Windows registry (no mickey-taking on the OS please... choosing it has never been a choice, bearing it is already hard enough). We were almost beginning to have an axe to grind with people supposed to solve this problem, but as this typically leads nowhere - and a wonderful scapegoating tournament always begins - we chose to stick to Tiger.

Today I stumbled upon a very short post with the solution to our problems: fiendish and hidden as it may seem, there is a dependency on the msvcr71.dll file that does not work properly. We then just copied it in the System32 directory, changed the target JDK with the configurator and everything ran so smooth that I was almost deluded by the utmost simplicity of it.

### Rita Levi-Montalcini blows 100 candles out

It's not enough what I did in the past - there is also the future.

Ho perso un po' la vista, molto l'udito. Alle conferenze non vedo le proiezioni e non sento bene. Ma penso più adesso di quando avevo vent'anni. Il corpo faccia quello che vuole. Io non sono il corpo: io sono la mente.

## Tuesday, April 21, 2009

### Mowing the lawn? pun(s) intended

Here in Italy a funny commercial for chips presented by Rocco Siffredi was (foolishly, IMHO) banned. I can only wonder what would happen to this hilarious spot...

...even if, after all, nobody said anything to Gianluca Grignani...

### Lost Generation

A simple yet very interesting way to deliver an important message

## Monday, April 20, 2009

Rumors about a sale have been heard for a while, but this one comes directly from www.sun.com...

### The miracle of rugby

...is when you bring your four years old child to try and play for the first time with other children and he comes out saying "I've played rugby with my friends".

## Friday, April 17, 2009

### Scrum in Under 10 Minutes

Another nice video on Scrum, particulary focused on backlogs and burndown charts.

Though I would have liked a little more on roles, planning and reviews the video is very clear and practical.

### A Tale of Two Teams

Take a look at this interesting video that compares the traditional waterfall method with the agile approach.

## Thursday, April 16, 2009

### Anybody can have an opinion, right?

Since MS Access is THE best application on the planet, you can right-click your way to happines...

I swear I really read it...

### Back in action

After a couple of idle weeks, due to a motorbike accident, I came back to work. It's so nice to see your peers after such a long time, and everybody gave me a very warm welcome - more or less slight variations on the "and it was about time, you bearded tramp!" theme.

On the subject, I would like to thank the commune of San Donato Milanese for the perfect state in which they hold the streets. I'm sure holes, bumps and gravel have their usefulness. Only it is quite hard to understand what it is, except for tossing motorcyclists off their bike.

## Tuesday, March 31, 2009

### Kill Bill Parody

If you have not seen the Kill Bill movies because you either think they're too long or too bloody, take a look at this and have (almost) the whole story.

## Friday, March 27, 2009

### El Dì del Ghezz

A meeting that simply can't be missed, and I'll do all I can to be part of it (shoulders permitting). More info here.

## Thursday, March 26, 2009

### NetBeans, cvs and unknown files

One of my teammates had some problems with NetBeans and cvs, as even if she checked out all the sources for a project from scratch NetBeans still informed her that some files were unknown to cvs. That was strange, as cvs just provided them all. Everything worked fine on every other computer, and the repository seemed all right.

After some head banging we resolved to check the NetBeans configuration directory, and... tadaaaaa... we found the \$NetBeansVersion/var/cache/cvscache directory, full with nice and likeable binary files. Being aligned with all the rest, we simply emptied the directory and everything worked fine.

More a reminder than a real post ;-)

## Monday, March 23, 2009

### What a breathtaker!

After 61 years Ireland achieved a deserved Grand Slam defeating Wales at the Millenium Stadium. This is also their first victory in the 6 nations, their former victory being in 1985.

During the first half Stephen Jones scored two penalty kicks for Wales, while his teammates put more and more pressure on O'Gara that started to look uneasy, despite the rousing speech he gave to his mates in the morning. When the second leg began Wales only had to score a converted try to win the tournament, but after only a few minutes Irish captain Brian O'Driscoll scored the first try of the day, and Ronan O'Gara added two points to the game-bag putting Ireland on the lead.

Before Wales knew what was happening O'Gara kicked a wonderful ball beyond the Welsh line and Tommy Bowe scored another try. When asked about his try he simply said "it was nice". By the way, Bowe also sang a song during the presentation of the trophy in Dublin... lucky he's a rugby player and not a singer!

Stephen Jones kicked two more very important balls bringing the score to 12-14, with just one kick away from robbing from Ireland their long deserved glory; kick that arrived with just three minutes left to play when Stephen Jones pulled another ace out of his sleeve and scored a drop kick that couldn't give Wales the title but destroyed the Irish dream. With just a minute to play mr drop kick himself Ronan O'Gara reset the score to 17-15, freezing the Millenium Stadium.

As Paddy Wallace recalled later, he "just felt the game had sort of a lack of excitement", so he conceded a penalty from 50 meters. Ronan O'Gara (half?) joking declared that he "was ready to kill Paddy", which at the time was in a "Oh Jesus what have I done" mood.

The kick was short, Jones was torn apart and Ireland gained the Slam.

Later he swapped his jersey for O'Gara's (who hopes to get it back... quite an important keepsake!).

Back in Dublin, where a huge crowd welcomed the whole team, captain Brian O'Driscoll said about the victory "it's been fantastic". When asked how he felt the day after he said "you're not as sore as you would be if you'd lost"... that made me smile, as it reminded me of good old times when rugby was not only something I could write about.

Ireland coach Declan Kidney, who won the Six Nations and the Grand Slam on his first year on the bench, talking about his team said "yesterday it was their day... it was everybody's day, really". Sure it was my day! All rugby lovers should thank both teams for the thrilling match. I hope that Pancho will really bring me that DVD... Some pintes of Guinness should do, as I don't think our pubs have run dry of beer, even if maybe in Dublin they did: Llanelli beating New Zealand was probably a bigger occasion, but Ireland is looking forward to more victories and they would like to get used to it. Or, at least, they hope they won't have wait for another 61 years before the next one!

### England takes back the Calcutta Cup

Despite they conceded too many penalties, as in almost every match of the tournament, despite Chris Paterson ending the tournament with a 100% kicking record, despite losing Ellies for an injury (luckily evertything revealed to be all right) England defeated Scotland 26-12. Scotland did not have much to show, while England gave away all their possibilities for the championship in the first matches.

And, still, they don't have a real kicker. How I miss Wilko! I hope he'll be well soon. There are rumors about him moving to France, but let's wait for him to recover and see.

And, talking about kickers, isn'it strange that Paterson only seemed to kick the "easy" penalties, leaving all the kicks from the distance to is teammate Godman? Maybe he didn't want to spoil his perfect track?

### Another wooden spoon for Italy

France seemed aghast last week, but they recovered pretty soon crushing and crunching Italy 8-50. The first of the seven tries holds Sebastien Chabal's signature: he broke not the first nor the last tackles in the day and scored calmly holding the ball with just one hand (yes, not one arm, one hand).
Some five minutes later Francois Trinh-Duc scored a wonderful try, elegantly sending the Italian defence to a wild-goose chase with a dummy.

Just the time to kick the ball into play and France scored another try. And it went on and on, up to 50 points, only interrupted by a try by Sergio Parisse.

Italy could still compete with England: the former collect wooden spoons as the latter collect sin bins... or at last as they used to, as they seem to have inverted their route.

## Wednesday, March 18, 2009

### England reborn

In a stunning turn of events England forgot everything about sin bins and remembered everything about playing rugby, crushing France 34-10 after an incredible 29-0 after the first half, by which they had by far secured the match despite the two French tries.

It was pretty clear how England wanted to play the match since the very first seconds, when Cueto scored the first try of the series. The total tries count was 5-2, but it does not express the full extent of the English mastery of the match, also due to far too many handling errors by France. Moreover, I think that if Flood had not left the match for a quite monotonous Goods, who tried the same short kick for his wing a hundred times, the blow to the French team would have been heavier.

The real story of the match is told in the overtime minutes, when England were still trying to score another try, while France, as soon as they grabbed possession of the ball, kicked it out only wishing for the showers.

### 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
• 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.

## Tuesday, March 3, 2009

### Greatest try of all times?

I don't know whwther this is THE try, but it surely is something, up to the point to be usually referred to as "that try". The scorer is the great Gareth Edwards, considered one of the best rugby players ever.

And, guys, when I saw the hooker launch the ball with just one hand and the players in the line actually jumping, jumping by themselves without anoyone pulling them up...

### Former rugby players

Let me begin with a disclaimer about the difference between the Italian and English languages; a thing might sound perfect in English and can be plain wrong in Italian and vice versa.

This rant of mine begins with my readings of several Wikipedia entries about rugby players, or better about those indicated as former rugby players.

Now, "former rugby player" means "someone who used to play rugby but doesn't anymore", and that's OK. The problem comes when you read Wikipedia Italian pages, where you too often find people addressed as "ex rugbista", that in the intentions clearly has the same meaning that "former rugby player" has in English.

Now. This might be both a rant and an opinion of mine, but there is not such thing as an "ex rugbista". A "Rugbista" is more, much more than a rugby player - for that we use "giocatore di rugby". The term it is something closer to "a man of rugby". And once you've been one you cannot stop, it's in your skin, it's in your bones. It's as simple as that. It's an illness, an illness from which nobody wants to recover, in spite of all the wounds, the mud, the pain, the strain.

It does not matter which results we achieved. It does not matter when we played our last match. Rugby is what we are. And what we will always be.

### Ireland still on the go

Ireland are only the only team that can go for the Grand Slam, which they've been missing in the last 61 years. Their next clash will be against Scotland in that temple of rugby which is Murrayfield.

The game with England was very hard and it ended 14-13, with England dangerously coming closer within just a couple of minutes from the end of the match thanks to a try scored by the English full back Armitage. Maybe the ghosts of the match with France that last year robbed Ireland from all their hopes for the title came lingering around, but they were banished away by the final whistle.

The only try scored by Ireland has O'Driscoll name, once and again named man of the match.

And, once and again, England piled up their sin bin collection, sending Johnson up in arms: he'd better try and correct this attitude if he wants his team to collect points instead of cards. He insisted with his players that they lost the match because of their ill behaviour and their untrust in their own defence, which, on the opposite, has proved quite tough. Johnson said he still didn't know whether any player would pay for his actions losing his place in the team: should a coach of a football team say the same, at least here in Italy, he'd be considered the real culprit (the scapegoat) and he'd be given the axe within the week, esp. given the stripe of bad results achieved. Just an impression of mine. Luckily no news have been heard about this.

The strangest of things, this time I did not see Stringer play so close to the edge of the rules, in that unnerving manner I so often spot when I see him play. Again, just an impression of mine, but luckily impressions come for free and everyone can have their own.

## Monday, March 2, 2009

### Give me back the 5 nations

With the maximum respect for everyone, but... what's the point, beyond economics? Italy won just 2 out of the last 13 matches, and last Saturday clash was not one of the lucky ones, being outclassed by Scotland 26-6. OK, Scotland did not play a wonderful rugby, but they played rugby. On the other hand, someone else has seen too many matches with Zinzan Brooke. The match really had a bitter taste... even more if we consider the fact that the clash against Scotland was considered the only one that Italy could actually win. How much time shall pass before someone will start keeping Italy at arm's length? Quite a long time, if we only look at the ticket sales. But how many people will still want to go to see such matches?

Well at least there was a very good reason to be there: all the stadium sang the anthem without any instrument supporting voices, and it was really thrilling.

### Another back-to-back Grand Slam missed

That's sad for Welsh supporters... and I did not even see but the last few minutes of the match!

## Friday, February 27, 2009

### DW-BI and agile

Kaushal Karnad asked on LinkedIn whether DW/BI projects can be run in an agile manner, as he points out that outputs are mostly reports and extracts and continuous integration would be an issue, having to move data across various DW layers every now and then.

Of course they are! DW/BI projects are, by their nature, to be run in incremental and iterative mode, as the risk associated with a full blown solution is way too high, even more that in traditional software development because of all the non-technical issues related to them. The best approach is to start from the core part of the business, which has the highest priority, and iteratively add new areas and refine what has been released so far, always trying to maximize the value for the customer. And that sounds like agile.

Outputs might be "only" reports and extracts, but what is important is the way you figure out the data and the paths you follow during your analysys: the more you use the system, the more you might feel the need to link apparently unrelated data to gain a deeper understanding of what you're delving into, thus requesting something more (or something different) iteration after iteration: not only new reports, but also new combinations and possibile paths. That sounds like agile too.

Continuous integration is normally about code, not about data, so maybe this is a false problem; anyway, the frequency of updates strongly depends on the real needs of the knowledge workers and often one update a day will suffice.

## Monday, February 23, 2009

### Agile Manifesto

I can't believe I have waited for so long... better late than never, I'm one of the signatories of the Agile Manifesto.

## Wednesday, February 18, 2009

### Another hard lesson for Italy

As predictable, Ireland showed no mercy for Italy, punishing them whenever they gave them an occasion - and Italy gave more than one. Maybe the final 9-38 is a bit too heavy, but Ireland was way better than Italy, except for the first 30 minutes in which the Azzurri managed to hold the field, thanks to a better organized scrum (this time they had a proper scrum half). In the remaining time Italy showed the will to produce good rugby, but, alas, they did not produce good rugby, never really worrying the Irish team which in turn scored five tries, two of them in the very last minutes, increasing their already remarkable advantage.

Ireland are thus sailing to their objective, while Italy is still making for the wooden spoon. Somebody has already started wondering whether they really belong in the tournament, reminding that economical reasons played a strong role in their admittance. Will they be given the axe?

By the way, I am really proud to say that I have a wooden spoon myself: my friend and teammate Paolo Ragusi gave it to me after our dreadful season against the best teams in Italy when we were both seventeen. We lost each and every match, so I really deserved it!

### Debt Metaphor

Ward Cunningham talks about the Debt Metaphor. As he is the one who started using it, it is supposed he knows what he's talking about...

## Monday, February 16, 2009

### Another grand slam?

Wales are paving the road for their second consecutive Grand Slam, something they have been chasing in the last 100 years; the Dragons defeated England 23-15 at the beautiful Millenium Stadium (even if my heart still dwells in Arms Park). The game was not the one-way clash most people were expecting, but it was well fought and quite enjoyable.

Unluckily for England this time Stephen Jones wore his right shoe on his right foot (and the left shoe on the left foot) and he booted 18 points for Wales, leading them to victory even if England scored two tries against the single one realized by young Halfpenny - who also booted a penaty.

It should be obvious by now that England have some problems with the rules, and it is costing them an arm and a leg. Moreover, Martin Johnson does not seem fit to make them turn about: besides, when a coach, instead of focusing on correct play, has the players train with just fourteen men on the field just in case of a sin bin, well, you start asking yourself a couple of questions.

### France beats Scotland

But unfortunately I wasn't able to see the match... 22-13 the final result, one try on each side... not exactly the outcome I was hoping for :-(

## Friday, February 13, 2009

The Tecnica del Pomodoro Yahoo Group went English and moved to Google Groups, precisely here. The old group will be terminated within a week.

And... did I mention the fact that I'm the first poster if we don't consider the group creator?

### The pomodoro technique

Francesco Cirillo finally published the English version of his famous paper; you can find it here.

Stay connected for the team version! I'm looking forward to it because we tried different techniques here but still are longing for some best practices to improve the way we apply them.

### I can't believe you haven't read it yet!

"Here, take it! you MUST read it" - "Well... it's yours, maybe it's better if you read it" - "No, no, it's all right, I've STUDIED it already... more than once!" - "OK then, I'll take it and give it a look..."

That's how I gave one of our directors my copy of Peopleware... let's hope to spread the infection! Too often there are grey areas in matters concerning people in offices...

## Thursday, February 12, 2009

### Wales still the team to beat

After beating Scotland 26-13, with a try count of 4-1, Wales is putting forward all the assumptions for another great tournament. Scotland managed to hold the Welsh for the first 25 minutes, but the end of the first half reported a quite heavy 16-3.

Cross tackling Byrne while the latter was in the air to catch the ball was a good demonstration of why air tackles are no longer allowed; the rule was introduced to protect the jumpers, but this time the worst time was passed by the tackler, who was severely blown by a knee on the head. Beyond the normal recovery time Cross got another ten minutes to recover due to the sin bin subsequent the dangerous tackle.

That was probably the start of the end for Scotland, that could no longer hinder the Dragons whose backs really ravaged, with Shanklin breaking the ice with the first try of the day, followed by the ones scored by Alun Wyn Jones, the rookie Halfpenny and the unfailing and ubiquitous Shane Williams.

A try in the last 10 minutes was all the Scots could scrape together, which is something if you consider the fact that Wales only conceded two tries in last year tournament.

England is now hoping not to be skinned alive next week (maybe Stephen Jones will wear his banana shoes again...)

## Tuesday, February 10, 2009

### O'Driscoll alive and kicking

Saturday's match against France showed everyboy that Brian O'Driscoll is back, and he's back to stay, despite what his detractors might have said. And, talking about detractors, I heard people say that Sebastien Chabal was just a bag of fat walking around... well I think that everybody saw that he's not, even if I liked him better as a flanker than as a lock.

Declan Kidney's first appearance in the RBS Six Nations as a head coach was a great victory, and Ireland played a very good rugby. France did not let them loose, even if they did not capitalize everything they produced, and the result was a very enjoyable game, with Jamie Heaslip, Brian O’Driscoll and Gordon D’Arcy scoring three wonderful tries that let Ireland win 30-21 over France, which is something that had not happened in quite a while.

The Irish are keeping their feet on the ground - Kidney will care for that - but people are starting to wonder wheter this could be the right year, maybe playing for the Grand Slam against Wales on the last day of the tournament.

## Monday, February 9, 2009

### Italy steamrolled by England

Having an English friend is wonderful (even if maybe you don't call him as much as you should... Hi James!). Sometimes, though, it is a horrible thing, as it exposes you to all kinds of mockery. Saturday was one of these times, even if, at least up to now, I have been spared the mocking. So much time seems to have passed since last year's match...

Due to a certain lack of scrum halves, Nick Mallet tried the Mauro Bergamasco trick and lined him up as number nine. I think Mauro is a very good player. When he plays as a flanker. Saturday's experiment was a complete disaster - and this to compete in the euphemistical contest. The official RBS Six Nations mercilessly reported that "Italy’s one-dimensional attack was not at all difficult to read with Bergamasco at scrum-half". Welsh icon Jonathan Davies said Mauro's match was one of the worst ones in history for an international player. Mallet admitted his error, so we'll see Paul Griffen back in action.

The transition from the two roles is not easy, and I know what I'm talking about because I did it myself in my youth in the west that is forgotten (it was 1988), when Santa (not Santa Claus, but Andrea Santamaria, our great coach at the time) first lined me as a scrum half against Calvisano (and a few of our opponents might as well have been in the team that won the italian title last year): we gained a beautiful victory, so from that day on we practically played with three flankers and a number eight. But this is a different story...

To save the day, I liked the try scored by Mirko Bergamasco, but the game, which ended 36-11 with England scoring 5 tries, was quite dull, even if I have to admit I haven't followed it with all my attention - sad but true, it did not deserve it - and I had something else on my mind.

Don't ask. The picture is more than a smell of a scent.

And I'm still longing for Jonny Wilkinson.

## Friday, February 6, 2009

### How to search for images of a specific size

Looking for some small images to test the FisheyeList dojo widget I discovered that you can google for images of a specific size just adding imagesize:widthxheight to your keyword, e.g. homer simpson imagesize:90x90

## Thursday, February 5, 2009

### The three most important things in IT

Backup, backup and backup. If you're not persuaded, ask one of our customers who happily stopped performing regular backups last May (the 23rd, to put the dots on the "i"s). A couple of days ago their hard disk went F.U.B.A.R. and their data vanished into thin air. Think twice before you say "I'll backup it tomorrow".

No hints on F.U.B.A.R.? Don't worry, not even Ray Tango knew what it meant. You can always ask Gabriel Cash fore more info.
I wonder why every programming example uses "foo" and "bar"...

## Monday, February 2, 2009

### Pittsburgh Steelers win Superbowl LXIII

The Steelers defeated the Arizona Cardinals 27-23, bringing home their sixth title. In the halftime performance Bruce Springsteen, with the E-Street Band, showed once again why he's The Boss.

### How to impose a timeout in JUnit tests

Ever had the need to check if a method is taking too long to complete? You can follow the instinctive path, get the System.currentTimeMillis() before and after the execution of the method and assert their difference is smaller than the acceptable value.

Or... you can save time and rely on JUnit to stop the test thread and fail the test (a TimeoutException is thrown), simply passing the desired timeout value to the @Test annotation:
@Test(timeout=1000)
public void testWithTimeout() {
...
}

### Agile Day - Result Day

During the fifth Italian Agile Day, held last November, I missed the Retrospective for the Italian Agile Community, but I read everything about it in the following days. The community proposed a "result day" in which we would share our experiences and verify our progresses since the agile day, to check whether we're really improving or are in a "one step up and two step back" situation. Gladly accepting the invitation, these are my comments.

A small foreword is due for better to grasp what's behind the result: some of our customers belong in a very politicized niche, and (also) for this reason they say they absolutely need to know in advance exactly what they will get, when they will get it and how much it will cost. Ok, this is almost true for non political organizations too. Anyway, except for small projects, this normally forces us to rate the analysis and give a guesstimate for the software, which will be specified and formalized at the end of the analysis phase.

In the last few months I have been involved, amongst other things, in an assessment project for one of our customers: they need a software and they need it quickly, and we offered them a solution.

Our proposal has a paragraph that explains how we will build the software. It expressely says that the system will be realized in an iterative and incremental way. It says that the estimates are based on user stories (which we verified with their IT manager - our Product Owner, I daresay - who in turn has checked them with his colleagues). It says that the customer will prioritize stories. It says that the project will be divided in 30 days iterations called sprints, and that it will be monitored using a product backlog, many sprint backlogs, burndown charts and running tested features charts. Most of all, it says that the system will be validated by automated acceptance tests.

Well, this is my result: it may be small, but I am really proud of it because it might be a turning point from just being "agile inside" to spreading the agile way of thinking amongst customers and their managers.

I must admit that the fact our customers cannot afford the time requested by a traditional waterfall process made my task easier, but that does not touch me particularly; on the contrary, just the fact that everybody agreed upon the fact that the waterfall process is a longer and more expensive one and that an agile process is needed (we never mentioned it, but you've already figured out we're talking about Scrum) is more than enough...

Many other posts for the result day can be found on the Italian Agile Movement forum page on the subject.