Saturday, November 18, 2006

Windows Vista - Features Under the Hood

Windows Vista introduces some promising new features that aim to take desktop computing to the next level. Apart from all the eye-candy that is provided by the new Aero interface, gadgets and flip effects, there are some pretty neat features on offer under the hood. Some of these add improvements to the performance, security and productivity of the system.

Below are some of the features that I am really looking forward to in Vista.

Memory is usually one of the bottlenecks that affects system performance. As applications and background processes like anti-virus scans and drive indexing run concurrently, processor cycles and memory space are increasingly consumed. The result can be a drastic degradation in system performance. It would be great if memory could be added on the fly, providing extra space to ease the burden. Vista's ReadyBoost does just that.

With ReadyBoost, a USB memory drive with at least 512 MB of space can be plugged into the system and used by Vista as memory. The drive can be plugged out at any time without affecting or corrupting the system. Even more, all data on the drive is encrypted and hence is of no use to a malicious attack. With 2GB+ memory drives available today, this seems like a very promising technology.

Security of data is a primary concern these days to businesses and individuals alike. Regular reports of data theft, especially from notebook computers being stolen fuels our concerns. BitLocker is a technology that adds real-time data encryption to the Operating System volume. Hence lost or decommissioned computers are protected from data theft.

BitLocker which is available in the higher-end versions of Vista has some system prerequisites. A TPM (Trusted Platform Module), a cryptographic hardware chip needs to be present in the system. In the absence of a TPM, a USB stick that contains a startup key must be inserted at boot time.

Another new feature that exploits the latest developments in hardware is ReadyDrive. ReadyDrive makes use of hybrid hard drives, the latest hard drives that integrate non-volatile flash memory with traditional drives. This helps Windows to boot faster, resume from hibernation quicker and save on battery power. Finally the long wait for the boot process will be rather short!

Tuesday, November 07, 2006

100% CPU!

I have been doing some heavy-duty image processing on my computer at work this morning and it's pushing my machine to the max! Looking at the performance graph, I was amazed to see my CPU crunching away going steadily at 100%. Looks like it's time to convince my boss to get me one of those shiny new quad-core chips from Intel...


Tuesday, September 26, 2006

Backup for a Rainy Day!

We all know that backups are important! However, most users realize the importance of backups only after lightning strikes. We need to protect our data from the usual suspects such as hard disk crashes, fire, floods, theft etc. I have been using a free tool from Microsoft called SyncToy that makes running backups an ease. This post describes the backup procedure using SyncToy.

Note: Windows XP Professional comes with an out-of-the-box Backup utility. This utility produces a single backup file (.bkf) that could be later used to restore data and system settings. I prefer using SyncToy as it creates an exact replica of the directory and file structure. Thus the backed-up copy can also be used as a read-only reference when away from the source computer.

Steps to Getting Backups Up and Running 1. Centrally arrange data for easy backups. 2. Get an external USB hard drive. 3. Download and install Microsoft SyncToy. 4. Run SyncToy to backup your data. 5. Create a backup schedule. 6. Store the external hard drive safely.

1. Centrally arrange data for easy backups.
The first thing to do is to arrange our data centrally, preferably in a single hard drive partition or folder to facilitate easy backups.

2. Get an external USB hard drive.
There are a number of options available to store backed up data. These range from CD-Rs, DVD-Rs, USB sticks, external USB hard drives, SAN drives etc. I personally prefer USB hard drives as they are fairly inexpensive, easy to use, mobile and have significant storage capacities.

3. Download and install Microsoft SyncToy.
Once installed, setting up a backup job is pretty straightforward. Start by creating a 'New Folder Pair' (Screenshot). After specifying the source and destination folders we need to specify the synchronization action. This needs to be 'Echo' in our case (Screenshot). Using Echo, new and updated files are copied across and renames and deletes are repeated on the backup. One point to note is that Echo does not delete directories on the backup. Our backup job is now ready to run!

4. Run SyncToy to backup your data.
Running the SyncToy backup is an easy process. Select the relevent folder pair from the list at the left side of the main window and then click 'Run' (Screenshot). A progress bar apprears showing the advancement of the process.

5. Create a backup schedule.
Backups are valuable only when they are run regularly! We can automate this process by creating a Scheduled Task in Windows. This can be accessed at Start -> All Programs -> Accessories -> System Tools -> Scheduled Tasks. The wizard is simple to follow (Screenshot). To run our backup job, add -R "<folder-pair_name>" to the end of the Run command. To run all folder pairs just add -R.

6. Store the external hard drive safely.
Once we have a backup schedule in place it makes sense to store the backup drive at a separate geographic location to the source. This proves essential in times of natural calamities such as fire, floods, theft etc.

Thanks to SyncToy we now have a backup procedure in place!

Wednesday, September 13, 2006

Spring MVC and AJAX with JSON

One of the main decisions to be taken while developing AJAX applications is the format of messages passed by the server to the client browser. There are many options to choose from including plain text, XML, CSV etc. One of the more popular choices today is the JavaScript Object Notation (JSON). JSON provides a nice name-value pair data format that is easy to generate and parse. This is especially true when using an AJAX toolkit like Dojo that provides built-in functionality to parse JSON messages at the client. If you are using Spring MVC as your web framework, generation of these JSON messages is very straight-forward as well. Below we understand how to produce JSON messages while using Spring MVC.

Spring MVC defines the View interface to render views to the client. The framework provides a number of implementations including JstlView, RedirectView, TilesView etc. In order to return JSON messages we implement the View interface to create a new class that returns data formatted using the JSON notation. We shall call this class JSONView.

The method that we need to implement is render(Map model, HttpServletRequest request, HttpServletResponse response). The render method accepts a Map as it's first parameter and produces the output. We could manually iterate through the Map, process and produce the JSON output. However, there is a Java library called JSON-lib that produces the JSON notation. The code below shows our JSONView class that can be used as a Spring MVC View to return JSON output to the client.

import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONObject;
import org.springframework.web.servlet.View;
public class JSONView implements View {
    public void render(Map map, HttpServletRequest request,
    HttpServletResponse response) throws Exception {
        JSONObject jsonObject = JSONObject.fromMap(map);
        PrintWriter writer = response.getWriter();

As can be seen from the code above, Spring exploits MVC to it's full potential and provides the flexibility to tailor the view to exactly suit our needs.

Saturday, September 09, 2006

Hello World!

Hello World! Well, I finally had to bite the bullet and start my very own blog. Starting off with modest ambitions, I primarily hope to blog about my experiences with software, programming, technology and also general topics that I find interesting…

I am a software developer by profession, primarily focusing on Java Enterprise and Open Source technologies. You can access my personal website at

Now, with the short introduction out of the way, get ready for the Blog Attack