Friday, March 07, 2008

Installing VMware Player on Ubuntu 7.10 (64-bit) to Run Multiple Development Environments

My current laptop has Windows Vista Ultimate (32-bit), but I want to install Ubuntu 64-bit to be the host operating system and use VMware to run multiple virtual machines with different software development environments (Vista + Visual Studio 2008, XP + Visual Studio 2005, Ubuntu + Eclipse + LAMP, etc.). Instead of installing all different environments into the same OS, I prefer to have a dedicated virtual machine for each.

The idea is changing from a single boot Windows Vista to a dual boot Ubuntu 64-bit and Windows Vista. In Ubuntu 64-bit, I will run all virtual machines for software development. The original Windows Vista will be preserved in case I need to run a Windows application without using virtualization.


Installing Ubuntu


The first step is to install Ubuntu 7.10 (64 bits) on my laptop. Since I decided to leave my existing Windows Vista partition (drive C:) and my NTFS data partition (drive D:), I shrink my NTFS data partition in order to get some free space at the end for the Ubuntu installation. The following guide describes the whole process:

Sharing data between Ubuntu and Windows Vista with Read/Write Permissions


I want to share data between my Ubuntu and Windows Vista with read and write permissions. We have two options for it: setup read/write support for NTFS partitions on Ubuntu or setup read/write support for ext3 partitions on Windows Vista.

To setup read/write support for NTFS partitions in Ubuntu, use the following guide:If you prefer to setup read/write support for ext3 partitions in Windows Vista, then you will need to use an ext3 driver for Windows. The following driver also works for ext3 partitions:

Installing VMware Player in Ubuntu

I will be using VMware player in my laptop. I use VMware Server on my desktop where I create my the virtual machines. On my laptop, I decided to only install the VMWare Player since I just need to run the virtual machines. WMWare Player has less features than the VMWare Server, but it runs faster.

The steps for installing VMware Player on Ubuntu 7.10 (64-bit) are:

1. Install the Linux header files for your kernel version. In my case, I just run:
sudo apt-get install linux-headers-$(uname -r)-generic
2. Download the VMware Player 64-bit (tar file) from vmware.com. Or you can just run the command:
wget http://download3.vmware.com/software/vmplayer/VMware-player-
2.0.2-59824.x86_64.tar.gz
3. Extract the files to a local directory:
tar -xzvf VMware-player-2.0.2-59824.x86_64.tar.gz
4. Enter in the directory and run the installation script:
cd vmware-player-distrib
sudo ./vmware-install.pl
5. During the installation, I chose the default options by pressing ENTER. Note that when it asks the location of the kernel header files, you should provide the location where it was installed on step 1. In my case, they are in:
/lib/modules/2.6.22-14-generic/build/include
6. IMPORTANT: Since I am using a 64-bit version of Ubuntu, I also needed to install 32-bit libraries so that we can also run 32-bit virtual machines. If you do not install these libraries, you will get an "Cannot power on" error message when trying to run a 32-bit virtual machine. So, install the 32-bit libraries by running:
sudo apt-get install ia32-libs
Now you are all set. To start the VMware Player, just go to the main menu and click on Applications, System Tools, and then on VMware Player.


The Trade-offs of using Virtual Machines for Software Development


The drawback of running your software development environment on a virtual machine is that you do not have the same performance as running it on the host OS. The benefit is that it gives you much more flexibility. For example, you can have dedicated environment for specific applications your are developing, you can easily move your development environment from one computer to another, you can backup the whole development environment by just copying the virtual machine files to an external drive, etc.

Another advantage is using a 64-bit OS as host, which recognizes all the RAM you have. Windows Vista 32-bit might not be able to recognize 4 GBytes of RAM. My desktop has 4 GBytes, but Vista only sees 3 Gbytes.

Although there is a little bit of performance loss, I still prefer using development environments in virtual machines for the flexibility that it gives me.

Wednesday, February 06, 2008

Interactive Application Architecture Patterns (MVC, MVP, PAC)

I just came across this article by Derek Greer that discusses the three similar interactive application architecture patterns: the Model-View-Controller, Model-View-Presenter and Presentation-Abstraction-Control pattern. If you are interested to learn this patterns and understand their differences, this article is highly recommended for you.

The author also mentions the Microsoft Patterns & Practices Patterns MVP and MVP w/ Application Controller, which are used in the Web Client Software Factory (WCSF).

I am currently using WCSF, and I am not sure if I should use MVP with or without Application Controller. Martin Fowler describes in his P of EAA book that there is little value in using an Application Controller if the flow and navigation of your application is pretty simple so that anyone can visit any screen in pretty much any order. He also mentions that the strength of an Application Controller comes from definite rules about the order in which pages should be visited and different views depending on the state of objects.

Monday, January 28, 2008

.NET 3.5 Exams

Since Visual Studio 2008 is already available for MSDN subscribers, I am wondering when the current certifications will change due to this new release.

Currently, the MCPD certification is based on the exams related to VS2005 / .NET 2.0.
According to this blog, there are new exams for .NET 3.5. These exams are:
Each exam gives you an MCTS certification in that specific area, but there is no mention if these exams will be incorporated into the MCPD certification. Hopefully, MS announces the new changes for MCPD. For now, I will wait a little bit until this happens since I do not want to waste time studying for obsolete exams.

Sunday, January 27, 2008

Evaluating Advantages of Test Driven Development

One of the assignments of my graduation course COMP610 - Selected Topics in Software Engineering is to present a research paper on a topic covered during this course. One of the topics that I find interesting is Test Driven Development. I decided to present the following article:

Evaluating Advantages of Test Driven Development: A Controlled Experiment with Professionals

This is the first time I create a Webcast. I used CamStudio to record the presentation, which records it into AVI files. I used Windows Movie Maker to do some editing in the presentation. I am not sure if there is a better tool for that, but it worked. The output file was a WMV of 33 MB. If no editing was necessary, I could just convert the original AVI to the flash format before uploading. One tool to make this conversion is Free FLV Converter 2.3.

The presentation is only 20 minutes long, but it took a while for me to get it done. Well, now it is over and you can see it at SCIS Streaming Video Site. Enjoy it!

Sunday, October 28, 2007

Edmonton Code Camp 2007

Last week I was at the University of Alberta attending the Edmonton Code Camp 2007.

The Code Camp is a one day developer conference driven by the local developer community. It happened on Saturday October 21. I was very impressed with the organization and quality of the presentations. I am glad that we have such an engaging .NET community in Edmonton volunteering to organize an event like this.

I attended the following sessions: Introduction to TDD, NHibernate, MonoRail, and Alt.NET.

Some technologies and tools that were presented through these sessions:
  • Rhino Mocks: a dynamic mock object framework.
  • Windsor Container: Inversion of control container.
  • ActiveWriter: an addin for Visual Studio 2005 to design a domain model and to generate code decorated with ActiveRecord attributes.
Some recommended books:

Tool for C# Format

I am using this tool for formating C# code for publishing in a blog:

http://manoli.net/csharpformat/

The formatted code will look like:


using System;

public class HelloWorld
{
public static void Main()
{
// Comment line
Console.WriteLine("Hello World!");
}
}

Evidence Based Scheduling

This is a new article from Joel Spolsky talking about Evidence Based Scheduling:

http://www.joelonsoftware.com/items/2007/10/26.html

Spring Boot Configuration Properties Localization

Spring Boot allows to externalize application configuration by using properties files or YAML files. Spring Profiles  provide a way to segr...