Arcane Software: TouchCursor – For us keyboard geeks!

I hate to sound like an advertisement, but I recently found some software that absolutely rocks and I just have to share. I have to confess that I’m a “keyboard freak”. I hate having to take my hands off the keyboard, so much so that I bought a Lenovo keyboard with the touchpoint mouse cursor to use on my desktop, just like what you’d find on an IBM Thinkpad.

Now I’ve found some software that even further reduces the number of times I have to move my hands away from the home position to reach for those awkward keys, such as the cursor keys. It’s called TouchCursor, available at http://touchcursor.com.

What they do is use your space bar like another shift / ctrl / alt key. They then combine the space bar with the letter keys to emulate the odd keys like cursor, page up, etc. For example, space bar + I moves up one line. Space bar + K moves back down, space bar + J moves left, and so on. Here’s the default mapping (graphic courtesy of their site):

This is wonderful stuff, no longer do I have to move my hands off the “home” position to move the cursor around. And even better, the software is completely configurable. I can change the key combos to anything I want, and even add new ones.  It also works perfectly with existing key combos like ctrl, shift, and alt. For example, SHIFT + SPACEBAR + L is the same as SHIFT + RIGHT ARROW.

Now, you may think “well what if I have that odd program it doesn’t work right with?” No problem, the software allows you to turn off the functionality for specific applications. For example, I found it behaving a bit oddly with Virtual PC sessions (probably had something to do with both the guest and host OS wanting to look at the keyboard), so I disabled it for Virtual PC and just run it inside the VPC guest. Or you can take the reverse tactic, and only enable it for certain apps.

It really looks like they have thought of everything, all the little tweaks you might want to do with the software are available for you to do. I’ve been testing this with both Vista and XP and it works great on both platforms.

TouchCursor is shareware, you can download a copy and try it out for 30 days with no nag screens or any other crippling feature. The cost is only 20 US Dollars though, well worth the investment (I just sent in my 20!). For your money you get tech support, lifetime upgrades and permission to run on all of your computers. Not to mention the good feeling of helping out a worthwhile product. All that for 20 bucks? Count me in.

This is a really creative solution for increasing productivity at the keyboard. Rarely do I fall in love with a piece of code, but this product has made my very short list of “must have won’t operate a computer without it” software. I highly recommend trying it out, and using it for the full 30 days. It does take a little getting used to, but once you get the hang of it you won’t want to operate a keyboard without it!

Standard disclaimer: I have no financial affiliation with Rare Pebble Software, the folks who make Touch Cursor, other than being a customer. I receive no consideration of any kind for this mention. I just think it’s some awesome software and wanted to share.

PS Sorry for no post yesterday, it was a business travel day and I got home much later than I anticipated.

Arcane Thoughts: Thinking Inside the Box

Today I’m at an offsite meeting, talking about a new project. I won’t get into too many specific details, but we have to pull data from a web service and update an Oracle database. We can use a vendor provided Java API that runs on a Unix box to do the updates, or we can write to the database directly as long as we handle integrity issues.

So we spent the day brainstorming, to come up with possible solutions. Here is the list of contenders:

  • Write a Java app that runs on Unix that uses the vendor API’s.
  • Write a Java app that runs on Unix and updates the database directly.
  • Write a C# app that runs on a Windows Server, where a Batch Scheduler will kick it off.
  • Write a C# app that runs as a Windows Service under XP (we haven’t taken the Vista plunge at work yet).
  • Write a SQL Server Integration Services package that is run by the SQL Server job scheduler. It will use the web service as the input and update Oracle.
  • Use one of the above methods to pull the data then let BizTalk process it from there.

We haven’t made a decision yet, and my point was not so much to talk about the pro’s and cons of each solution. Instead it’s to get you to think creatively when it comes to new solutions for your company. Sitting down and cranking out yet another C# or VB.Net app may not always be the best approach. You may have a task you can accomplish with less code by using SQL Server Integration Services. Or maybe BizTalk might fit the bill.

All too often as programmers our first answer to any solution is to pull up Visual Studio and start grinding out code. Take some time though, to explore a few other options. There’s a rich set of tools out there, and sometimes the best solution to a programming problem may not be programming.

Arcane Tricks: Cut / Copy / Paste To and From Virtual PC

As you might guess from my various posts, I like using Virtual PC. It has one annoyance, you can’t cut / copy / paste between the Virtual PC and another machine, like the host operating system.

This is actually a good thing, as it’s a security feature. It allows you to test suspicious software safely, without fear of it damaging your host. There are times though, when you know it is safe to allow the cut / copy / paste connection between your Virtual PC and your host. It would be nice to have a switch or option that turns this on and off. Sadly, it’s not there.

There is a work around though. Back in December, I talked about the combination of Virtual PC and Remote Desktop. (https://arcanecode.wordpress.com/2006/12/06/arcane-combinations-virtual-pc-and-remote-desktop/ or http://shrinkster.com/mvq) . While VPC lacks the ability to cut / copy / paste, Remote Desktop does not. Using Remote Desktop you can cut, copy, and paste data from your host (or any other remotely controlled PC) to the Virtual PC you are controlling via Remote Desktop.

All you have to do is follow the instructions in the post mentioned above, and “remote” into the virtual machine. Yes, you will be remoting to a machine running on the same box, but all the remote desktop software sees is an IP address. It can’t tell if that IP is on the same host computer or one across the planet.

This little trick has saved me several times, and was one of those “doh!” moments when it first occurred to me. Even if you have been following along and using Remote Desktop with VPC, it may not have occurred to you to use it on the same machine.

Resources

Allowing Remote Desktop Access to Windows XP, Step by Step

Way back in October of last year (https://arcanecode.wordpress.com/2006/10/09/remote-desktop-connection/ or http://shrinkster.com/mvr) I wrote about using the Remote Desktop tool.

A few people have had problems accessing their desktops, so I thought I’d provide some step by step instructions on how to allow your computer to be access via Remote Desktop.

First, open Control Panel.Then, open the User Accounts.

Click “Change the way users log on or off” and uncheck “Use the Welcome screen”. Click Apply Options.

[Picture of User Acct Screen]

Click on your account, and make sure it has a password. If not, click “Create a password”, then create one.

Close out the user accounts, then close out Control Panel.

Right click on the “My Computer” icon, and pick Properties.

Select the “Remote” tab.

Check the box on that reads “Allow users to connect remotely to this computer”.

[Pic of System Properties Remote tab]

Click Apply and OK, and you should now be able to access your computer via Remote Desktop. Just follow my instructions in the post I mentioned at the beginning of the message and you should be in good shape!

Installing openSUSE 10.2 on Virtual PC Step by Step

My “Installing Ubuntu on VirtualPC Step by Step” post (https://arcanecode.wordpress.com/2006/12/19/installing-ubuntu-on-virtualpc-step-by-step/) continues to be one of the top read posts on my blog each day. I thought it was about time to look at another Linux distribution, openSUSE.

In November 2006 Microsoft and Novell announced a new initiative, stating they were collaborating on Linux / Windows interoperability. Read the full press release at http://www.microsoft.com/presspass/press/2006/nov06/11-02MSNovellPR.mspx or http://shrinkster.com/lwl.

In the spirit of collaboration, many of you may wish to explore openSUSE but may not have a spare machine to use it on. VirtualPC is the answer to your problem.

Before we begin, you’ll need to download a few components. First, you need Microsoft VirtualPC itself. http://www.microsoft.com/windows/virtualpc/default.mspx or http://shrinkster.com/lwm. I’m using the 2007 Beta RC1, but this should work with 2004 as well. Previously I’ve installed openSUSE 10.1 on VirtualPC 2004 with no problems.

Next you will need the openSUSE.distribution, http://en.opensuse.org/Welcome_to_openSUSE.org or http://shrinkster.com/lwn is the place to grab it.

Be warned OpenSUSE ISO image is quite large, you’ll be a while downloading it. You will probably want to burn it to a DVD. If you don’t have a DVD burner handy, you can also use the Microsoft Virtual CD tool (which will work for DVDs too). I blogged about it at https://arcanecode.wordpress.com/2006/09/13/.

A quick note, there are, as of this writing some issues with openSUSE 10.2 not recognizing the sound drivers with Virtual PC 2007 RC1. If sound is important to you, consider staying with Virtual PC 2004, or use openSUSE 10.1. As sound wasn’t that big of a deal, I used 10.2 and VPC 2007, but I’ve also installed 10.1 under VPC 2004 and my experience was almost identical to what I write about here.

Finally before you get started, spend a few minutes getting familiar with VirtualPC if you have not already done so. You can find my step by step instructions for VirtualPC at https://arcanecode.wordpress.com/2006/09/20/virtual-pc-step-by-step/. Keep it handy, at various points I will be referring to it.

Like now. In Step 1 of my VirtualPC Step by Step you are instructed to create a new machine, please do so. I’ve named mine “openSUSE”. In step 2, you are prompted for your OS. You will need to pick Other. In step 3, you are asked about Ram. openSUSE will run OK under 256 megs, however if you have the available space I’d highly 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.

The first thing you will see is the boot screen. Here it asks if you want to boot from the hard drive (you can’t as nothing’s installed yet on your virtual hard disk) or install in a variety of methods. Hit the down arrow so “Install” is highlighted and hit the Enter key.

[openSUSE 01]


The screen will turn blue, churn for a bit, then black with a little clock. Be patient, it’s working. Finally, you get to see a screen to begin your installation journey. On the first one, you get to select which language you want. Select your language of choice, and click next.

[openSUSE 02]


Next you are shown the license agreement. If you are hyped up on Jolt Cola and Double Espressos and need some sleep go ahead and read through it. Otherwise, click the “Yes I agree”, then click next.

[openSUSE 03]


Now you are asked what mode you are doing the install in. Since this is a fresh machine the only valid option is New Installation. If there had been an older version of openSUSE on the machine you would also have the upgrade option. For now, take the default of New Installation and click Next.

[openSUSE 04]


The openSUSE installer will now do some System Analysis. It will read over your system and produce you a list of what it’s going to install. It’ll take a minute or two, so be patient.

On the next screen you are asked about the Time Zone. Pick the time zone you live in and press next.

[openSUSE 05]


Now comes your first difficult decision. openSUSE wants you to pick a default desktop. Unlike Windows, Linux will let you pick from a variety of desktop shells. The desktop defines the look and feel of what you see as you interact with the computer.

If you are a Windows user, you might be more comfortable with the KDE desktop. It has a start bar and “K” menu across the bottom. On the other hand Gnome has something more akin to a look and feel from the Mac line. There are others out there, but these are the top two.

There’s one other item to take into consideration. If you intend to do any coding using Mono, you will need to use the Gnome desktop. The last time I checked, the majority of the Mono development tools were designed for the Gnome desktop. (I don’t claim to be a Mono expert, so if this is incorrect please feel free to leave an enlightening comment.) Mono, by the way, is the open source implementation of the Microsoft .Net Framework. Using Mono you can write C# code for a Linux environment.

Don’t stress over this too much. The nice thing about Linux is you can change your mind later, or you can try out a new desktop just to see what it’s like without making a permanent change to your default desktop.

Since one day I hope to dabble in Mono, I will pick the Gnome desktop and click Next.

[openSUSE 06]


OK, getting close. Now openSUSE will show you an installation summary, with everything it’s going to do and install. Give it a glance, and if you are happy with your options click Next.

[openSUSE 07]


This is where the folks at Novell like to play an April Fool joke, in that you only thought you were done with license agreements. In the 10.2 version I downloaded, I’m additionally asked to confirm the licenses for some Adobe product and the Flash player. I clicked OK on both.

[openSUSE 08]

[openSUSE 09]


OK, openSUSE asks you one last time if you are sure. We are (well at least I am) so click Install to begin the install.

[openSUSE 10]


Now sit back and wait. And wait. And wait some more. This thing takes a long time to install, for me the counter started at over 2 hours, although in the end it didn’t take that long.

First you’ll see some screens that talk about preparing your hard disk. Don’t worry, it’s the virtual disk it’s formatting, you’re safe. Finally you’ll see this screen as it begins the process.

[openSUSE 11]


Over to the right you’ll see the count down timer, and the center part will change during the install, giving you nice little tidbits and tricks. This would be a good time to refill your coffee, put some Jolt Cola on ice and order that pizza. You’ll be sitting here a while. (While you’re waiting might be a good time to explore some of my other posts, LOL.)

One real important thing: if your VirtualPC screen goes blank during the install, don’t freak out! Believe it or not, the screen saver is actually active during the install. All you have to do is click inside the VirtualPC window. The screen will then update to show you where it’s at in the install process.

After it’s finally done, it will tell you it’s going to reboot. Go ahead and let it, obviously. If you do nothing, the machine will reboot itself.

After the reboot you’ll see the same screen you saw when you first started, assuming you didn’t eject the openSUSE dvd. Pick the “Boot from Hard Disk” option, or if you do nothing it will take it as the default.

[openSUSE 12]


The next screen asks if you want the default of openSUSE 10.2, to boot off of Floppy, or the Failsafe mode for 10.2. Failsafe is kind of like Safe Mode under XP. Normally you’ll pick the openSUSE 10.2 option, which is what we will do now. (Doing nothing by the way will automatically select this.)

[openSUSE 13]


After the system finally gets done rebooting, there are some final installation steps that need to take place. First, you are taken to a screen and asked what you want the root user password to be. This is the master password for the system, you need this to install software or do any serious maintenance. Enter something secure, but easy to remember. Most of all don’t forget it, or your lovely Linux install will become severely handicapped. Enter your chosen password now, then click next.

[openSUSE 14]


Next you are prompted for a host name and domain name. Take the defaults and click Next.

[openSUSE 15]


In the next window you are asked about the network configuration. Be patient while openSUSE examines your virtual system. When done, just click Next to take the defaults it finds.

[openSUSE 16]


At the end of the network configuration, openSUSE wants to test your connection. Assuming you are connected to the web, leave Yes selected and click next to perform the test. Now, when I tried to do the test, it kept failing on me. I puzzled, fumed, changed things, but could find nothing wrong.

Finally, out of desperation, I clicked the Back button to return to the screen below, then told it to skip the test, and go on. By golly, it actually worked just fine! I guess the problem is on the Novell end, as openSUSE happily proceeded to download all sorts of online updates with no problems. Your experience may vary a little, but if you try the test and it fails, try using the Back button, tell it No, skip the test, and go on from there. I’m betting it’ll work OK for you too.

[openSUSE 17]


The online update is next, here openSUSE will try to download the latest patches and what-not for your system. You have the option to skip by picking No, but I would suggest you let it run so you can have all the latest security updates and bug fixes. (Note if you are not hooked to the internet, or were unable to get the networking to work, you will want to skip this step.)

As the first step in the updates, you are asked about additional installation sources. For now, take the defaults as shown and tell it Yes, to register the checked sources.

[openSUSE 18]


You will now see a series of update screens flash by as your system is updated from the internet. The screen will look something like this:

[openSUSE 19]

Just let it go, it will take a bit (especially if you have a slow connection). When it’s done openSUSE will automatically take you to the next area.


In this next area you are prompted for users. First, you are asked about the method for authenticating users. There are some nice options here, including the ability to check against a windows domain. For our purposes though, the default of Local (/etc/passwd) will do just fine, so click Next.

[openSUSE 20]


Next you are prompted for user info. Enter your name, what user name you’d like to have, and a password for that user. There’s also a checkbox for Automatic Login. If you will be the only one using this VirtualPC, you can leave this checked on.

On the other hand, if you will be sharing this VPC with friends, you may wish to uncheck this. When you do so openSUSE will request you to login each time. One last note, you will want to make your password different from the one you entered for the root user. It’s not a requirement, but it is a good idea. Once you have entered everything, click Next.

[openSUSE 21]


OK, now sit back and wait a few minutes, as openSUSE is going to finish setting up your user account, then is going to run some cleanup.

[openSUSE 22]


When the cleanup is done you are automatically shown the release notes. This describes changes and the like since the last version. Take a quick glance, and know that you can always pull these up later if you are in a hurry. Go ahead and click Next when you are done.

[openSUSE 23]


In this last step you are shown your hardware configuration and asked to confirm it’s what you want to use. While it’s examining your config your screen may switch back to a text display, then back to the graphical installer. This is normal behavior, just be aware of it.

When it’s done examining, you’ll be ready to click Next. Note one item, there have been some issues with openSUSE not detecting the sound card of Virtual PC 2007. If sound is extremely critical to you, consider sticking with either VPC 2004, or drop back to openSUSE 10.1.

I can wait for the sound issue to get fixed in a later patch, so I’ll be clicking Next at this point.

[openSUSE 24]


You’ve hit the finish line! You installation is complete, all you have to do now is click the Finish button.

[openSUSE 25]


When you do, openSUSE will complete a few tasks, then ‘reboot’ your virtual system. This will take a few minutes, and when done you are logged in and ready to use your openSUSE Virtual PC.

[openSUSE 26]


Click on the “Computer” icon in the lower left, to begin exploring your openSUSE installation.

[openSUSE 27]


To get up and running with openSUSE I’d recommend a good podcast to you called Linux Reality. Chess Griffin is the host, and did a great three part tutorial on openSUSE at these links:

Part 1: http://www.linuxreality.com/podcast/episode-16-suse-linux-101-part-1/

Or: http://shrinkster.com/lxh

Part2: http://www.linuxreality.com/podcast/episode-17-suse-linux-101-part-2/

Or: http://shrinkster.com/lxi

Part 3: http://www.linuxreality.com/podcast/episode-18-suse-linux-101-part-3/

Or: http://shrinkster.com/lxj

His original tutorial was for 10.1, so there may be a few minor differences but not enough to make a difference.

There’s also a support site for SUSE Linux you can find at http://wiki.suselinuxsupport.de/wikka.php?wakka=SuSELinuxSupport or http://shrinkster.com/lxk.

That’s about it, one final note. As I tell my kids, when you are done playing make sure to put away your toys. To shut down your Virtual PC openSUSE, just select Logout from the Computer menu, and it will give you a screen with the standard Logout, Shutdown, etc. menu options. Just pick Shutdown and you are free to go get that cup of coffee you’ve been waiting for.

Arcane Combinations: MaxiVista and UltraMon Tip

Two of my favorite Windows add-ins are MaxiVista and UltraMon. I’ve already blogged about each tool, https://arcanecode.wordpress.com/2006/08/30/9/ and https://arcanecode.wordpress.com/2006/09/06/multiple-monitors-made-even-easier/ respectively. When used together, they provide a great user experience, placing a task bar on each window.

I have discovered one issue when using the combo. My main computer is my big HP laptop. I also have my older desktop which has dual monitors, and my old IBM Thinkpad laptop which is handy for an e-mail monitor. I take these over from my laptop, using MaxiVista. When installed, MaxiVista sets up the HP Laptops internal monitor as #1, the desktop as monitors 2 and 3, and the Thinkpad as #4. I also have a big 21 inch monitor I hook to the HP Laptop, which becomes #5.

My problem arises when I don’t have the desktop turned on. UltraMon seems to check each monitor, and when it finds #2 is not on, it stops putting toolbars out. Very annoying. After a lot of searching I finally came upon a solution, and thought I’d share.

Right click on the UltraMon icon in the toolbar, and select Options… from the popup menu. Now click on the “Ignored Monitors” tab. Click on the monitor numbers that are not active, then check the “ignore this monitor” box.

[Picture of UltraMon Options]

 

 

 

 

 

 

 

 

 

 

 

 

There you go, just click on OK and your taskbar should appear. When you need activate the remote monitors, just open this and uncheck the “ignore…” option and you’re good to go!

Standard disclaimer, I don’t work for either company, nor make any money off sales, or receive any compensation. I just think they are some cool tools!

Ruler

While my life is busy being turned upside down by the SSIS scripts I’ve been testing, let me take this chance to fill you in on a cool new tool I found for Windows (I promise to get back to the SQL Server Compact Edition stuff soon!).

This tool is very cool, no matter what you happen to do for a living, be it a web designer, programmer, or even a housewife who loves graphics. It’s Ruler, it displays a simple ruler on the screen like so:

[Picture of Ruler]

Here you can see I’ve placed the ruler over yesterday’s blog entry. The ruler can be resized by simply holding the mouse cursor over the edge, clicking and dragging as you would resize a normal window.

Pressing the spacebar will flip the ruler from horizontal to vertical. Right click on the ruler to access the menu options. You can control the opacity, and set it to “Stay on Top” mode among other things.

It also supports “nudging” via the keyboard when you need to place or size it exactly. The arrow keys will move the ruler five pixels, CTRL+Arrow moves it one pixel, and CTRL+Shift+Arrow will resize the ruler.

This delightful little tool can be found for free at http://www.sliver.com/dotnet/Ruler/. You can even download the source, in case you want to add your own enhancements. It consists of 3 simple files that don’t even have to be installed, just unzip and place in a directory.

I love this thing, I have often wished I had a pixel ruler and this has found a permanent place in my toolbox. Kudos to Jeff Key (http://weblogs.asp.net/jkey/) for writing this gem.

Visual Studio Add-Ins: CodeRush

Every so often a software package comes along that drastically changes your life. Makes it easier, makes you more productive, and is fun to use. For me, that product was CodeRush.

CodeRush is a code authoring tool that works with both the 2003 and 2005 versions of Visual Studio .Net. Note I say code authoring, not code generating. With a code generator, you give it some input and it whirs and grinds and boom out comes a big hunk of code.

CodeRush on the other hand helps while you are writing code. For example, let’s do something like a C# switch statement. First, let’s see we have a parameter passed in named Switcher. I’ll set a local variable to it:

      int localSwitch = Switcher;

Next, I’ll copy the localSwitch variable to the clipboard. Now I’ll type in the word switch, and hit space. When I do, this is what you’ll see:

      switch (localSwitch)

      {

        case 0:

 

          break;

      }

CodeRush made the assumption since I had a variable already in the clipboard, that’s probably what I wanted to switch on. It then constructed the basic swich for me, including braces, my break and what you see above. It also placed my cursor right on the L in localSwitch with the variable highlighted, so that if it’s not what I wanted all I have to do is start typing.

That’s just one example, CodeRush has hundreds of built in templates that will make your coding faster. In addition, when you buy CodeRush you also get it’s sister product RefactorPro. RefactorPro makes that critical refactoring stage of development so much nicer.

Let’s take a tiny example. Suppose you need to change the order in which two parameters occur in a method. Not only will RefactorPro simply let you drag one parameter in front of the other, it will then search through your code and automatically update all references to the method for you.

There are way more features then I could cover in a single, or even a week’s worth of blog posts. Instead, I want you to go look at their training videos, which you will find here:

http://www.devexpress.com/Products/NET/IDETools/CodeRush/training.xml

or http://shrinkster.com/jx0

There’s no charge to watch, no special software, and they’ll give you a great idea on what CodeRush and RefactorPro can do for you.

For a complete product overview you can visit:

http://www.devexpress.com/Products/NET/IDETools/CodeRush/Index.xml

or http://shrinkster.com/jwz

If you asked me what could I name that was negative about the product, about the only thing I could point to is the price. At $250 (US) it’s not cheap. However this product has saved me so many hours it’s well worth the money. If you work for even a small company it shouldn’t be a great effort to get them to cover the cost.

If you asked me what the best thing was, I’d say the support. Developer Express runs it’s own news server, and the developers are right in there as often as they can, answering questions, and asking the users what features they want in the next release. I’ve never seen any company provide the level of support DevExpress does with this product.

The best part of all this is you can discover CodeRush for yourself, for free. You can look at the training videos and newsgroups, then download an evaluation version which you can run with no restrictions (it’s not crippleware). Last I checked they asked you to send an e-mail to their support staff and they’d send you the details.

CodeRush is a great tool that I can’t recommend enough. It has made me so much more productive, and with a minimal amount of effort I think you will be to.

Standard disclaimer, I don’t work for DevExpress, make no money off sales, or receive any compensation what so ever, I just think it’s a cool developer tool!

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:

https://arcanecode.wordpress.com/2007/01/09/

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.

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:
https://arcanecode.wordpress.com/2007/10/18/installing-ubuntu-710-under-virtual-pc-2007/


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.

Customizing Visual Studio – Shortcuts to Commands

One of the great things about Microsoft is the way all of their stuff is extensible. For years folks have been writing macros, add-ins for the office tools. In case you hadn’t noticed, Visual Studio is just as extensible as the rest of the Microsoft tools.

In this first article, we’ll look at making a shortcut to a handy VS command. First, we’ll need to fire up SlickEdit Gadgets Command Spy tool. What? You haven’t installed it yet? OK, go read my blog posting from November 14th (https://arcanecode.wordpress.com/2006/11/14/visual-studio-add-ins-slickedit-gadgets/ ). The rest of us will wait.

Back now? Great. OK, as I was saying fire up Command Spy. You’ll see it’s window appear, just slide it to an out of the way space, or dock it. In this example, we’ll want to create a shortcut toolbar to collapse and expand all of our code regions with one click.

There’s already a menu option to do this, click on Edit, Outlining, Collapse To Definitions. (Note if you don’t see the Outlining option, make sure you’ve clicked in the code window.) Glancing down at the Command Spy window, you will see that the command issued was Edit.CollapseToDefinitions.

[CommandSpy First Command]

Great, jot that down, and let’s run another command. Click on Edit, Outlining, Toggle All Outlining. You’ll see a new command has shown up in Command Spy.

[CommandSpy with Second Command]

Edit.ToggleAllOutlining is what we are looking for here. Now that we have the commands we want, let’s create a toolbar and hook them in.

Right click in the toolbar, and select Customize. In the Customize dialog, click on New. Give your toolbar a good name, it’s also helpful if you use something like your name to distinguish it from the rest of the built in bars. I named it ArcaneOutlining. You’ll see your new toolbar pop up to the right of the Customize window. (The red arrow is pointing at it.)

[Create a new Toolbar window]

I’m now going to drag the new toolbar under the Customize window, just so it will look decent for the next screen capture.

Now we need to drag our commands onto the toolbar. Click on the Commands tab of the Customize window. Under Categories, scroll down to Edit. Now in the Commands list area, scroll down to Outline Toggle All, and drag it onto the toolbar. Then, pick Outline Collapse to Definitions, and drag it into the toolbar. In this shot, you’ll see what it looks like when you’re done.

[Customize the toolbar window]

OK, we now have our commands, but all that text looks pretty ugly. Right click on the Outline Toggle All command, and you’ll get a menu. Click in the Name area, and you can type over the name of the menu option. I’m going to replace Outline Toggle All with + (a plus sign).

[Rename menu]

Once done, close the Customize dialog, then you can drag your toolbar to an appropriate spot. Use the – button to collapse everything, and the + to toggle it back.

[Picture of our new toolbar]

While I’ve picked out some specific commands, you can use this technique for any command that Visual Studio can produce, and create your own customized toolbars.

Visual Studio Add-Ins: VSFileFinder

If you tend to organize everything in your projects using file names, then you will love this add-in. VSFileFinder, available at http://www.zero-one-zero.com/vs/, adds a simple window to your Visual Studio environment. I elected to dock this window in the bottom center, where my output sits. There’s a text box across the top and a list box under it.

[Picture of VSFileFinder]

 

The text area lets you key in a file name (or part of one) to filter off of. The list area shows all the files in your project that match the entered filter. Clicking on a file will let you open it, or if already open will bring it to the foreground.

As you can see, entering “fo” matched all my Form1 files. Interestingly enough it also matched AssemblyInfo since it also contains “fo”.

That’s about it, VSFileFinder is a simple, one task tool that adds one specific type of functionality. But it does it well, and for free!

 

Visual Studio Add-Ins: Cool Commands 3.0

Update Feb. 9, 2008: Version 4 is now out, but there’s no new blog post. Follow the link below and scroll down through the comments to find the link to version 4.

Another handy add-in that brings functionality to the Solution Explorer is CoolCommands. Version 3 is available from http://weblogs.asp.net/gmilano/archive/2006/05/10/446010.aspx, and adds a whole series of new menu commands to the right click menu in the Solution Explorer window. It also adds a few new menu command to the Code Editor window. Since the site doesn’t do a great job of documenting all the features in the current release, here is a brief list of all the commands that get added.

Commands for the Code Editing Window

DemoFont – In the edit window, right clicking has a new menu option called DemoFont. This will let you quickly toggle back and forth to a larger size of the font you’ve been running. Clicking again will return you to the font size you previously had.

Wheel Font Zooming – My guess is this lets you use the mouse wheel to adjust the font size, but it didn’t work on my system. However the other commands are so useful I’m willing to overlook one dud.

Open File – This is very cool. Within comments you will sometimes see something like “// See the class file Xyz.cs for more info”. With cool commands, you simply right click on Xyz.cs and pick Open File, and that file will open in VS.

Commands for the Solution Explorer

Collapse All Project – Simple menu option to collapse all the projects in your Solution Explorer’s tree.

Command Prompt Here – Opens a command window in the directory where the project sits. (Only appears when clicking on a project).

Open Container Folder – Opens a Windows Explorer where the current file happens to reside.

Reference Manager – Lets you manage the references for the solution.

Resolve Project References – Validates all of your project references.

Copy and Paste References – Lets you create a reference for one project and paste it into another project. Makes setting up references between projects nice and easy.

Add Projects From Folder – Allows you to easily import one or more projects that are stored in a folder.

Commands for the open files tabs

Locate in Solution Explorer – This is cool, in the little tab markers at the top of the editing window, right click and pick this option. The solution explorer will then highlight the file for you.

One thing to note, technically CoolCommands is not an Add-In. While it adds new menu options, it cannot be loaded or unloaded from the Tools, Add-In Manager.

This free tool adds some nice functionality to your VS environment, and is well worth the download.