Happy Holidays

Just wanted to wish everyone a Merry Christmas, Happy Holidays, or whatever your preferred religious observance is at this time of year. Hope you enjoy the festive holiday theme I’ve put on the blog. The old one will return after the holidays. Speaking of returning after the holidays…

Like everyone else in the blogosphere I’ll be taking a few days off to spend time with family and friends. Before I go, I’ll leave you with a link to another wonderful cartoon from George Sfarnas. Merry Christmas!


Yes Virginia, There Is A Mark Miller

My favorite, all time Visual Studio add-in is DevExpress’s CodeRush. I haven’t had time to do a good blog entry on it, but if you are looking to buy yourself a Christmas gift, this would be an excellent choice. (http://www.devexpress.com/Products/NET/IDETools/CodeRush/Index.xml)

DevExpress’s CTO of developer tools and grand poobah of programming is a C# MVP named Mark Miller. Mark has made many appearances on Dot Net Rocks (http://www.dotnetrocks.com) and DNR TV (http://www.dnrtv.com). His appearances are always informative and educational. He has a unique way of looking at the world that will make you think about programming (and other things) in new ways.

Mark just blogged (http://www.doitwith.net/2006/12/23/ChristmasCancelledAgain.aspx) that he’s got a quick feature he’s adding to the new version of CodeRush, and there’s a possibility it could be ready for Christmas Day.

Yes Virginia, there is a Mark Miller!

UPDATE: I finally got around to writing about CodeRush, you can read it here:


Open Command Window Here Power Toy

If you liked the idea of quickly launching command windows, but want the window separate from your explorer shell you should look into Microsoft’s free “Open Command Window Here” Power Toy.

You can find it and other power toys for XP at http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx or http://shrinkster.com/kuy. The description is about halfway down, on the right side of the page are links to the downloads.

If you are a Visual Studio developer, you’d probably like to have a version of this to create a VS Command Window. No problem, Scott Hanselman has created some inf files you can use to create these. Find them on his blog at http://www.hanselman.com/blog/VisualStudioCommandPromptHereAndSearchUnknownFileExtensions.aspx or http://shrinkster.com/kuz.

Coding Standards

Every development organization should have a set of coding standards they follow. A clearly defined, written set of guidelines their developers follow. Things that will make it easier for one developer to read another’s code.

The fine folks at subMain have scored another hit by releasing their coding standards to the general public. (http://submain.com/?nav=products.guidelines) On their site they are now giving away in PDF form a copy of their own corporate coding standards.

I really like their document, as it goes far beyond the traditional “use pascal case” type documents. Their standards document gets into advanced topics such as design patters, security, threading, and even code reviews. It’s applicable to both VB.Net and C#.

While no coding guideline will ever be on the best seller list like Vince Flynn or Richard Marcinko, I found this to be well written and organized. It was easy to find what I wanted, each point laid out distinctly. I do wish there was a little more example code, even if was examples of what not to do. However, I consider that a minor nitpick for an otherwise complete document.

If your company has a standard already, you should check it against the subMain one to ensure you didn’t miss anything. And if you don’t, you should seriously consider the adoption of these standards for your own.

Be sure to check back with them in the January / February 2007 time frame, as Serge (subMain’s President) indicates an update will be available with a rewrite of the Control Naming Guidelines, and possibly some updates to the database section as well.

All in all another great contribution to the .Net community for subMain.

Note I last mentioned subMain on November 27th, writing about their Smart Outliner for VS.Net free add-in. (https://arcanecode.wordpress.com/2006/11/27/vs-add-ins-smartoutline2005/)

Arcane Thoughts: Time Got It Right

In its person of the year, Time Magazine named YOU, the savvy internet user as person of the year. Since the announcement a lot of the pundits and powers that be have been decrying the decision. They instead point to the political players and world leaders as better choices, saying Time weaseled out. Well I’m here to say Time got it right.

This isn’t the first occurrence of Time awarding a group of people the “Person of the Year” award. Back in 1950 Time awarded “G.I. Joe”, or the American Soldier the award. Most akin to this award is 1966 when they gave the title to what they call “Young People”, people under 25 years of age.

Over the last year I’ve seen the growth of what the web refers to as “Social Networking” or “Web 2.0” explode. Words like blog, podcast, and videocast have become common everyday language. Bloggers have risen to the point where they are almost considered journalists. News breaks first in the blogosphere before it hits the traditional media. Your average individual is creating podcasts and / or videocasts using minimal equipment.

The new social networking phenomenon has created it’s own slate of niche superstars. Just look at the popularity of ZeFrank (http://www.zefrank.com/theshow). In the Microsoft .Net arena, Carl Franklin’s Dot Net Rocks show (http://www.dotnetrocks.com) has made him a superstar in the programming world.

Meanwhile, stars from the “old” media have found new homes on the web. Take Leo Laporte for example, formerly of TechTV (before those idiots at G4 bought ‘em out and ruined a great channel) has a new home on the web, http://www.twit.tv. Each week Leo heads a huge list of informative podcasts. And let’s not forget his former co-host Patrick Norton, who now co-hosts a biweekly videocast at DL.TV (http://dl.tv) with Robert Heron. Another TechTV alumnus is Kevin Rose, who has used the whole Social Networking concept to create Digg (http://www.digg.com). Digg has turned Kevin into a rich (or at least well off) man by allowing people to recommend blog posts.

I meet people everyday who just a year ago were clueless as the existence of blogs and podcasts but today are using RSS aggregators like old pros. I can’t tell you why 2006 was special, maybe the world is finally broadband enabled enough, maybe it was just timing. Certainly the popularity of portable media devices such as the iPod, combined with powerful, low cost computers have a great deal to do with it.

Regardless, 2006 was definitely the year the Web and Social Networking took off, and it was YOU, the internet user who made it possible. You have given up your spare time to produce creative content to share, for little or no monetary return. Thanks! Now give yourself a pat on the back.

You can read the entire Time article at http://www.time.com/time/magazine/article/0,9171,1569514,00.html.

Think I got it wrong? Say so, and why! Agree? Leave a comment and stroke my ego.

Installing Ubuntu on VirtualPC Step by Step

Update: October 18, 2007 – Version 7.10 is now out. Complete step by step instructions on installing 7.10 can be found at:

Update: I’ve now determined how to get Ubuntu 6.10 working on VirtualPC 2007. If you are interested in the latest version, see my new post on February 26th, 2007 at https://arcanecode.wordpress.com/2007/02/26/installing-ubuntu-610-on-virtual-pc-2007-step-by-step/ or http://shrinkster.com/mff. Note there is still value in installing 6.06, as it’s the version of Ubuntu that will have long term support, and thus be the Linux of choice by many corporations. Also note that while the instructions below were written with 6.06 and VirtualPC 2004, the instructions are the same for 6.06 under Virtual PC 2007. So you’ve decided you’d like to try a Linux distribution, but don’t have a computer to dedicate to it. Further you’re understandably reluctant to mess around with your partitions and try and get dual booting to work. No problem, Virtual PC to the rescue.

First, you will need to obtain a copy of a Linux distribution. One of the most popular today is Ubuntu. Ubuntu uses the Gnome desktop for an “Apple like” feel. There’s a variant called Kbuntu which has a much more Windows like look and feel. If you are interested in Mono development (Mono is the open source implementation of the .Net Framework) be aware you will want to use a Gnone desktop, and thus Ubuntu, as my understanding is all of the Mono tools were designed for Gnome.

For this tutorial we’ll be using Ubuntu. To obtain your copy of Ubuntu, simply go to http://www.ubuntu.com , click on the downloads link, and select Ubuntu. I would recommend you use version 6.06, which is the long term supported version. I attempted to use the current version, 6.10, and had major issues with the graphics.

Key Point: Use Version 6.06, not 6.10.

Be aware the image is around 650 Meg in size, so have a good high speed connection. If you are on a dial up, check your newsstands for various Linux magazines. Each month ever one of the Linux magazines comes with a DVD loaded with a variety of distos (Linux speak for distribution).

Once you’ve downloaded the ISO image, you have two choices. First you can simply burn to a CD, using your favorite CD burning software. Make sure you tell it you want to burn from an image, if you just write the ISO file you’ll have a disk with an ISO image, but it will not boot.

Your second choice, the one I’d suggest is to use the Microsoft Virtual CD drive. I blogged about it back on September 13th (https://arcanecode.wordpress.com/2006/09/13/virtualization/ ). Read this post to see how to use it, then jump back here.

Back? Cool. Launch the Virtual CD app, with a drive letter assigned to your Ubuntu image. For this tutorial I’ve mapped my Ubuntu to drive Z.

Now that you have Ubuntu ready, you need to go read my VirtualPC Step by Step post (https://arcanecode.wordpress.com/2006/09/20/virtual-pc-step-by-step/ ). Keep it handy as I will be referring to it frequently for this tutorial.

In Step 1 you are instructed to create a new machine, do so. I’ve named mine “Ubuntu 6.06”. In step 2, you are prompted for your OS. You will need to pick Other. In step 3, you are asked about Ram. Ubuntu will run OK under 256 megs, however if you have the available space I’d suggest upping it to 512, especially if you intend to get into doing some graphics or mono coding.

In step 4 you will want to create a new hard disk, and in step 5 confirm what you’ve selected. OK, now you are up to step 6, installing the OS, which is where this tutorial picks up.

Launch your new Ubuntu 6.06 VPC. (Click on it in the VPC and click Start). When it starts, click on CD, Use physical drive Z: in the menu. In a moment you’ll see a menu that looks like this:

[Ubuntu VPC 1]

Select the “Start Ubuntu in safe graphics mode” option. It’s very important you pick this option, if you take the default “Start or install Ubuntu” you will get garbled graphics under VPC.

OK, now you have watched the Ubuntu screen flash as it loads, now you should see a screen like this:

[Ubuntu VPC 2]

While it looks like it, be aware you have not installed Ubuntu. Instead, you are running in what is known as “Live Mode”. This is a feature that is common to most CD distributions of Linux. In Live Mode you can boot your computer and use a Linux distribution without having to install.

Installing is just what we want to do, and Live Mode makes it easy. By now you’ve probably noticed the big icon that says “Install”. Let’s double click this.

[Ubuntu VPC 3a]

The first thing you are prompted for is the language you want to use. Select the language most comfortable to you, then click Forward.

[Ubuntu VPC 3]

Next you are asked for the city near where you live. You can select your city by either clicking on the map, or selecting from the list. After doing so you will want to set the time, just click on the Set Time… button to do so.

[Ubuntu VPC 5]

In step 3 we are prompted for the keyboard layout. Since my default is already selected, all I have to do is click Forward, otherwise you should pick your layout and click Forward.

[Ubuntu VPC 6]

Now Ubuntu needs to get some personal information. Just your name, what you want your login name to be, and the name for your computer. Enter your own information here, then write them down! OK, now you can click Forward.

[Ubuntu VPC 7]

Getting close, now in step 5 we’re asked about the disk space. Your two options are to install to the entire partition, or manually edit. Since this is a virtual machine, we’ll just take the default of “Erase entire disk:IDE1 master (hda) 17.2 GB Virtual HD” and click Forward.

[Ubuntu VPC 8]

OK, we’ve finally reached the final step of our install wizard. Just assure yourself that your selections are correct, then click the Install button.

[Ubuntu VPC 9]

As Ubuntu installs you’ll be able to monitor it via a progress bar:

[Ubuntu VPC 10]

When the install is done, you are asked if you want to restart, or continue using the Live CD. Let’s pick Restart Now.

[Ubuntu VPC 11]

Now during the reboot I got to the Ubuntu logo screen, then the VPC just sort of stopped. I wound up clicking the red Cancel x to close the window, and picked turn off. I then returned to my VPC console and clicked Start to restart my Ubuntu machine.

Once Ubuntu is running, you are first prompted for your Username. Enter the user name you provided during the install and press enter when done. Then do the same with your password, pressing enter when you’re done. Ubuntu will crank and grind, then come up to the desktop, and you’re ready to go!

I’m not going to go into details on how to use Ubuntu, but I will point out a few things. Let’s take a quick look at the desktop.

[Ubuntu VPC 12]

Starting in the upper left, you’ll see the menu:

[Ubuntu VPC 13]

The Applications menu is where your programs reside. Preinstalled is the Open Office suite, Gimp photo editor, and lots of neat games.

Places is sort of like My Computer, through it you can get to your personal folder, the network, CD / DVD drives, and more.

Through the System menu you can tweak your system settings, similar to Control Panel.

Next to the System menu is a little globe, this will launch the Firefox web browser. To it’s right is an open envelope, you’ve probably guessed this will launch an e-mail program.

By now, you’ve probably noticed this little announcement:

[Ubuntu VPC 14]

If it went away, just click on the orange icon you see on the screen. This is the notification icon, and will let you know of updates, system messages and more. Through the internet you can download the latest updates to Ubuntu. By the way, next to it you’ll see a little speaker icon, this is the Volume control.

Finally, you’re probably asking yourself how the heck you shutdown in Ubuntu. You can exit safely in one of two ways. First, on the upper right you probably noticed this red icon:

[Ubuntu VPC 15]

This is the shutdown icon. You can also select System, Quit from the System menu.

There you go, all the steps you need to get up and running with Ubuntu. Both it and Virtual PC are free, so you have no excuse to start experimenting with Ubuntu today.

Adding a Second Hard Drive to VirtualPC Step by Step

Microsoft Virtual PC defaults the hard disks for it’s virtual machines to 16 gig in size. For most instances that’s large enough, but you could have cases where you simply need more disk space. Or, perhaps you’d like to keep your demo or project code in a separate virtual hard disk than the main virtual disk your applications run on. Regardless of your reason, creating a second hard drive for your virtual machine is fairly easy.

A few up front points, in these instructions I’ll be doing what I believe to be the most common scenario for most folks and be using Windows XP for my guest system.

First, before you launch your Virtual PC click on it once and select the settings button. Now go to Hard Disk 2. Change the option button from “None” to “Virtual hard disk file”. Next, click on Virtual Disk Wizard.

The first screen is simply the welcome screen, just click next.

[Second VHD 1]

On the next screen it asks about disk options. Take the default of “Crate a new virtual disk” and click next.

[Second VHD 2]

You are now asked about what type of disk you’d like to create, a hard or floppy disk. Take the default of “A virtual hard disk” and click next.

[Second VHD 3]

Now you are prompted for the name and location. I stored this with my other VHD files, so enter the path and location you want and click next.

[Second VHD 4]

The next screen asks what type of drive you want to select. The default, “Dynamically expanding” is the default, and is what we’ll be using. This is a great option as it puts a small file on your drive and lets it slowly expand as you need it to grow.

“Fixed size” creates just what it sounds like, a fixed size hard disk. The one main use I could think of is to create a virtual disk the same size as a DVD. You can then store your files on it prior to burning to a DVD. Downside is that the drive always takes the same amount of disk space.

“Differencing” is a big topic, but in brief a differencing drive is based on another VHD file. Once you create a differencing drive, the original is locked and cannot be changed; all changes are written to the differencing disk. Why would you want to do this?

Well let’s say you were teaching a class and wanted to let the students work on labs. You’d create your base image with your software loaded, and then create a differencing disk. Your students would write their changes to the differencing disk. After that class was done all you have to do is create a new differencing disk instead of having to recreate your entire disk image.

Final is linked to a hard disk. It saves your info out to the real hard drive. This is considered an advanced option, and to be honest I haven’t experimented much with it so that’s all I’ll say for now.

As I said, we’ll go with the default for now, and pick “Dynamically expanding”. Click Next to continue.

[Second VHD 5]

Next we are prompted for the maximum size of the VHD. In this demo we’ll take the default of 16 gig and click next, however if you’d like to change it go ahead, enter the maximum number of megabytes you want, when you’re done click Next.

[Second VHD 6]

OK, you’re up to the final screen, this just asks you to confirm your choices. Click on Finish to complete the process.

[Second VHD 7]

You should see a small message saying you’ve created the disk. Just click Close to close this message.

[Second VHD 8]

Now that you’ve created your drive, you need to tell Virtual PC to use it. If you recall, in the settings window we’ve already selected the “Virtual hard disk file” option. Now click the Browse button and pick the vhd file we just created.

[Second VHD 9]

OK, now we’ve got Virtual PC all setup. Click on OK to close the settings, then click on Start to start the Virtual PC. Once you’ve logged in, open up a My Computer window. Here’s a snapshot of mine.

[Second VHD 10]

OK, I can hear you now. “Hey, I created another drive, where’d it go?” Well, it’s there, the problem is you haven’t formatted it yet so Windows XP doesn’t know what to do with it. Let’s fix that now.

Open up Control Panel, and go into Administrative Tools. Now double click on Computer Management. Now click on Disk Management under Storage in the tree. The minute you do, you’ll be presented with the “Initialize and Convert Disk Wizard”. After taking a look at the opening screen, click Next.

[Second VHD 11]

The next screen asks which disks you want to convert. Here, you see Disk 1 is selected, which is correct (your C drive is disk 0, then each additional drive is 1, 2, etc.) Click Next.

[Second VHD 12]

Now it asks about converting disks to Dynamic disks. Check this on, and pick next. (Note in the pic below I haven’t checked it on yet, you will need to.)

[Second VHD 13]

Finally, you are presented with the Finish window. Click Finish to complete.

[Second VHD 14]

Now the window shows Disk 1 as initialized, but it’s still not quite ready to use yet.

[Second VHD 15]

Hang on, we’re almost done. Right click in the Disk 1 area, and select New Volume. This launches the New Volume wizard. On the opening screen just click Next.

[Second VHD 16]

Now you are presented with the Select Volume Type. Simple is the only option enabled, so let’s just select Next.

[Second VHD 17]

The next screen is prompting you to see how much disk space you want to allocate to this new volume. In our case we’ll use all the space, so we’ll just click Next.

[Second VHD 18]

In the next dialog we’re asked what drive letter to assign to our new volume. You can pick any available letter, but I think I’ll just take the default of E and click Next.

[Second VHD 19]

Now the wizard will prompt about formatting. We need to format this drive, so we definitely want to do this. I did change the default volume label from “New Volume Label” to “VSDriveE” since I’m using this with a vhd I use for Visual Studio. However, you should name it something appropriate to your use. Other than that, I’m leaving the other options alone and clicking Next.

[Second VHD 20]

Finally we’re nearing the end. The next screen is the “Completing the New Volume” wizard. Here we are simply confirming our choices. Take a quick look, if all looks well, click Finish.

[Second VHD 21]

While it formats, it will show you the progress in the status window, as you see below.

[Second VHD 22]

OK, that’s it, you’re done. Close the Computer Management window, then the Administrative Tools window. When you return you new computer, you will see your new drive, ready to go!

[Second VHD 23]

Well there you go. Seems like a lot of steps, but it took a lot longer for you to read this than it will take you to actually do it. If you do create new drives, drop a comment and let us know what creative uses you use your second drive for.