Archive for March, 2006

The Language Arms Race

Monday, March 13th, 2006

It seems at the moment that there is an arms race on with language specifications. I’m particularly referring to Java and C# but there are languages pushing them (the spec leads) on to include more and more language features. C# is introducing a raft of new features in C# 3.0, this is old news and the fact that Java introduced a set new features in J2SE 5.0 is even older news. I don’t think anyone would disagree that Java is behind on this race and it was really only the emergence of features such as autoboxing and generics in C# that push the guys at Sun to introduce these features in Java.

Now there is even more momentum to introduce even more language features to Java, things such as closures. Now from a selfish point of view I would love closures and many more features in the language when I’m coding. This is because I have been writing code now for almost 10 years and coding Java for about 8 years, plus working with other languages that have these features (Ruby, Python and even Perl) and so more features doesn’t pose much of a learning curve to me. However what it will do is make Java more inaccessible to people new to coding. It will also introduce more ways to do one things which for a commercial power house and main stay language is almost certainly a bad thing.

I have dealt with many code bases produced by inexperience or misguided developers throughout my career and one thing that has saved these code bases from unmitigated disaster is the fact that there is only a few ways for achieving things in Java. It keeps the developer under control, stops them straying too far from the path. Also for those who are experienced developers the simplicity and lack of features is also a good thing. A concept (program) based upon a few simple rules (features) is often more elegant than one based on many complex ones. I think studying mathematics has given me an appreciation of the beauty in keeping things simple and this principle apply just as well to coding and language specifications.

I’m, after intial hesitation, now keen to add scripting support to Java, this will hopefully stem the tide of additions to the Java language features and keep it clean. Obviously the use of these languages will need to be governed correctly to ensure projects don’t turn into the tower of babel but in the end I think the Java platform if not the language will be a richer technology.

Oh and C# can add what they want because I’ll be able to code in JRuby which is nice ;)

Ivy Dependency Management

Thursday, March 2nd, 2006

Came across Ivy recently, which seems to have complete slipped under my radar until now. Ivy is an incredibly configurable dependency management tool. Now hold on it’s not one of these stupid head in the clouds tools it is an actual practical tool for managing extremely complex sets of dependencies.

It hooks in with ant or runs standalone and allows the declarative statement of your Java (or anything else actually, Ruby, .NET, C++ whatever) dependencies. It resolves these dependencies from repositories that could be on your local machine, in a subversion repository or even in one of the main Maven repositories.

So why is this tool better than Maven? Well it comes from the old Unix school of thought, do one thing well. It does dependency management extremely well and it doesn’t worry about anything else. The other stuff is left to applications better suited to that job (mostly ant actually). It can be used straight out of the box for modest requirements or configured to totally custom and/or complex requirements. [TBH I really don’t like Maven2 it’s: poorly documented, lacks flexibility and it’s just too much work to get going properly.]

Ivy also does a nice graphs for your dependencies along with HTML reports which help plan new releases of your dependent projects.

It’s documentation could be a little better but hey you can’t have everything.