First Impressions of Ubuntu 10.04 (Lucid Lynx)

I got round to trying an installation of Ubuntu 10.04 today from my trusty USB stick. The install went smoothly and quickly (except for a problem with having two HDDs in this machine, with the OS on the second drive – remember to customise the boot options to boot from the right hard disk in this case, d’oh!).

On first boot, the most noticeable thing was the updated loading screens and reduced boot time. It wasn’t a slouch before, maybe taking 45ish seconds, but now taking 25 seconds between finishing the POST and giving me a login screen (I’ll time the laptop before and after when I upgrade that and produce a better comparison). It feels nice and fast.

Next, the wireless – works a treat, as usual. Then the proprietary graphics drivers, and the only essential reboot (having only today had a VPN client upgrade on a Windows system I have the misfortune of using with a total of five reboots necessary in the process).

Next, upgrade everything when prompted – only took a couple or minutes. Then, added in most of the packages I use that I can get out of the standard repo – that took a while, but it is 180 packages (incl. dependencies).

Finally, the other standout feature is the social network integration. The usual user identity graphic in the menu bar is replaced with a widget that looks identical but connects to my Facebook, Twitter, Flickr, Yahoo Messenger accounts. So far, I’ve posted up a couple of updates from there, but I’m not sure what else it can do just yet. The other option under this widget, ‘Ubuntu One’, provides the ability to synchronise some of your user settings to the cloud. Nice idea – but as an Android user, I wonder whether I can sync my phone info with my desktops?

A bum note though – the default theme is a little dark, and moves the window maximise/minimise/close buttons to the left hand side of the window, also known as the wrong side! Quick fix – System > Preferences > Appearance: Choose the New Wave theme to brighten things up slightly and put the controls back where they belong.

Anyway, all done in no time at all – it’s hard to see how they could make it any easier!

HP dm3-1020ea Review

I recently bought a new HP Pavilion dm3-1020ea, following the unfortunate demise of my Dell Vostro. I’ve been using it for a few weeks now and I’m pretty happy with it, although it’s not perfect. Here’s the pros and cons from where I’m sitting.

The Good Stuff

  • Dispatch and delivery was quick and trouble-free.
  • Ubuntu 9.10 works out of the box. As this thing’s got a shiny new AMD Athlon Neo X2 in it, I was a little concerned that it might not yet be supported but it works a treat.
  • The battery life is respectable rather than great. 3+ hours w/wireless off, less with it on.
  • The LCD is fantastic. Clear, good contrast and the reason I went for this model, high resolution. The 13.3″ panel supports 1366×768 which is standard fare for a 15.6″ panel. That means I can get more on the screen, the tradeoff of course is that everything is that bit smaller.
  • The keyboard responsive and feels good under the fingers. I’ve not really noticed the small size of the chassis, as the keyboard feels quite spacious. The keyboard is more like the kind of thing I’ve envied on friends’ Apple notebooks in the past.
  • There were a few toys I wasn’t expecting – an external CD Rewriter and Bluetooth.
  • HDMI out is a nice treat, letting me plug into my TV with no fuss.
  • I found there was a discount on computer equipment from HP thanks to my employer. Worth checking.

The Bad Stuff

  • The touchpad feels a little weird, it’s very shiny and feels a little sticky as soon as there’s any moisture on your fingertips. A minor irritation sometimes.
  • The touchpad is also very sensitive and I keep catching it when typing – the random-caret-location game is less than fun. There’s a little ‘off’ button for the touchpad just above it but seriously – like I’m going to hit the touchpad-on-touchpad-off button every time I use it?
  • You have to hold the fn-key down to access the function keys. Now that’s much more annoying, I personally use the f-keys much more often than I use the multimedia functions that are the main functions of the f-keys. Hand-yoga galore whenever I want to close a window. You can switch this in the BIOS, but even then it’s tough to see the little blue Fn labels. I have learnt that white padlock means F5, though.
  • The LCD panel doesn’t tilt back very far (goes back to about 120degrees from the keyboard. That’s annoying, possibly because I’m quite tall. The screen is also very shiny, which is bad when there’s light behind me and for smudges.
  • The chassis gets pretty warm – not uncomfortably so, but warmer than I expected.

Sounds like a lot of bad points, but they’re mostly minor and occasional annoyances, certainly nothing to make me regret my purchase. If you want a quick, affordable, small, lightweight laptop with a little more screen real-estate than usual, I think you’d be happy with it.

Fixing WebContent Problems in Eclipse

By default, a ‘Dynamic Web Application’ project in Eclipse will put the non-code resources (pages, WEB-INF, META-INF, etc.) in a folder under the project called WebContent.

Exporting .war files or publishing to a server works just fine, as Eclipse knows what WebContent represents, and what should be done in order to deploy it.

The trouble comes when you want to create a new WebContent folder (which you might want to do if you’re going to start using Maven as a build tool on an existing project – Eclipse no longer knows where the resources are and your exports stop working.

If you end up in this situation, you can fix it if you know where in the Eclipse config the declaration of WebContent is. Problematic if you deleted the old WebContent folder already as the declaration gets tidied up (by my experience anyway).

The fix is very simple. Say you want to declare /src/main/webapp as your new WebContent folder
1. Open the .settings folder under the project (if you can’t see it in the Project Explorer view, use the Navigator view)

2. Open the file org.eclipse.wst.common.component

3. In the wb-module tag, add a new entry as follows:


Here’s an example of a basic file to put that into context.



    
        
        
        
        
    

No Building Web Applications

I tried the first couple of weeks of the Building Web Applications, but I won’t be continuing with the module.

I was hoping that there’d be some deep insight into the pros and cons of the Java web applications and the JSF framework and RESTful Web Services, but it was pretty clear that we weren’t going to cover enough ground to make the course worthwhile. There’s also some pretty idiosyncratic approaches to writing Java code going on too, so it was all a bit strange.

I could have carried on through the module as it should have been easy to get a good grade but then I’m doing the course for the challenge and opportunities to learn more than for the letters after my name. It’d be a shame to lose out on learning something else.

The software engineering modules have been a little disappointing, to be honest – where I found the Computer Science modules assumed a challenging knowledge of maths and computing, the software engineering modules seem to assume little or no prior knowledge. Maybe that’s just my perception, having been working on-and-off in software development for the past 4-5 years.

On the bright side, I did get a lead on what looks like an excellent book to get stuck into JSF 1.2 in Core JavaServer Faces by Geary and Horstmann.

That means that I just need to revise the Patterns for e-Business course foe this set of exams. In Autumn I’ll continue with Computer Science modules and it’ll be once more unto the breach with the whole logic thing, so I’ve pulled a couple of books out of the library to get started with that again.

Studying for SCJP?

I was recently quizzed about prep for the Sun Certified Java Programmer exam, so here’s a quick rundown of the resources I found useful and tips I picked up when I was studying for SCJP 5. All in, it cost me around £200 and took just under four months. I can recommend the following resources:

  • SCJP 5 Study Guide by Kathy Sierra and Bert Bates. Choose the book for the certification version you’re going for. Work through every chapter and make sure you understand every concept and gain some familiarity with the APIs. I found flash-cards (little cards, questions on one side, answers on the other) invaluable for really burning some of the more difficult to remember stuff. As I didn’t have a programming or Computer Science background, I learnt more about Object-Oriented concepts and programming in the first three chapters of this book than I did from anywhere else.
  • javaranch.com SCJP FAQ for the latest thoughts info on certification, and the SCJP Certification Forum, in which you’ll start by asking questions and wind up answering the questions of others as you get lined up for the exam. The FAQ is also a good place to check what the recent exam takers are saying about the exam and the study materials. You can also use the Rules Roundups to get a feel for answering questions, although they’re pretty easy compared to the exam.
  • Mock exams. When you think you’re nearly ready for the exam, grab a pack of mock tests (I used whizlabs). I certainly wasn’t as ready as I thought I was! Do them properly – set aside at least an hour and try and work as if under exam conditions – you also get used the format of the exams and there’s a few tricky corner cases in the mock exams I did that are worth knowing about.
  • Sign up for your exam at prometric.com. I signed up for the exam as soon as I’d finished reading the Study Guide, because I’m fundamentally lazy and needed the impending deadline! If you do the same, you might want to give yourself a month or two between booking and exam day to do those mocks and deal with any gaps in your knowledge they throw up.

I’ve also got a couple of tips on techniques to use for answering some of the tricker exam questions – that can also come in useful when writing and debugging code.

First up, the exam will often have a code sample and ask you to choose from a number of options. ‘Does not Compile’ is almost always an option, and it kept catching me out at first. The way I dealt with it was to run through the sample twice – first as the compiler, looking for those errors that would prevent the code compiling in the first place. Only if that first check didn’t throw up any problems do you need to imagine the behaviour of the code as it runs and look for exceptions and results.

Second, come up with some way of sketching the changing references to objects as you work through a code sample. This’ll help you catch subtle re-assignments you might miss working it through mentally.

It’ll take up your time. I was probably spending about 5-10 hours a week learning, revising and writing code for those four months – that counts when you’re working full time. It’s worth it though, particularly if you’re an inexperienced Java programmer. It’ll make you aware of some of the principles and practises you should be thinking about and it’ll give you something of a guided tour of the core Java APIs.

If you going to go for this cert, good luck!

Pattern-Based Software Dev – Day 5

Day 5 was largely a revision day in the lecture and continuing with coursework in the labs.

As I’m not based in Manchester, we’ve had to make alternative arrangements to submit the coursework. The spec asks for submission on paper, with a cover sheet signed by the team members. I find this a little strange, given that this is Computer Science course. It’s also extremely inconvenient for me, as I don’t live in Manchester and I work full time. As such, we’ve made alternative arrangements and I’ll e-mail a copy of the report in lieu of my signature.

It’s been a funny course. Looking forward to reviewing this material, if you’re interested the e-Business patterns site is on developerworks.

Manchester University’s CS Legacy

When I chose Manchester University for my Computer Science MSc, it was partially because of its reputation but I realized I didn’t actually know anything specific about that legacy.

I thought I’d find out a little more about some of the computing cornerstones that were laid in Manchester’s labs. Did you know that the first Random Access Memory was created there? Fast, random access memory is a core part of computer systems today. Having enough of it is crucial to making your laptop or desktop run all those applications quickly for you.

The Williams (or Williams-Kilburn) Tube was the first random access memory that could access at speeds suitable for a computer. It was the ancestor of the multi-gigabyte cards you’ll find in your computer today.

Back in the days before TVs were two inches thick, the moving pictures on the screen were drawn by magnetic fields and streams of electrons in a glass tube called a Cathode Ray Tube, or CRT. Did you ever hold your hand near the screen of a CRT television and feel the static tingle? Somewhere around 1946, Tom Kilburn and Freddie Williams at Manchester University used the charge on a CRT’s phosphorescent coating to store ones and zeroes (effectively as dots), where they could be detected by a ‘pickup plate’ which lay over the ‘screen’.

As the electron beam hit the screen, a positive charge would be left behind at that position. Not for long mind you, as the charge would dissipate, but the information read by the pickup plate was used to refresh the tube before the charge had chance to leak away. This refreshing process is still required by the RAM chips in your computer today.

If you’re interested in knowing more, you can read all about it on Wikipedia and computer50.org, the sources I used to get this information.

To test the Williams Tube, the folks at Manchester built the first stored-program computer, a pretty important milestone in its own right. Maybe more on that some other time.

Pattern-Based Software Dev – Day 4

The material for day 4 focussed on Business Process Modelling. This sits orthogonally to Patterns for e-Business, defining business functions over their architecture.

There are two notations for Business Processes put forward – BPMN and UML Use Case/Activity Diagrams. My part of the coursework assignment is to apply BPM to the johnlewis.com some processes on the website, for which I’ve chosen Activity Diagrams and Visual Paradigm for UML. I did take a look at the implementations of BPMN, but I found a familiar pattern – they either didn’t work or cost $$$. Fortunately, VP is still serving me well.

The lab session was spent working with my team on the coursework and setting up tasks for the rest of week. As we’re producing a large report and taking different sections, we’ve set up a Google Docs site to drop working drafts onto to help us collaborate. It’s the first time I’ve used Google Docs like this and so far I like it, it’s responsive, intuitive and it’s easy to share a folder with a group of people, so for this kind of work it’s looking good.

In other news, the marks for the Machine Learning module are in and I’m very happy to have passed! That’s two modules, or one-quarter of my MSc done.

Machine Learning Turing Lecture in Manchester

Dr. Christopher Bishop will be giving the Turing Lecture this year on the topic of Machine Learning.

Dr. Bishop is a highly respected figure in the Machine Learning discipline and wrote Pattern Recognition and Machine Learning, a great place to start if you’re interested in the subject. It’s certainly on my bookshelf.

He’s giving the lecture in London, Cardiff, Edinburgh and Manchester, and Manchester’s lecture is on the 17th March.