Friday, April 23, 2010

Some hints from a Scrum Master

We've seen and read things like this a thousand times, but it is always worth repeating them: take a look at this post and you'll get some valuable suggestions. While you're there, you'll also want to check other Alex's posts.

Saturday, April 17, 2010

Joda Time vs java.sql.Date

As Naked Objects does not (yet) support the Joda Time library, I'm using plain old java.sql.Date to model dates in a prototype I'm working on. I'm not used to it anymore, and that's awful. As an example, let's suppose we have to create an entity with two Date properties, say creationDate and dueDate: the former is asked to the Clock class from the app library, and the latter is derived adding two working days to the former one. For the sake of simplicity, let's only consider adding two days, regardless of the fact that they are working days or not (you always can take it as an exercise).

Calendar cal = Clock.getTimeAsCalendar();
Date creationDate = new Date(cal.getTimeInMillis());
cal.add(Calendar.DAY_OF_MONTH, 1);
Date dueDate = new Date(cal.getTimeInMillis());

Now, with Joda Time I would just write

LocalDate creationDate = new LocalDate(Clock.getTime());
LocalDate dueDate = creationDate.plusDays(2);

Does it compare to the traditional Date and Calendar approach? I think it doesn't...Moreover, should Joda Time be supported, we could also ask for a factory method:

LocalDate creationDate = Clock.getLocalDate;

Wednesday, April 14, 2010

Way to go waterfall!

Despite being an advocate of agile methods, I have to admit that waterfall can yield spectacular results...

(First seen in the xpug-milano mailing list, thanks to Giulio Cesare)

Tuesday, April 13, 2010

The infection is spreading

Today, while commuting, I saw a guy just in front of me reading Scrum and XP from the trenches, which I had the pleasure to read in 2008. I spotted it from the Crisp logo... does that officially make me a geek? or maybe just a nerd?

Be that as it may, I hope many more will follow the example and read it.

Monday, April 12, 2010

A classical oxymoron

Today, while checking the profile of the poster of an article in one of the mailing lists I read, I stumbled upon a job offer from the company he works for. The position requires a master degree, but no prior experience. That sounds fine.

At least until you double check it against the other requirements:
  • Advanced architecture / technology knowledge
  • Excellent problem-solving and communication skills
  • Customer orientation
Doesn't it clash a little?

Friday, April 9, 2010

A better programmer?

After writing about it a couple of years ago recently I took the BetterProgrammer test.

It turned out I am not so bad, even if I'm sure there's plenty of room to improve my skills, mostly because the tests also track the time it takes you to submit the solutions; I'm pretty sure my answers were correct, as for each task I produced almost all the unit tests I could think of (before I actually produced my code, that's obvious).

The tests were very interesting and can be used as katas; some of them could also be resolved by brute force, but some knowledge of maths and combinatorics surely helped me a lot in writing faster and more elegant solutions (it hasn't given me a penny yet, but it turns out that getting a University degree with full marks has yielded some results after all).

You can check your results against mine here.

Saturday, April 3, 2010

A faster start for your Naked Objects app

After discovering how to generate a Naked Object application in NetBeans with Maven I played with my freshly created project a little, as the way I suggested to start the application seemed to me quite slow.

After some investigation I managed to start the application in almost the same way I used to start the application built with Ant. Actually it's quite easy, once you get used to it. All you have to do is set the Run properties as follows:

The tricky part is that you have to set them for the Command Line project and not for the main one...

At this point, if you want to have an even faster start (by which I mean an easier one) you can set the Command Line project as main and then just press the F6 key.