Thursday, March 06, 2008

Replace Visual Studio Command Prompt with Powershell

I've been using sqlmetal a lot lately.  The easiest way to use it is through the Visual Studio Command Prompt.  In my case, I'm using the Visual Studio 2008(9.0) command prompt.  The PowerShell lover in me hated the fact that I had to go to another shell to do this.  After a brief inquiry, the all great Google led me to this excellent post by Robert Anderson which explains how to edit your PowerShell profile to correctly set all the environment variables used by the Visual Studio 2005 command prompt.  I've made a few tweaks for Visual Studio 2008 and am re-posting it for your enjoyment.

Just add the code below to your profile.

#Set environment variables for Visual Studio Command Prompt
pushd 'C:\Program Files\Microsoft Visual Studio 9.0\vc'
cmd /c “vcvarsall.bat&set” |
foreach {
if ($_ -match “=”) {
$v = $_.split(“=”); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
write-host "`nVisual Studio 2008 Command Prompt variables set." -ForegroundColor Yellow

Tweak Vista's Search Index

I'm not sure how I did anything on XP before I started using app launchers.  My first was Colibri, but then I found my true love, Launchy.  It's so liberating not to have to click the start menu(press ctrl+esc or win key), then find programs(press p) and then search through a gigantic list of stuff for what you want.  With Launchy, you just hit your short cut key and start typing in what you want. 

Vista's start menu comes with a similar search box that let's you type in what you want.  I think that they threw this in because actually going to Programs and looking for what you want is a hideous experience in Vista.  I keep all my applications that don't require an installation in a separate folder named "Programs".  Vista doesn't search this folder by default, so I had to modify the settings for the start menu... no, no... that's not it.  Maybe it's the user preferences... no, that's not it either.  Oh there it is, in the indexing service.

In the Vista search box type "index" and it should find "Indexing Options".  Inside Indexing Options click the Modify button to specify which folders to index.  I actually turned off a few that I didn't care about.  Things like other user's folders, and Outlook.  You can actually disable the service all together if you want to get a slight performance boost, but I like the search bar too much to kill it. 

For those of you who are keyboard bound like me, might I also suggest using SlimKeys in conjunction with the Vista search.  SlimKeys comes with an app launcher, but I disabled it.  I am using it's hotkey manager, window positioner/sizer, volume controller, screen grabber and it's format removing paster.  I highly recommend checking it out just for the window positioner/sizer.  It's great to be able to move a window to any corner, or center it or maximize it and even move it to my other monitor with a single keystroke.

Tuesday, March 04, 2008

Isilon Training: Day Two

Today we went through a lot of demos and labs.  The most impressive was the "Upgrade" demo.  We had a test cluster that was a version behind.  The instructor dropped a tar file on one of the nodes, ran an upgrade command from the command line and a couple of minutes later... BAM!  All three nodes in the cluster were updated with no down time.  The only instance where the nodes would have to be rebooted is when there is a change to the kernel.  They have a service that migrates the change to the other nodes so you don't have to. 

All in all it was really cool and I can't wait to get to play with ours.  If they give me access. :)

Isilon Training: Day One

I spent yesterday in a training class for the Isilon system that we use at work.  Isilon offers a clustered storage solution that is quite impressive both in its performance and its implementation.  I know that you can go the web site and look at all the specs, but I thought I would take some time and share the things that jumped out at me during the first day of training.

First off, I experienced a slight culture shock when they started talking about capacities.  Speaking from a developer's perspective, I'm used to talking Megabytes when referring to my applications and possibly Gigabytes when talking about data storage.  These guys talk Terabytes and Petabytes.  Imagine what you could do with a petabyte of code.  I think Skynet became self aware right around 1.3 petabytes.

Now as you can imagine its pretty hard to manage that much data.  The mainstream file systems just won't cut it, so they wrote their own.  They based their OneFS file system and OS on FreeBSD.  Each node in the cluster runs the OS and communicates with the other nodes so that each node knows what the other nodes have and are doing.  This way, there isn't a single controller unit.  Any node could go down completely and the system will continue to run without a hiccup.  It also makes it easier to add expansion nodes.  You can easily add several terabytes of new storage to the system in approximately 60 seconds.

One of the coolest decisions that they made was to stripe files across nodes and not across disks(most nodes have 12 disks).  This provides the highest level of data protection in the event of a failure. 

In today's class, we'll be looking at some troubleshooting exercises and hands on labs.  Should be fun.