Wednesday, 24 October 2007

Migrating NetBeans Settings

I've been using both the Beta and nightly-build releases of NetBeans 6 for the last few weeks.  Every time I move to the next version, I have to sort out settings, preferences and libraries because the IDE doesn't offer to do this for me.  Other folk have a similar complaint, e.g.
Migrating Netbeans class libraries between versions - TEERA 2.0

NetBeans preferences are stored in your profile, which in Windows is a folder structure rooted at: C:\Documents and Settings\<yourUserName>\.netbeans\<versionNumber>


The problem with this folder structure is that it mixes IDE settings with things like the local library collection and worst of all, a local class-information cache and file history (under the var folder). The whole thing can grow to quite a size (mine's well over 80MB).


The key subfolder appears to be config. I managed to migrate all the most important (and time-consuming) settings by copying these folders from one version to the next:





  • Editors




  • Preferences




  • org-netbeans-api-project-libraries




This doesn't quite do everything – docking window positions and toolbar button sizes are obviously stored somewhere else, but I can live with this.


I've voted for this to be fixed: see http://www.netbeans.org/issues/show_bug.cgi?id=42157

Tuesday, 9 October 2007

Ronnie Hazlehurst

So sad to hear that Ronnie Hazlehurst died on 1 October.  There have been plenty of well-written obituaries (e.g. the BBC, the Guardian, and Telegraph), but I wanted to write a few lines myself because for me, like most people of my generation, his music formed an essential part of the backdrop of my early life.  I still find the tunes he wrote for all those wonderful BBC sit-coms hugely evocative: the instant I hear the opening few notes of "The Fall and Rise of Reginald Perrin" I'm transported back...

I hadn't fully appreciated the sheer brilliance of the man until I read some of the obits: for example, he used the morse-code letters for "Some Mothers do 'Ave 'Em" to dictate the rhythm, and then scored the piece for two piccolos! Every piece seemed to fit perfectly the character of the programme for which it was written.  Some might say that we will always make that judgement in retrospect, because there never was any other theme tune association.  Well, perhaps, but just listen to "The Two Ronnies", "Fall and Rise", and especially "Yes, Minister": these are works of art - you just couldn't improve on them. Those tunes will be forever special to all of us who grew up with them.

Dare Obasanjo on the Release of the Source Code of the .NET Framework Libraries

Link: Dare Obasanjo aka Carnage4Life - On the Release of the Source Code of the .NET Framework Libraries

As usual, someone else has already written it: Dare's piece on this announcement reflects my views exactly.  Since I've been playing with Java lately (see previous post) I've become used to the idea that I can jump straight into the source for almost anything, certainly for the JDK libs.

Still, most of us I'm sure would agree that this is a Good Thing, both in purely practical terms for working programmers, and on another level, more evidence that Microsoft is beginning to 'get' some of the things the other side of the industry managed to 'get' long ago.

There's another way the developer will surely benefit: being able to read through the real code is the best way to appreciate and absorb the good design principles enshrined in (most of) the .NET Framework libraries.  The principles which guided the team are described in the excellent Framework Design Guidelines book by Cwalina and Abrams, a book I'd recommend even to folk who don't use the Microsoft platform.  True, you can use Reflector to reverse the libraries, but the original source will presumably retain comments, which may reveal subtleties around intent, choices and so on.

NetBeans 6.0

After my last post on NB and Eclipse, you might think that I'd never go anywhere near NetBeans again. Well, predictably enough some things (chiefly HL7, Ruby and RDF) have dragged me back to NetBeans and Java, so I grabbed NB 6.0 Beta 1 and gave it another try.

Much, much better. Somehow, the startup time has been reduced quite a bit, everything felt faster and the whole tool is shaping up rather well. A complete contrast to my previous (and quite recent) experience. I played with the startup settings to improve performance even further (details somewhere below) and now I'm quite happy with it.

You do need to spend a bit of time with NB to appreciate just how good it actually is: the code editor features outshine Visual Studio quite easily - better refactoring support, better code navigation being the two I immediately appreciate. Simple example: want to go to a definition? Hold down CTRL and statement elements become hyperlinks. Adding libraries and references is as simple as in VS, and you can create project groups which are similar to VS solutions.  I've barely scratched the surface.

The set of plugins in the default download of NB 6.0 provides a lot of functionality, not all of it really ready for daily use, in my opinion. The UML support appeared good until I tried to use it for a substantial reverse-engineering job: it took a long time and the resulting class diagrams were slow and awkward to render and navigate.  Not really a priority for me, though.

Subversion support is also provided and this is definitely a priority for me.  Sadly, this appears to be weak, too. First, NB appears unable to import new (unversioned) projects: the 'Import into Repository...' command seems to be permanently greyed-out. Oddly, the 'Commit...' command is available even though the project folder is completely unconnected to my SVN repository.  If I invoke that, I get a partial list of new files in the grid, and the option to commit them; clicking the commit button apears to work, but after a while I see a popup dialog saying "Action canceled by user", even though I did nothing!

Ruby support is good, but I'm a novice Ruby developer and have yet to exercise all the Ruby features. The ever helpful Roman Trobl has provided some good Flash demos of Ruby support: I recommend watching the demo of NB's RoR support, where Roman builds a bare-bones blog application in a couple of minutes. I haven't found a better Ruby IDE yet.

I plan to put more information on using NetBeans on the Java section of my Wiki, especially for folk coming to Java and NetBeans from a Visual Studio background.  So far I've only added a note on the configuration settings I've adopted which improve performance considerably - more soon.

How long can this last?  Well, on the evidence of the last few days, I'm optimistic.

Wednesday, 3 October 2007

G.ho.st in the machine

G.ho.st in the machine : Blogs : BCS

Peter Murray blogs about healthcare informatics on the BCS site, but the post that I've linked to here is all about g.ho.st, an amazing piece of work all done in Flash (as far as I can see), offering a kind of VM accessible through the browser.  Thanks to Peter's post, I've signed up. I also managed to get my preferred user-name, 'roger', so I guess there aren't too many users yet.

The Flash applet does all the work of course, much like an X Window System display server does when you drive it over a network (I can remember actually doing this! It's a fundamental feature of X: how many people still exploit it?).

With g.ho.st you get 3GB(!) of space and they claim you can ftp from Windows Explorer stright to your online store.  I tried this but it didn't work for me: I tried twice to upload a couple of PDFs - Windows thought it had transferred them but they didn't show up in g.ho.st.

A bit of a toy, as it stands, but very impressive and worth keeping an eye on.

Tuesday, 2 October 2007

Facebook

Sorry, but I just don't like Facebook. Actually, you can extend that dislike to all social networking sites, though to my eternal shame I must admit to being in at least one (LinkedIn).

I think this clip very nicely sends-up the whole Facebook thing. Too much free time ...