Thu, 02 Jul 2009

EuroPython 2009

Both my presentations at EuroPython 2009 went well. At least I think so. I have uploaded the slides: GIL isn't Evil, and SCons the Builder

Tue, 19 May 2009

Looking forward to EuroPython

My two proposals for presentations got accepted for EuroPython:

EuroPython 2009 is being held from 28th June to 4th July 2009 in Birmingham, United Kingdom.

The currently accepted talk abstracts are now up at http://www.europython.eu/talks/talk_abstracts/

The booking form is here http://www.europython.eu/registration/

The early bird rate closes on Thursday May 21st.

Sat, 16 May 2009

New Laptop

It has been time for a while now that I got a new laptop or two (I always take two laptops with me when I go to client sites or conferences, so as to avoid embarassment if one fails to work). Until now I have always had two Ubuntu laptops. I decided that now was the time to go heterogeneous, so I got a second-hand white MacBook running Mac OS X Leopard to act as my number 2 machine. I really like MacBook hardware, it looks beautiful and the keyboards are superb to use. However I still prefer Ubuntu over Mac OS X.

For my number 1 machine I decided to get a high-performance laptop with a high-resolution screen. Having looked far and wide, including at Dell who claim to sell high-performance Ubuntu machines in the UK but actually they don't, and indeed at various US companies claiming to import Ubuntu machines to the UK, I settled on Linux Emporium as the supplier, and the Lenovo T500 with Ubuntu 9.04 pre-installed as the machine.

Order placed Tuesday morning, laptop arrived Friday morning, exactly as predicted by the folk at Linux Emporium. Having spent a day personalizing and integrating it into my set-up, I really like it. Thanks to John and the others at Linux Emporium for getting exactly the machine I needed to me in the time I needed it.

Fri, 08 May 2009

Groovy Presentation

On 2009-04-14, I gave a talk to the London Java Community introducing Groovy. Skills Matter videod the event. The LJC page for the event has various photos and bits of feedback about the session. The session was mostly an interactive session using code snippets, what few slides there were can be found by clicking here.

Thu, 30 Apr 2009

Ubuntu 9.04 Jaunty Jackalope upgrade from 8.10 Intrepid Ibex is a bit of a disaster

I have been using Ubuntu for a number of years now and stuck with it even when all my colleagues and associates abandoned it for Debian (testing or unstable rather than stable) or they bought Apple Mac OS X equipment. The Intrepid -> Jaunty upgrade has however seriously dented my confidence, and I am now thinking seriously about whether running Debian Squeeze would be a better way forward for me.

Problem 1: I upgraded my laptop which used to work fine under Intrpeid, and now under Jaunty, after a random period of time under random circumstances, it completely siezes up. The mouse pointer moves but no amount of clicking or keyboard tapping has any effect whatsoever. Reboot the machine and it is all fine again – for a while.

Problem 2: I upgraded my server and my RAID1 disc failed to be present on reboot. Fortunately this is data only, the system is on a separate non-RAID disc so boot was no problem other than fsck returning an error code so boot has to be continued manually. Very fortunately the fix reported in a bug report on Launchapd saved the day.

Do I ditch Ubuntu and switch to Debian or just suffer the 6-monthly update pains rather than risk the continuous pain of a continuously updated system such as Debian Unstable?

Fri, 13 Mar 2009

A Look at Parallel Programming in Various Languages

I will be doing a session covering parallel programming in various common and not-so-common programming languages at the ACCU 2009 conference. This is currently scheduled as a 180min session starting 2009-04-24 14:00 (Processors Processors Everywhere, But How Do I Actually Use Them).

If you are a programmer/software engineer/software designer/<choose your favourite label>, the ACCU conferences are always worth going to (even if you don't go to my session).

I am giving a (sort of) preview (entitled "Fortran is not the only language for parallel computing") of some of the material for the ACCU 2009 conference sesion at 2009-03-25 20:00 to the Oxford sub-group of ACCU, see here

Wed, 11 Mar 2009

An Introduction to Groovy

I will be doing a session introducing Groovy on 2009-04-14 for the London Java Community. The session will be held at Skills Matter. The event is a free one but requires pre-registration

In keeping with Groovy being the dynamic symbiote of Java (and Scala), the session will be completely dynamically bound – i.e. no script, no boring, pre-prepared slide show.

Fri, 20 Feb 2009

Gant 1.6.1 released: Groovy 1.6.0 is harnessed

With the formal release of Groovy 1.6.0, it seemed obvious that there needed to be a build of Gant explictly compiled against it rather than a release candidate. Rather than muck around with repositories to get new builds of Gant 1.6.0 in place, it seemed easier and more straightforward, simply to create a new release of Gant – and those asked about this agreed.

So this release of Gant has no amendments, and no bug fixes. It is made just to ensure there is a version of Gant out there compiled against Groovy 1.6.0.

Gant 1.6.1 is in the Codehaus Maven repository groupId:org.codehaus.gant, version:1.6.1, but remember three different artefactIds, gant_groovy1.5, gant_groovy1.6, and gant_groovy1.7 – you have to use a version of Gant that matches the version of Groovy.

Distributions of Gant are in the usual place accessible from the Gant home page.

Sat, 24 Jan 2009

Gant 1.6.0 has been released.

This is really a single change release – Gant now supports build listeners, thanks to Graeme Rocher – but there are a couple of minor bug fixes as well. The main version of Groovy used is 1.6-RC-2, though there are version for 1.5.7 and Trunk as of yesterday (labelled 1.7-beta-1). Also Gant now uses Ivy 2.0.0 and not a release candidate!

This is the version of Gant that will be used in Grails 1.1 -- unless some bugs are found in the next few days, in which case it a Gant 1.6.1 will appear :-)

Gant can be found at http://gant.codehaus.org.

Thu, 27 Nov 2008

SC08 – A Trip to Austin, TX

At Concertant LLP we deal with all things multicore, concurrent and mainly parallel. It seemed sensible therefore to go to SC08 (used to be called Supercomputing) to find out what the very top performance niche of computing was up to. It gave us a chance to interview people from Intel, AMD, Sun, HP, IBM, Microsoft, etc., etc. to see what would be happening in supercomputing soon – what happens in supercomputing now is what happens for the wider world two or three years later.

The three of us who went wrote a number of short artcles whilst we were there. The whole collection can be found here. If you want a list of the one I wrote that can be found here.

Mon, 15 Sep 2008

Continuing the move from Subversion

Along with many, many others, I have come to the end of my tether with Subversion. The only thing that can try and save it is if every computer is always connected to the Internet always with a high bandwidth connection. Even then the big problem is having a .svn directory in every directory. OK, this is essential to the "directory as checkoutable item" architecture on the server but it is horrible to work with locally.

For many months now I have been using Bazaar and Git as my Subversion clients, i.e. I don't use Subversion to work with Subversion repositories, I am using a Git repository or a Bazaar branch instead. I am all a-dither as to which of these two is best &ndash the Bazaar command set is somewhat easier to work with, the Bazaar GUI tools work a lot better on Gnome, but Git is a lot faster.

I probably won't come to a final decision as to which to plump for until the next generation of version control system appears. This means I can't say which of the two I am going to move Gant to, so in the interim I am keeping all three. Until Codehaus decide which of Git, Mercurial or Bazaar they are going to support, I am maintaining a Bazaar branch on Launchpad, and a Git repository on GitHub as well as continuing to have the Subversion repository at Codehaus.

Wed, 10 Sep 2008

Analysis and Articles for Concertant LLP

It just struck me (OK it should have done so ages ago) that I have been failing to put on this webpage information about articles I am writing. The material gets written for and published by Concertant LLP and appears at IT Analysis (http://www.it-analysis.com/) and IT Director (http://www.it-director.com/).

My latest piece is "Is Dataflow the New Black?"

Not all the articles on this Concertant LLP page are by me but a number of them are. I guess I should create a list and put it somewhere on this site.

Tue, 22 Jul 2008

A Gant Event

I will be doing an "In the Brain" session on Gant (The Groovy way of scripting Ant tasks) on Thursday 2008-08-21 18:30. This will happen at Skills Matter, 1 Seckford Street, London EC1R 0BE, UK. The Skills Matter announcement is here.

As part of this session I am going to undertake "The Gant Challenge". The idea is for people to bring small examples of Ant (or other) builds that really irritate them so we can create the Gant version live and show that Gant can do the business where Ant often cannot.

If you are in the area then, feel free to drop by -- though you need to register beforehand so some forethought is needed. This is planned as a 90min session after which things move to a local hostelry.

Sun, 13 Jul 2008

Gant 1.4.0 is Released

There are a lot of internal changes removing assumptions, correcting bugs etc. There are also a couple of changes that mean that tools and target sets have a different initialization, effectively an API change. Also the deprecated task closure has actually been removed. All the details are to be found in the release notes.

As ever distributions are available at http://dist.codehaus.org/gant. For those who use Maven 2, the repository URL is http://repository.codehaus.org, the groupId is org.codehaus.gant, the artifactId is gant , and the version is 1.4.0.

The Gant webpage has the documentation.

Thu, 22 May 2008

Gant 1.3.0 is Released

An increasing number of people have been saying that having Gant install into an existing Groovy installation is not a good idea. Instead, they were asking, Gant should exist in a directory tree of its own and use the GROOVY_HOME environment variable to refer to the Groovy installation. This seemed like a good idea, so this has been done. Hence this release. Apart from a couple of very trivial bug fixes 1.3.0 is 1.2.0 but restructured.

There is the added advantage of course that with the new organization it became essentially trivial to construct a standalone version of Gant that does not require a prior Groovy installation – this distribution has a Groovy jar and various other (transitive dependency) jars included. So there are now three distributions:

As ever distributions are available at http://dist.codehaus.org/gant. For those who use Maven 2, the repository URL is http://repository.codehaus.org, the groupId is org.codehaus.gant, the artifactId is gant , and the version is 1.3.0.

The Gant webpage has the documentation.

Tue, 29 Apr 2008

Gant 1.2.0 is Released

Groovy released version 1.5.6, so making a Gant release was something to think about. People had been using 1.2.0-SNAPSHOT for a while and there appear to be no problems. All in all it seemed right to shift from 1.1.x to 1.2.x -- there are some breaking changes as well as lots of new goodies and some important bug fixes.

As ever distributions are available at http://dist.codehaus.org/gant. For those who use Maven 2, the repository URL is http://repository.codehaus.org, the groupId is org.codehaus.gant, the artifactId is gant , and the version is 1.2.0.

The Gant webpage has the documentation.

Mon, 07 Apr 2008

ACCU 2008

Another great ACCU conference, but a very busy one for me, I gave two solo sessions and joint session with Jim Hague. Also I was on the closing panel with Tom Gilb, Jim Coplien, Peter Somerlad and Hubert Matthews, run by Giovanni Asproni. For proof that I was there, see Anna-Jayne Metcalfe's photo of the event -- OK she caught me at a bad moment, so whilst it is a horrible shot of me at least it proves I was there!

The PDF files are all held on the Concertant LLP website.

Sun, 06 Apr 2008

UKUUG Spring 2008

John Pinner asked if I would revamp and present at UKUUG Spring 2008 one of the talks I did at PyCon UK 2007. The talk is entitled "The Great Languages Debate" but it isn't really a debate. It is a small tour through a few comparative programming language examples. The main aim is to show that dynamic programming languages are the languages of applications development. Also whilst functional programming languages may not be mainstream, the techniques and idioms are very important -- so much so that many of them are introduced into mainstream languages.

A PDF of the slides for the talk can be found on the Concertant LLP website.

The UKUUG Spring 2008 conference was very enjoyable, and everyone there entered into the right spirit of competition between Python and Perl. I was not lynched for stating categorically that Perl is an "execute only" programming language.

Thu, 06 Mar 2008

Gant 1.1.1 is Released

Not only are we now up to Groovy 1.5.4, there were a number of fixes and additions in the Gant code base, so it seemed appropriate to make a new release -- which actually happened last night. Highlights of the release are:

As ever distributions are available at http://dist.codehaus.org/gant. For those who use Maven 2, the repository URL is http://snapshots.repository.codehaus.org, the groupId is org.codehaus.gant, the artifactId is gant , and the version is 1.1.1.

The Gant webpage has the documentation.

Fri, 22 Feb 2008

I got Interviewed

Andres Almiray email interviewed me for GroovyZone, which is a zone on DZone.

Click here to go to that page.

Thu, 31 Jan 2008

Gant 1.1.0 is Released

Groovy 1.5.2 was released, and so, as announced, Gant 1.1.0 was released -- it all happened last Tuesday, I have only just got round to writing about it. As noted in the pre-announcement, distributions are available at http://dist.codehaus.org/gant. For those who use Maven 2, the repository URL is http://snapshots.repository.codehaus.org, the groupId is org.codehaus.gant, the artifactId is gant , and the version is 1.1.0.

The Gant webpage, has the documentation.

Gant: the freedom of using all the Ant tasks with a dynamic programming language (Groovy) and no XML in sight :-)

Sat, 26 Jan 2008

Gant 1.1.0 About to be Released

It seems I failed to write a note here when Gant 1.0.0 and later 1.0.2 were released. How very remiss of me. What is worse, I failed to write a note when Gant was turned into a project in its own right at Codehaus. Clearly I need to get better at doing these notes.

Groovy 1.5.2 is soon to be released. To stay in synchrony with the Groovy releases, Gant 1.1.0 is being prepared for release. Snapshots compiled against Groovy 1.5.2-SNAPSHOT are available as a release candidate. Distributions are available at http://dist.codehaus.org/gant. For those who use Maven 2, the URL is http://snapshots.repository.codehaus.org, the groupId is org.codehaus.gant, the artifactId is gant , and the version is 1.1.0-SNAPSHOT.

The Gant webpage, has the documentation.

If you give this version a whirl, that would be great. Do let me know if there are problems, or better still (of course) let me know if it works without problems out-of-the-box :-)

Highlights of the new release:

There are also a few fixes. The addition of the Gant Ant Task has meant that it is not straightforward to compile Gant with Groovy 1.0. After consulting with Groovy users on the mailing list it was agreed that this was not a problem. So for the moment, Groovy 1.0 is not supported, only Groovy 1.5.x. This can be fixed though if it needs to be.

Thu, 24 Jan 2008

Python for Rookies

PfR Book Cover

I have been more and more coming to believe that Java is no longer the right programming language for teaching people programming. Java has to be learnt, it is after all one the most important programming languages of the moment. However, I now believe that dynamic programming languages, in particular Python and Groovy, are better languages for the first introduction to programming. Following this you can introduce type, compilation, design patterns and all the good software engineering material as second courses on programming using languages like Java and C++. Of course, everyone interested in programming should also learn languages like Haskell, Erlang, Prolog, but that issue is for another time.

I started thinking about Python as a first programming language for university courses back in 2003. The idea bubbled as a publishing project but didn't really take off until 2005. I was introduced to Sarah Mount and James Shuttleworth (then both at Coventry University, Sarah has now moved to University of Wolverhampton) who were using Python to teach their introductory courses to physicists, economists, art and design students, as well as computer science students. We immediately waded into taking all our material and forming it into a book. The result is Python for Rookies published by Thomson Learning (now called Cengage Learning). This should be in the bookshops next week.

Buy this book, you know you want to :-)

PS It is true that Graham Roberts and I authored the book Developing Java Software as a first programming course using Java (and we'd like you to buy that as well :-). We are however in the process of writing a book using Groovy instead. More on this at a later date.

PPS The Python for Rookies website has only just been started so it doesn't have much on it yet. Over the next few weeks more and more material will be added.

Wed, 24 Oct 2007

Talk at Grails eXchange

groovy, grails, java ee, grails exchange Last week was the Grails eXchange 2007 conference, which was great fun. It was really nice to meet face-to-face many of the people that are active in the Groovy and Grails community that I had only ever “met” by email on the mail lists. I gave a talk on Gant. A PDF of the slide can be found here from the Concertant LLP presentations page.

Talk at ACCU Cambridge

Many moons ago Ric Parkin asked if I would do a talk on dynamic languages to the Cambridge sub-group of ACCU. Given an opportunity to plug Groovy and Gant, I immediately said yes. The talk was on 2007-10-04 but I failed to put this note up till now. A PDF of the slide can be found here from the Concertant LLP presentations page.

Sat, 22 Sep 2007

Gant 0.3.2 Released

To stay in synchrony with the Groovy releases, Gant 0.3.2 has been released to coincide with the release of Groovy 1.1-beta-3. There are only a few minor bug fixes over 0.3.1 but they are worth releasing.

The new distributions are available from the Gant webpage, there is a build for Groovy 1.0, and a build against Groovy 1.1-beta-3, as well as the source tar and zip files.

Tue, 11 Sep 2007

PyCon UK 2007

PyCon UK 2007 was great. The talks were good, and all the delegates I met were both knowledgeable and sociable. Definitely a conference to prepare to attend next year!

Both the presentations I proposed got accepted, which was exciting for me, since I got to speak on two topics I find really interesting: programming languages comparisons, and build systems (a comparison!) – the links are to the PDF files of the slides held on the Concertant LLP presentations page. The conclusions of the first presentation were that dynamic languages (Python, Ruby and Groovy) are much better than static languages like C++ and Java for building applications, and Python is just great. The second talk concluded that Gant is great but that SCons is also extremely good – dynamic languages and DSLs rock for build systems, and SCons (written in Python) is well ahead of the field.

LugRadio recorded most of the talks from the conference, it will be interesting to see what the result is.

Sun, 02 Sep 2007

Talking about Gant

I was asked to give the Groovy and Grails User Group presentation at the No Fluff, Just Stuff eXchange event which was held in London 2007-08-29/2007-08-31. Naturally (!) I chose to talk about Gant. As it was the final presentation before the party, I decided to announce the “Death of XML as a Build Specification Notation”. The original title of the talk was slightly different, but then that is dynamic binding for you. A PDF of the slides can be found here from the Concertant LLP presentations page.

Thu, 19 Jul 2007

Gant Moves Forward, 0.3.1 Released

Graham Roberts and myself were some having problems using Ant optional tasks with Gant, so I added extra classpath things:

Kohsuke Kawaguchi pointed out that Gant failed to return a sensible exit code and this was hindering Gant's use in the Hudson continuous integration system. This definitely required fixing!

The new distributions are available from the Gant webpage, there is a build for Groovy 1.0, and a build against Subversion Head r6962, as well as the source tar and zip files.

Fri, 18 May 2007

Talking at Grails eXchange 2007

The people organizing the Grails eXchange conference in October have asked me to do a talk on Gant. It is currently scheduled for 2007-10-17 15:10. It is going to be good to meet face-to-face all the people I have only been emailing with!

groovy, grails, java ee, grails exchange

Fri, 11 May 2007

New Version of Gant Released

With the release of Groovy 1.1-beta-1 and various little things added to Gant that people had asked for, it seemed about the right time to make a new release of Gant. A major change is that targets are now called targets and are not called tasks. This seemed like a good enough reason to call this version of Gant 0.3.0. Do let me know if you like it and/or have any feedback.

Jar files compiled against the Groovy 1.0 and 1.1-beta-1 distributions can be found on the webpage at http://groovy.codehaus.org/Gant

Thu, 26 Apr 2007

Groovy Wins the 2007 JAX Innovation Award

The buzz around the Groovy programming language will certainly increase now, it won first prize at the the prestigious 2007 JAX Innovation Awards announced recently. More details here,

Here's a picture of Dierk receiving the prize at the ceremony. Nice one Dierk :-) Here's a picture of the award certificate itself as proof!

Mon, 16 Apr 2007

ACCU 2007 Conference

Last week was the ACCU 2007 Conference and it was as good as ever. Serious praise to Ewan Milne, Julie Archer and all the rest of the conference committee for organizing such an enjoyable event.

Although the origins of ACCU is in C and C++ programming, Python, Ruby and Groovy are all well represented in the talks as well. As are higher level issues such as design patterns. It is generally a mix of very high quality development people taking things seriously and having a lot of fun.

I gave two presentations:

As you can imagine from the title, the first was intended to be contentious. The room was full to bursting and included many from the BSI C++ Standard Committee and some from WG21 (the ISO C++ Standards Committee, which is meeting this week in exactly the same hotel we had the conference last week – this is by design not by accident). I opened with a variation on a Shakespeare quote:

Friends, ACCUers, programmers, lend me your prejudice
I come to bury C++, not to praise it
The evil that languages do lives after them
The good is oft interred with their compilers
So, let it be with C++.

However, in the end I got far less heckling than I expected, almost none in fact. The session was nicely interactive, but no heckling. I guess I should have been more controversial. In case you are wondering, my basic messages were:

Alan Lenton had promised to organize a lynching party, but people got too excited about the language debate, which at no time descended into flaming or language wars, and completely forgot, so I made it out. I really enjoyed the session, I hope the attendees did.

The second session was really trying to excite people about domain specific languages (DSLs) as tools for systems development. The core concept is that programming is about constructing a language in which to easily express the solution to a problem. Currently programming is creating the classes or functions to solve the problem, a side-effect of which is to construct a language to describe that solution. The “DSL Way” is to construct a domain specific language, a side effect of which is a solution to the current problem. People generally think you need a dynamic language (e.g. Python, Ruby, Groovy) to create a DSL, and indeed these languages are very good for creating DSLs. However, it is important to remember that C++ is also a very good language for creating DSLs – yes, the irony of being positive about C++ in this talk and negative about it in the previous talk is not lost on me.

I have made the slides and some of the code materials available:

Slides (PDF) Other materials
C++ has no useful purpose Factorial and Mailshot code
Builders: How MOPs make life easy Examples and Presentations code

Fri, 16 Mar 2007

Groovy and Grails User Group London Meeting 2007-03-15

I made a presentation on Builders (in Groovy) last evening at the GGUG London meeting (held at Skills Matter). Well it should have been a presentation but it was only half a presentation due to:

The projector not talking sensibly to my computers – plural, neither of them was able to work sensibly with the projector, even though one of them had 3 months ago. Eventually I managed to get one to do something reasonable enough to do something.

Definitely embarrassing. Still I managed to talk a bit about metaobject protocols (MOPs) and how the Groovy MOP not only uses metaclasses, but also looks for the method invokeMethod in the object itself as part of method look-up, and how this allows Builders to be constructed almost trivially.

As a mentioned in the entry for the last session I did, sessions such as these are not really the place for heavyweight presentations, so although the idea was to ensure everyone understood how Builders work in Groovy, it was a fairly light talk and the slides I used have next to nothing on them. However, it seems reasonable to make them available, so you can get a PDF of them here.

Groovy has a good selection of Builders: SAXBuilder, StreamingSAXBuilder, DOMBuilder, StreamingDOMBuilder, SwingBuilder, AntBuilder, to name just a few of the obviously most useful. Since I avoid XML as much as possible, SwingBuilder and AntBuilder are the ones I have most familiarity with. SwingBuilder makes creating Swing user interfaces so much easier than writing Java code, and AntBuilder has a plethora of uses, some of them even associated with managing builds. Of course, I only use Gant now for managing builds using Ant tasks – it saves having to work with XML!

I am scheduled to give a talk on Gant at Grails eXchange, so if you want to hear more about how to manage Ant-based builds without using XML, come along. In case you weren't aware, Gant is used within Grails for managing all the activities.

Sat, 03 Mar 2007

New Version of Gant Released

More and more people are using Gant as their build system in preference to Ant, so I thought it time to create a new release so that people can be using all the latest features. So, I am pleased to announce Gant 0.2.4.

Jar files compiled against the Groovy 1.0 distribution can be found on the webpage at http://groovy.codehaus.org/Gant

In case you were wondering if there really were any high-profile projects using Gant, then look no further than Grails which uses Gant for managing all task scheduling – in preference to Ant.

Let me emphasize Gant does not totally replace Ant, exactly the opposite, it relies on the Ant tasks. What Gant does is replace the use of XML as the build specification language, with scripts written in Groovy. An increasing number of people prefer using a dynamic programming language for describing builds rather than using XML. Can you blame them :-)

Thu, 22 Feb 2007

GFontBrowser Updated to Version 0.1.3

It was irritating me that GFontBrowser didn't allow you to quickly display a font using gnome-font-viewer as is possible in Nautilus, so I added it. Double clicking a font does the job. See here for more on GFontBrowser.

Mon, 30 Oct 2006

Groovy and Grails User Group Meeting 2006-10-26

Paddy Gallagher, supported by Skills Matter, has started organizing some regular Groovy and Grails User Group meetings in London – at Skills Matter's premises in fact. He asked if I could do a talk on AntBuilder and Gant for last week's meeting, which I was happy to do.

Sessions such as these are not really the place for heavyweight presentations, so I talked around Gant code from real projects. Consequently, the slides I used have next to nothing on them. Nonetheless, people asked for them to be available. So you can get a PDF of the slides here.

For this talk, the main point was that using a dynamic programming language such as Groovy makes creating build systems so much easier. In the case of Groovy, there is AntBuilder allowing systems to be based on using all the ready-made tasks from the Ant library – and no XML, unlike with Ant and Maven.

Gant is basically an infrastructure framework around the AntBuilder, providing a command-line user interface and a ways of modularizing build scripts. Oh, and it provides an internal domain specific language to make Gant scripts look more like the classic Make, Rant, Ant, Maven type thing where there are targets that the system has to achieve.

If you are interested in a JVM-based build system, that doesn't use XML, but does provide the same sort of facilities as Make, Ant, SCons, Rant, etc. then take a look at Gant.

Tue, 24 Oct 2006

Gant vs Gosling

Justin Lee has created a build tool he calls Gosling(*) which he ‘announced’ here. Like Justin, I believe that XML is not a good language for specifying builds and yet the Ant tasks are a massive resource for build infrastructure. This is why I created Gant

I disagree with Justin when he says Java is good for describing builds. I think a dynamic language such as Groovy, is far better than Java for describing these things. SCons, Waf and Rant have shown that using dynamic languages and creating internal DSLs is the way forward for build systems. Unlike SCons, Waf and Rant, Gant does not (currently anyway) create a complete relationship/dependency graphs. Currently, Gant is a way of scripting Ant (and other, e.g. Ivy) tasks using Groovy, bringing in the power of using a general-purpose, dynamic programming language.

Justin presents a part of his build system for Gosling as:

@Default
  @Description("Builds the Gosling project")
  public void build() {
    new Javac(this, BUILD_DIR)
      .addSources(new FileSet("src/java")
        .addInclude("**/*.java"))
      .addOption("-Xlint:unchecked")
      .addOption("-Xlint:deprecated")
      .addOption("-g")
      .execute();
    new Copy(this)
      .setDestDir(new File(BUILD_DIR))
      .addFileSet(new FileSet(JAVA_SRC_DIR)
        .addExclude("**/*.java"))
      .execute();
  }

Using Gant, this looks something like:

task ( build : 'Builds the Gosling project' ) {
  Ant.javac ( srcdir :  'src/java' , destdir : 'build' ) {
    compilerarg ( line : '-Xlint:unchecked -Xlint:deprecated -g' )
  }
}
task ( 'default' : '' ) { build ( ) }

I feel that the power of Groovy's AntBuilder, and its harmony with the Ant XML labelling, makes Gant the tool of choice. Certainly I use it for builds where I would previously have used Ant. But then I would, wouldn't I.


(*) Even though Justin claims the original of the name Gosling is not derived from James Gosling's surname, it is a master stroke of publicity to use it. I hope the connection was intentional and not an accident.


Mon, 23 Oct 2006

Java Closures Get Groovy-er But...

Neal Gafter has released v0.3 of the Closures for Java proposal on his blog. The new syntax Neal et al. are proposing is:

{ int , int => int } plus = { int x , int y => x + y }
    

This is going to irritate people as they have to replicate the types of the parameters to the closure. Why not just let the compiler do the work and have:

{ int , int => int } plus = { x , y => x + y }
    

Of course, this is getting closer (or should that be closure!) to the Groovy syntax for closures:

plus = { x , y -> x + y }
    

or if you really have to have static types:

plus = { int x , int y -> x + y }
    

For now I shall stick with Groovy for closure-based programming.

Thu, 19 Oct 2006

Developing Java Software, Third Edition

Well, for various reasons, it has been a long time coming, but finally, it is here. Developing Java Software is now in it's third edition. My advanced copies arrived with yesterday and it should be in the bookshops (at least in the US and UK) next week.

This third edition is very different to the second in so many ways:

We have set up a website to host support material associated with the book: http://www.devjavasoft.org.

We are regularly adding more and more answers to the questions set in the book onto the website so that people have a reference. Feel free to send in answers to questions not yet answered, or alternative answers to the ones we have – we will ensure any submissions are attributed.

Thanks to Amanda Makepeace for painting ‘The Forest Of Wic’ which is the basis for the artwork of the book cover.