Using a virtual machine for development
When I joined Increo it was an entirely Mac shop. I was the only one who would be developing on a PC. Rather than worrying about potential compatibility issues and setting a development stack up from scratch, it seemed that the best approach would be to use a Virtual Machine running Ubuntu as my development platform.
The Pros of Virtualization:
1) Develop on the same stack as the production
This means that you can avoid running into issues with line endings, cross-platform quirks in parsers, etc. You know that you’re getting the same behavior locally that we will get on the server.
2) Portability: Single setup run from multiple locations
The VM is just a small set of files. You can pick up these files and copy them to another machine (or run them from an external drive) and always have access to your development environment. If you want to work at home on another computer, no problem.
3) Saved state
When you shut your computer down you normally have to close all open windows losing any state (unless the program itself saves it). You can simply shut down the VM and it will save the entire state of the guest OS, meaning next time you open it up, it’s exactly where you left off.
4) Don’t pollute the host OS with dev tools
Your computer stays clean. It doesn’t need a local web server or a local SQL server for development since that’s all on the VM.
5) Cross platform testing on a single computer
You can launch the product and test on either the host OS or the guest OS with a few simple clicks.
The Cons of Virtualization:
1) Lots of RAM needed
You should allocate at least 1GB to the guest OS if you are going to be developing on it. This means you’ll probably want 2GB or more in your computer.
2) Speed, some lag since not running natively
The guest OS isn’t quite as snappy as the host and you always notice a little bit of lag.
3) Mouse support
The back button on the mouse doesn’t work and it took a couple tries at editing config files to get the mouse wheel to be recognized. The mouse doesn’t behave the same way in the host and guest (although tracking speeds are thankfully the same) which can sometimes be frustrating.
4) The VM can’t use multiple monitors
There just isn’t a clean way to have the guest OS occupy two monitors, especially if your monitors aren’t identical. You can avoid this by running a browser, email, and other non-programming tasks on the host OS (on the second monitor) and leave the guest OS to use one screen for coding.
5) Focus can be confusing
Every one in awhile while working in the browser on the host, you’ll probably look over at the VM and see the cursor flashing in a text document and think that it is active. Then you try to type something only to realize that the host OS has focus and the VM does not.

