Archive for January, 2005

Hibernate Review

Hibernate logo

Even though some vehemently disagree, it is my firmly held opinion that Object/Relational Mapping (ORM for short) is a powerful weapon in the arsenal of any entrerprise developer working with an Object-Oiented language. Should you decide to take the plunge and use a full-featured ORM tool for your next project, after you have done some research, it will be evident that there is a great deal to choose from, even if you limit yourself to Open Source, Java libraries. Everybody seems to have rather strong opinions on the matter. The only point on which you will find agreement from most parties is that EJB sucks, but that’s another story.

I won’t try to convince you that Hibernate is the best solution, mostly because I have almost no hands-on experience with JDO, OBJ or other similar tools. What I have to share is a two year long, mostly positive, experience with Hibernate, having developed a dozen or more projects with it.

What’s so good about Hibernate?

  • Non-intrusive, almost completely transparent, persistence for Plain Old Java Objects (POJOs). In short, you don’t have to extend Hibernate-specific interfaces in order to make an object persitent and you don’t have to obey unnatural rules (like “no inheritance”). You can use plain object references and Java2 collections to express relationships and you can map rather complex cases, including class hiearchies, with Hibernate.
  • No need for pre- or post-processing of source- or byte-code. This means a simpler tool chain and quicker edit-compile-deploy cycle.
  • Good tooling, although it might be better.
  • Good docs. Plus, there are lots of books dealing with Hibernate. I reviewed one of the best here.
  • Very robust, bug-free and performant code.
  • Caching.
  • A very good query language (HQL), with the option of falling back to SQL when you need it.
  • Much more…

What’s not so good about Hibernate?

Well, the only real gripe I have with it is probably the fact that, for all practical purposes, Hibernate is owned by JBoss. Not that I have anything against Mr. Fleury’s gang, but given JBoss’s revenue model (support and services), it might come as no surprise that suppport is relegated to a forum (I would prefer a mailing list, but that’s just me) and responses from the development team tend to be just a little bit terse, at times.

On the other hand, this is perfectly legit. If you want pro-level support, even with an Open Source project, you should be prepared to pay for it.

All in all, I give Hibernate 5 stars (out of 5). Highly recommended!

Re: Applying for a Java job - HOWTO

I'm sure I would have no problem matching most of
the criteria Mike lays down as prerequisites for getting a job at Atlassian. I have a decent grasp of English language, relevant experience, have contributed to a few open source projects and keep a blog. I am a JIRA user too.

Only problem, I am not available for an interview in Sidney :(. For locations nearer to home (Italy), my resume is available here. It's PDF, but not written in pink ;).

The New PowerBooks

The new PowerBooks are out! No G5 yet, of course, just a speed bump and some other small enhancements, in any case an upgrade might be desirable.

Moleskinerie

Since I got my first Moleskine notebook, I've been using it more and more. I'm keeping all my to-do lists there and it's starting to become second nature to me.

Today (via Ted Neward) I discovered the Moleskinerie blog and immediately subscribed to it. Nice.

Why Jotspot?

Gianugo:

I’m uncomfortable, though, with a site aiming to be a reference for Open Source projects yet probably running on non-OpenSource software: isn’t there enough dogfood available?

Well, for one thing, Jotspot seems to have a range of features (think of structured data) that other wikis lack.

Second, my time is limited and I very much value having an hosted service that is ready to use. This is why I simply started by writing a review on this blog. I don’t want to start a new software development project and be dragged down by bike-shed type of arguments.

Third, I think having open data is more important than having open source, for this kind of endeavour.

In any case, nothing has been set in stone. I’m just going to take Jotspot for a ride for a couple of weeks and see whether it fits the bill or not.

New domain for Source.zone

Source.zone logoI’ve just registered and activated a new domain for the Source.zone initiative: sourcezone.info. I’ve put there a temporary home page while I’m waiting for the activation of a beta Jotspot account in order to start creating and organizing content and services.

As you can see, I’m dead serious about this stuff and would like to renew my call for contributions. What we badly need to start is content, essentially reviews of Open Source projects.

The Scoble Effect

This is what you get when a prominent blogger like Scoble links to you, then News.com links to both Scoble and you and finally Dave Winer links to News.com linking to you:

graph_daily_summary.png

Nice. Now if only I could get such inbound links to content more interesting than making fun of Microsoft, that would be great :).

1,000

Congratulations to the visitor from Etobicoke, Ontario, Canada, who hit this weblog at 22:50:46 CET. You are the 1,000th visitor today!

What Software for Source.zone?

I just started to think about building something to support Source.zone. There are basically two options: build or buy?

Should I decide to build, I could hack together quickly a webapp using my power trio (Cocoon, Spring and Hibernate), but then I'd have to maintain it in my spare time, and I would need to find some (cheap) hosting provider with the necessary support.

On the “buy” side, I currently see two candidates:

Confluence
Looks great and being Java-based and provided with full source code, could be hacked into doing just what we need. But then again I would have to find the time to hack it and a place to host it.
Jotspot
No source, but from its feature list it looks like a perfect fit. And it's a hosted service, which is great since we can have it up and running in no time.

For a start, I've requested a beta account on Jotspot. If you have any suggestions, please leave a comment.

Apache Cocoon Review

Apache Cocoon Logo

Apache Cocoon is a web development framework built around the concepts of separation of concerns (making sure people can interact and collaborate on a project, without stepping on each other toes) and component-based web development.


Cocoon implements these concepts around the notion of “component pipelines”, each component on the pipeline specializing on a particular operation. This makes it possible to use a “building block” approach for web solutions, hooking together components into pipelines without any required programming.


Cocoon is “web glue for your web application development needs”. It is a glue that keeps concerns separate and allows parallel evolution of the two sides, improving development pace and reducing the chance of conflicts.

The website explains quite nicely what you can expect from Cocoon,doesn't it? The problem is that, on the other hand, it does a lousy job of explaining in clear and comprehensive terms how you are expected to work in order to reap all those benefits.

As we all know, great documentation is not a selling point of many Open Source projects, and Cocoon is not different in this respect. Add to it the fact that it is a complex, evolving framework that sometimes gives you too many options when you have to implement something, and you'll begin to understand why the docs, to put it bluntly, largely suck.

Alas, all is not lost. You have a users' mailing list for you beginner's questions and a developers' mailing list where you can discuss Cocoon internals and more esoteric issues. You can expect to find a quick and detailed response on either. Even beginner-level requests for support are not shunned on the dev list, as is the case with some other projects I know of.

Other valuable resources are books (a bit outdated though) and articles that you can find online.

Also, if your pockets are deep enough, you can hire very good consultants to hold your hand while you're dipping your toes in the water for the first time.

To sum it up, don't be put off if at first you're having some difficulties. With a good knowledge of Java and XML, and maybe some external help, you can surpass them quickly.

Well, enough about lack of docs and on to the good stuff.

I started using Cocoon back in the days of version 1.7 (1999 circa) and never stopped. I have developed maybe twenty projects with it and done my small share of contributions, in the spirit of Open Source, that gained me committer status back in 2003, of which I'm very proud.

There are lots of gems in Cocoon, but I would like to draw your attention to a couple of them, in particular: Forms and Flowscript.

The Cocoon Forms framework is one of the more elegant toolkits for doing web-based forms that you can find. It embodies perfectly the Separation of Concerns philosophy of Cocoon, allowing one to separately define form model, definition and appearance.

Continuations-based Flowscript is something that will really revolutionize the way you develop web applications. Without it, implementing complex control flows for the web is a daunting task, forcing you to implement finite state machines and tricks like hidden form fields in order to overcome the inherent statelessness of HTTP. I cannot explain the concept of continuations in this review, but I can assure you that once you get the hang of it, you will never ever want to come back. For an in-depth look, I can refer you to a recent article on developerWorks.

The other great thing about Cocoon is not in the code. It's the community. You won't easily find a community of developers that is like Cocoon's. The best way to appreciate it is to participate in the annual GetTogether event.

Now for some less enthusiastic notes. What I like less about Cocoon is the fact that it's based on the Apache Avalon framework. Avalon was one of the first examples of a framework based on Inversion of Control, and was great for its time, but nowadays it looks quite dated if you compare it to something more modern and less invasive, like Spring or Hivemind.

Should you be worried about this? Not at all. First, you're not supposed to be an Avalon expert to use Cocoon. You can develop a wide range of applications without ever implementing a custom Avalon component. Personally, I like to develop applications by implementing all my business logic with Spring and persistence with Hibernate, using Cocoon's Flowscript to take care of, roughly, the controller part of the MVC triad, and Cocoon's generators, transformers and serializers to implement the view part.

In conclusion, I cannot give Cocoon less than five stars, given how much it has helped me in the latest years. It has its shortcomings, but who hasn't, and you can see them as part of its overall philosophy. There's a Cocoon Way of doing things, and you can bend it, but to a point.

Highly recommended.

Why Your Pointy Haired Boss Is A Mathematical Certainty

Why Your Pointy Haired Boss Is A Mathematical Certainty :: MarkTAW.com: “And now you know why your pointy haired boss is an almost mathematical certainty. It's an attractive, well-paying job, that doesn't seem to be too discriminating about who gets hired.”

Welcome to Source.zone

Source.zone logoHow many Open Source projects can you name? A handful? Maybe ten or twenty at
the most. Those are the Open Source projects most people know because they have
a high visibility and receive widespread publicity.
But there are thousands and thousands of Open Source projects on the tail end.

– Matthew Langham, The
Long Tail of Open Source
.

If you are a developer looking for an Open Source library, framework or toolkit which
might help you with your current project, there is probably something out there that
fits your needs, if only you could find it.

Sure, there are some places like Freshmeat or SourceForge, that list a large
number of products. The problem is that sometimes it’s hard to separate the
wheat from the chaff, to see which projects are alive rather than dormant
or dead; which ones have a diverse, thriving community behind and which ones are
basically one-man-jobs; which ones grew from real needs and which ones are simply
abandonware products that some company decided to opensource rather than
bury at the end of their lives.


The problem is that it’s currently hard to find the correct project that suits
your needs. But really that’s only because someone hasn’t come up with the Amazon
type storefront and built that in front of the repositories, so you can search and
find the project you may need. And even if the project is run by someone on a
remote island on his own - who cares - it might be exactly what you were looking
for to build that particular solution someone really needs.

Source.zone’s aim is to create a storefront for access to
Open Source projects. The storefront will have the same level of participation
that users give back to Amazon or iTunes by providing their personal feedback
in form of reviews, ratings, comments, developers who liked this project
also liked this other one
.

Initially, Source.zone will just be a category on this weblog, where I will post some reviews of the projects I know and like better. In the meantime, I will either develop some collaboration code or see if we can use an existing solution (Confluence comes to mind).

If you want to contribute, please leave a comment here or drop me a note.

Creating a Favicon

This weblog now sports a brand new favicon, instead of the default one provided by blojsom, thanks to this page.

Thanks also to Alex for the tip.

Linkedin

Today it's been a busy day. Woke up at 5.30AM, boarded a plane, had two meetings, took a plane back and made it home at 7.30PM, so I'm going to bed early but didn't want to let one day pass without a blog post, even though I haven't got much to say.

At home, I found about 120 new items in my aggregator and a couple hundred unread mail messages, some of them responses to requests for contact I made on Linkedin, which I signed up for just yesterday. I hope to have something more to say on the subject tomorrow.

How to check pagerank

If you want to know the Google PageRank of the sites you visit and prefer - as anybody should - Firefox over Internet Explod^Hrer, you should definitely install the pagerankstatus plugin.

Hat tip to Stefano.

Catastrophism? Bah!

I'm sure many people will be scared to death reading this:


Climate change: report warns point of no return may be reached in 10 years, leading to droughts, agricultural failure and water shortages. […]


The countdown to climate-change catastrophe is spelt out by a task force of senior politicians, business leaders and academics from around the world - and it is remarkably brief. In as little as 10 years, or even less, their report indicates, the point of no return with global warming may have been reached. […]


“There is an ecological timebomb ticking away,” said Stephen Byers, the former transport secretary, who co-chaired the task force that produced the report with the US Republican senator Olympia Snowe. It was assembled by the Institute for Public Policy Research in the UK, the Centre for American Progress in the US, and The Australia Institute.The group's chief scientific adviser is Dr Rakendra Pachauri, chairman of the UN's Intergovernmental Panel on Climate Change.

Well, bullshit! Since when do “politicians, business leaders” have any clue regarding climate change? As for “academics”, sorry but a UN bureaucrat, even if he/she has a Ph.D, does not qualify as a reliable source in my book.

Now, I'm not saying we shouldn't be worried about global warming, but before you start making plans for a new air conditioner, some words of wisdom are in order:


We must daily decide whether the threats we face are real, whether the solutions we are offered will do any good, whether the problems we're told exist are in fact real problems, or non-problems. […]


And so it is, sadly, with environmentalism. Increasingly it seems facts aren't necessary, because the tenets of environmentalism are all about belief. It's about whether you are going to be a sinner, or saved. Whether you are going to be one of the people on the side of salvation, or on the side of doom. Whether you are going to be one of us, or one of them. […]


I can tell you that the evidence for global warming is far weaker than its proponents would ever admit. I can tell you the percentage the US land area that is taken by urbanization, including cities and roads, is 5%. I can tell you that the Sahara desert is shrinking, and the total ice of Antarctica is increasing. I can tell you that a blue-ribbon panel in Science magazine concluded that there is no known technology that will enable us to halt the rise of carbon dioxide in the 21st century. Not wind, not solar, not even nuclear. The panel concluded a totally new technology-like nuclear fusion-was necessary, otherwise nothing could be done and in the meantime all efforts would be a waste of time. They said that when the UN IPCC reports stated alternative technologies existed that could control greenhouse gases, the UN was wrong. [Emphasis mine]

See? The UN was wrong. And it's not just the UN, but most self-appointed futurologists are wrong, most of the time.

Now, I'm not saying that we should be totally oblivious and irrespectful of the environment. After all, I wouldn't shit on my carpet. What I'm saying, together with Crichton, is that public policy decisions shouldn't be based on unfounded, dogmatic catastrophism.

Getting Things Done

In the spirit of
Getting Things Done, I decided to follow Mark Taw’s advice: “Write Everything Down. In One Notebook.”


I keep a list of everything I need to do, along with any relevant notes. Any time I get a phone call, or my boss requests something, it goes in the notebook. Any time I notice something that needs to be done, it goes in the notebook.

So, I got myself a nice, litte Moleskine squared notebook. I hope this will help me being more productive, but so far it just set me back 9 Euros, which is quite a ripoff.

Notebook and pen

Descartes and Heisenberg


Descartes and Heisenberg walk into a bar and order drinks. After they empty their glasses, the bartender comes over and asks them if they would like another round. Descartes ponders this for a moment and replies 'I think not' — then POOF! disappears.


The bartender, obviously shocked, turns to Heisenberg and says 'Did you see that???'


Heisenberg pauses to consider, then replies 'I'm uncertain.'

[Via Kevin Schofield.]

Sourcezon: catching the long tail of Open Source

I think Matthew hits the nail on the head here:


A first step - when applying this to Open Source would be to create a similar storefront for the access to Open Source projects. Sourceforge is already part of that storefront, but it doesn't include any of the projects under the Apache umbrella or in the other Open Source repositories. The unified “storefront” would also need to have the same level of participation that users give back to Amazon or iTunes by providing their personal feedback in form of wishlists, comments, playlists etc. “Readers who bought this book also bought that book”.

I was thinking about this (having been inspired by Matthew's previous post on the same subject) while biking to and from home at lunch break. The thoughts I was having resonate very closely with Matthew's. What SourceForge and Freshmeat are lacking is much of the social, community aspects that make Amazon so effective: reviews, ratings and lists, indeed. Well, they have some of that, but it's underutilized.

SourceForge's aim, of course, is not to be a comprehensive catalog of Open Source Software, but Freshmeat's is. My problem with Freshmeat is that it has a very wide but shallow coverage. Too wide for my tastes, actually. I am a developer and I'm looking for developer tools, particularly for Java, but if I go to Freshmeat looking for reviews and comments about Cocoon, Spring or Hibernate I can find almost none, even though they are very popular projects. Nothing there can help me decide whether they can be good for my business.

I'm starting to think that it does not take much to start doing something to remedy this situation. We might develop a web application and call it Sourcezon.com, the Amazon.com of Open Source. It will, at least initially, be targeted at the main users of OSS, that is other developers. No kids looking for the latest P2P app that will enable them to exchange Britney Spears videos ;). Here is a preliminary list of features and peculiar characteristics:

  • As already mentioned: reviews, collaborative ratings, “also-bought”, etc.
  • Uses tags to categorize projects.
  • Hooks into the blogosphere, both as a producer and as a consumer of RSS feeds.
  • Taps into the network of webservices, like those provided by Amazon and Google.
  • Anything else?

What could be the business model of this service? Maybe it could be supported by ads. Or it might be sponsored by companies that want to promote their OSS projects. There are plenty of those at the moment.

OK, enough food fot thought already, I have a daytime job to take care of, now :(.

End of Life for PowerBooks?

Take this with a grain of salt, but if the current PowerBooks have been EOLed, new models must be coming very soon. Will they be G5-based? I hope so, but won't hold my breath. In any case, I'm eligible for an upgrade of my loaned 15″ at the same conditions (zero down payment and zero interest) and with the problems I'm currently having (weak cover latch and PMU-related lockups), plus wanting more than 512MB of memory, I would certainly upgrade to a new model, even if it's only a faster G4.