Thank-you James Gosling

I'd previously tried my 12-year old son (another James!) with Logo, but he got bored with drawing boxes fairly quickly, and the Lisp-like syntax proved to be pretty impenetrable when it came to doing anything more complicated - all in all Logo wasn't a great success.

Over the weekend I'd had another try, teaching him the rudiments of OO programming using Java and NetBeans as a quick way of compiling and running some simple examples, but to be honest NetBeans was really a bit of overkill. Coincidentally James Gosling posted a recommendation yesterday on his blog for a learning environment for Java. The package is called BlueJ, and it's basically an IDE for Java where the explicit goals are to make it easy to create and explore the behaviour of an OO program - for example it allows you to instantiate and exercise the methods of your class without having to have a completed program.

James G also recommended an associated book - Objects First with Java - A Practical Introduction using BlueJ. The first two chapters are available online, so before I splashed out and ordered the book I installed a copy of BlueJ, printed off the sample chapters and let James B loose on them. I'm extremely impressed with BlueJ - the developers have obviously spent a lot of time considering not just what features to include, but also what features to leave out, and the result is a system that allows people to get to grips with OO concepts without getting swamped by the details of editing and compiling the code. What I've seen so far of the book is excellent, for example rather than getting bogged down in the details of syntax and control structures it starts by explaining (and illustrating) the OO fundamentals - classes, objects and their attributes and behaviours. I was impressed enough to order a copy :-)

As I was digging around I found this thread in response to an article on BlueJ on java.net, and I really was astonished by the whining on it, which could be summarised as falling into one of two categories - the first one being "IDEs are bad, everyone should use the command line". That strikes me as a pretty dumb complaint, somewhat equivalent to insisting that everyone has to understand how an ECU works before they can have driving lessons. The second complaint is along the lines of "BlueJ isn't suitable for building enterprise applications", i.e. "How come I can't shift this using this?". Well, Duh!. BlueJ does in fact have the ability to export code to other IDEs, so what exactly is the issue here?....

In my experience, people with an engineering bent first get interested in stuff by playing with something they think is neat, then they get really hooked by taking it apart and learning how it works, and on that basis I think the BlueJ environment and the associated book are an excellent starting point - certainly my James thinks so!

Tags : , , ,
Categories : Java, Tech, Work


Re: Thank-you James Gosling

I've had the misfortune of being required to submit OOD assignments using BlueJ this past semester. I say misfortune because BlueJ royally screws up my working-very-nicely-thankyou java projects and unit testing, deciding for itself that my <tt>package X</tt> statement was incorrect and removing it for me... thus making my tests fail.

I haven't bugged it yet with BlueJ (waiting for the end of the exam period, and there's that day job thing too) but I will.

I'd suggest that BlueJ is fine to begin Java programming with, but once you've got the hang of the basic concepts, you should really start using NetBeans instead. Or vi/emacs/xemacs/ed....

Re: Thank-you James Gosling

Hmm, I've just tried importing a NetBeans project and it works fine for me...

And I agree that BlueJ is primarily a beginners tool - but as that was one of its primary aims, that's hardly surprising. I just don't think it is reasonable to slam it for not having features that were deliberately left out.

Re: Thank-you James Gosling

The point was that it was my JUnit tests which were mangled - deliberately - by BlueJ. Which is supposed to have quite well integrated JUnit support, and which for this subject we were directed to use. Besides that, why should BlueJ decide that a package statement which is in existing code is 'wrong' ?

Re: Thank-you James Gosling

I haven't played with the JUnit stuff yet. I notice that BlueJ also doesn't seem to have any way in the GUI of refactoring a class into a different package, although if you manually change the package statement it asks you if you want to move the class into the package or leave it where it is (in which case it removes the package statement).

Ah well, I guess you have two options - log a bug, or change to a different course ;-)