Replace your broadband provider's DNS servers with OpenDNS ones for more reliable service

I had an 'internet issue' last week when around 10am my connection to the internet was lost. Well not completely lost - my work PC (a remote box accessed via VPN) was still working fine so I still had a connection (at an IP level), but I couldn't visit any websites. The problem was that Pipex's DNS servers were offline (I couldn't ping them) and it wasn't planned maintenance.

So I replace them with settings for the free OpenDNS servers. These DNS servers are used by millions of people around the world, I suppose I've not migrated to them before because I've not had an issue until now. The migration couldn't have been easier - I logged into my router, accessed the 'internet settings' menu option, and selected 'DNS'. Then I unticked the "Automatic from ISP" box and entered the OpenDNS server details in the IP address boxes:


The OpenDNS DNS server IP addresses are:

Primary   DNS Server: 208.67.222.222
Secondary DNS Server: 208.67.220.220
Once my router had restarted itself with these DNS settings I was back online again...

More detailed setup instructions can be found on the OpenDNS site.

Technorati Tags: , , , ,

JSTL date comparisons with the current time (now) in JSPs

When you are coding JSPs and using the JSTL tags you will often be presenting information captured in a domain object, using the JavaBean-style getters to pull out the values within the JSP page.

What do you do if you need to show some text if the date stored within the domain object is before (or after) the current time?

There are many wrong or messy solutions - polluting the domain object by adding a method to 'get' the text to display, do the comparison in the controller and add the text to display to the request, etc.

One clean way is to use the jsp:useBean tag to create a page-scoped variable containing the current date/time and then use normal JSTL to compare the objects.

First create the page-scoped java.util.Date object (using jsp:useBean), then use ${now} to reference the current date/time. This is a regular JSP object now and so the normal JSTL operators work with this variable:

<jsp:useBean id="now" class="java.util.Date"/>

<c:if test="${someEvent.startDate lt now}">
It's history!
</c:if>
Technorati Tags: , , , , ,

Acer Aspire One: Backing up the hidden Windows XP factory image partition

My wife recently got the Windows XP 160GB version of the amazing popular Acer Aspire One (this seems to be the only netbook people ever have!).

I'd heard from a friend that we should save off the backup image which is preloaded onto a hidden partition (called PQSERVICE). But how do you gain access to the partition in order to save it off?

After much research I came up with the following options:

  • Install Linux on a USB pendrive, boot from that, then save the partition using Linux tools
  • Hack the master boot record to remove the 'hidden' attribute of the partition, then save it somehow
  • Numerous other tough/dangerous/involved methods
  • Follow my method below which is easy, safe and free!
Here are the steps you need to follow to be able to save off a backup image of the factory install of your Acer Aspire One as well as save a copy of your Master Boot Record (MBR) incase your hard drive dies...

Saving your hidden PQSERVICE partition

Download the free version of Macrium Reflect and install it

Run Macrium Reflect, let it analyse your drive and then right-click on the listed PQSERVICE partition (it's not hidden to this tool!):


Choose the "Create Image of '1 - PQSERVICE'" option

Save the partition to wherever is suitable, I place mine directly on my NAS storage box (I selected the "Intelligent Copy" option rather than the sector by sector copy, but I've not restored the image so please don't rely on that advice for a safe copy...).

An image of your hidden WinXP partition will now be saved:


Saving your Master Boot Record (MBR)

You will also probably want to save off the master boot record of the Acer's drive so that in the case of a complete drive failure you can set it up in a similar manner to the factory settings to be able to restore it correctly.

Download the free MBRWizard and extract the archive

Open a DOS box, navigate to where you extracted MBRWiz.exe and run the following command:
MBRWiz /Save=C:\acer_aspire_one.mbr
Copy the acer_aspire_one.mbr file in your C drive to somewhere safe (I put mine in the same place on the NAS box as the above PQSERVICE partition image file.

That's it!

Note: I've not restored this partition or master boot record, and I don't expect to, but at least you have a copy without messing about with your new netbook too much!

All this information was gleamed from The Importance of Backing Up EISA Hidden PQSERVICE Partition and MBR on a New Laptop (includes details on how to view the contents of the backed up image) and 5 Free Tools to Backup and Restore Master Boot Record (MBR) from the fantastic Raymond.cc blog. They go into much more detail and I would recommend that you give them both a good read.

UPDATE: This blog post looks like a good source of information if you want to Restore XP from the Acer Aspire One Hidden Partition.

Technorati Tags: , , , , , , , , ,

Easy, collaborative web UI mockups with Balsamiq

Every now and again you come across a tool that is so easy to understand, so fast to use and so effective at conveying it's ideas that you just have to tell people about it. One such tool is Mockups by Balsamic.

It's a web page mockup drawing tool written using Adobe Air which provides a palette of HTML widgets with which to 'draw' your screens. It has a querky 'freehand' style which lends itself to conveying the components and ideas that a web page should have without forcing the designer to code it up in HTML (or for the customer to think that because the HTML is done, the app must nearly be ready...).

Here is a very simple web page for search and listing users which I 'mocked up' in less than 10 minutes:
As you can see it's got a number of standard HTML widgets on it as well as a very useful 'post it' note allowing you to add distinctive notes and comments to the mockups themselves. So this in itself is enough to warrant using it to create all the screenshots that you might need which trying to show a customer what their site might look like, but...

The best feature about this tool is that it's so easy to understand and control that people are happy to start adding and editing stuff within five minutes of seeing the tool:

I used it recently during a teleconference to try and show a couple of remote attendees what my ideas were about our new project. We were each sat at our desks (in different offices) with headsets on (talking to each other) and other two people 'remote desktop'ed (via VNC) to my machine. I was then able to show them my ideas and also start to perform live edits to the mockups as the meeting progressed.

After about five minutes one attendee said "here, let me try..." and that was it, for the rest of the hour-long meeting all three of us were taking it in turns to control the mouse and keyboard and refine the mockups.
It was one of the most collaborative remote sessions I have ever done - because Balsamiq Mockups is so intuitive to use it was a doddle to get people to start to use it. Also because you can directly export the mockups to images it's easy to include them in just about any type of document or system that you have.

This is an excellent tool, and cheap as well!

Oh, and if the standard widgets contained in Balsamiq Mockups aren't enough, there is an ever-growing collection of user-contributed widgets over on the Mockups To Go site, a great example packed with widgets is Various Web Page Widgets.

Technorati Tags: , , , , ,