Pattern-Based Software Development – Day 1

February 8th, 2010

I got a couple of great surprises this morning on turning up in Manchester for the module starting today.

First up, the lectures were originally timetabled for a 9:30am start, and are now timetabled for 11:00am. That gives me loads of time between arriving in Manchester at 08:00 and starting lectures to eat, get to the library, do any admin stuff that’s easier when I’m onsite and generally chill out before getting started.

Second – I signed up for ‘IBM Patterns for e-Business Applications’, because I wanted to get some Software Engineering coverage as part of my MSc, and there was some coverage of design patterns in the syllabus for this module in 2009. I was in two minds about it, studying something with ‘IBM’ on it didn’t seem entirely right for an academic course.

To my surprise, the course has been re-branded ‘Pattern-Based Software Development’ overnight, and a complete re-write of the lectures has started to appear that appears to focus on understanding and applying some of the GoF design patterns – pretty much the exact course I wanted to take. I’ve studied and applied some of the GoF patterns before, and I’m really looking forward to learning the syllabus and having my work critically reviewed.

As an aside, it looks like the Manchester CS department is completely re-working its taught MSc Advanced Computer Science proposition, organising the taught modules into ‘pathways’ like Artificial Intelligence and Natural Language Processing. Looks like a good move to me, helpful for students choosing modules.

The lecture material introduced the Strategy, State, Proxy and Item Description patterns. The first three are pretty well known, but it’s the first time I’ve come across the last one.

Coursework material involves UML Class diagrams and designing a system to solve a loosely defined business problem. Unfortunately, it seems that good UML tools are tough to find. After a few days of battling working with the Eclipse project’s UML2 plugin I’ve come to the conclusion that I don’t much like it for simple diagramming. I’ve tried a few other tools with limited success, just a couple left to try. It might be you do have to pay $$$ to get a good one – but we’ll see.

Paul Brabban Computer Science, MSc

When Eclipse Plugins Don’t

January 27th, 2010

Quick Version

If, after ‘installing’ a plugin for Eclipse 3.4 it’s not visible in Preferences or in context menus, check that your user account has permissions to write into the appropriate Eclipse directories – because Eclipse doesn’t warn you.

Preamble

For those who don’t know, Eclipse is an IDE heavily used for Java development. Like anything else, it’s a delicate balance of awesome and suckage, and today I got caught out by a pinch of suckage.

It’s a plugin-based platform, which means that anyone can write a piece of software that ‘plugs-in’ to Eclipse to extend or enhance the functionality. It’s a great approach, allowing me to tailor my own installation to my needs. Having recently re-installed Ubuntu Linux, earlier today I was trying to set up my plugins without success.

The Problem

I set up the m2eclipse update site as described in the documentation (pretty standard fare… Help > Install New Software…, paste in the update site URL and choose components to install) but after ‘installation’ was completed there was no sign of the plugin. There should have been new options appearing all over Eclipse, but no. Tumbleweed.

Tried installing the next plugin on my list… Subclipse. Same story. So not a problem with a plugin…

The Solution

…and then it dawned on me. I’d installed Eclipse into /opt, which is all locked down to root, with administrative privileges. Schoolboy error – no permissions for the plugin files to actually be installed under the authority of my user account, which is the context that Eclipse normally runs.

A quick chown to root:admin for the /opt/eclipse directory (rather heavy handed – I should probably have worked out which directories I needed write access to, but I was out of patience), ‘uninstalled’ the plugin in the Eclipse, tried the install again and then I was back in business.

I’m really surprised that Eclipse doesn’t complain when it’s ‘installing’ a plugin in directories to which it has no access. I may not be the sharpest tool in the box, but I’m fairly sure that permissions problems happen to other people too. I might go so far as to find out where you feed back to the Eclipse development community for once. Anyways, this post will help remind me next time I get this wrong, it might help someone out, and if nothing else you might be mildly entertained by my ineptitude.

Paul Brabban Development, Java

Installing Ubuntu 9.10 from a USB Stick

January 24th, 2010

Linux distributions tend to come as ISO images – files which are images of CDs/DVDs. I’ve always burned the images to a disk to install, but I’ve been meaning to try setting up a bootable USB stick instead.

Better for the environment, right? More importantly, I never seem to have a blank CD knocking about when I decide to do an install.

I expected some hassle, but it turns out to be trivial if you’re already on a Ubuntu machine, so long as your BIOS supports booting from USB devices. So…

  • Check the computer you want to install into supports booting from USB; if it doesn’t I guess you’re stuck with the CD option
  • Slap a USB stick with 2GB space or more in a slot on another Ubuntu machine (make sure there’s nothing on the stick you’ll miss if it gets lost!)
  • Start up usb-creator from the command line (just type usb-creator, or sudo apt-get it if it’s not installed)
  • Choose the .iso in the usb-creator utility
  • Choose the target USB device
  • Wait while files are copied and stuff
  • Pull out the USB stick when it’s ready, plug it into your target machine and reboot.

The familiar installer screens should start up.

More details here.

Paul Brabban Ubuntu