February 27, 2007

Open Command Prompt Here in Vista

One of the small items I have been missing (until now) is Open Command Prompt Here in Vista.

In WinXP it was a Power Toy you could download from Microsoft. But that is not supported in Vista.

Turns out that "Open Command Prompt Here" is built into Vista -- I just didn't know it.

So here is how you get it. In windows explorer (WIN-e or what ever other method you use), right click in the files area on the right -- but not on a file, but you can click on a folder.

Then there it is: Open Command Prompt Here.

One of my coworkers just told me about this, you can find more information on this site:
http://blogs.msdn.com/tims/archive/2006/09/18/windows-vista-secret-1-open-command-prompt-here.aspx

February 23, 2007

Playing with Generics

I've been meaning to play with Generics more for a long time now. I finally have the chance.

As part of a new project we are working on we are using the Generic List class all over the place.

A common usage is to store a Contact class. It has the standard stuff: first name, last name, address, bank account, gun locations, caliber of gun, etc.

Now we want to sort them by by weird criteria like amount of money in house, number of guns, and caliber. (note to self: I should also save amount of ammo) Or see if a contact exists with no guns at all. Very standard stuff.

So, in the List class there are now Predicates for both the Find and Exists methods. Using Predicates and anonymous delegates you can pass custom code into the Find method. Essencially telling the Find method how to find something.

So it would look like this:

Contact found = currContacts.Find(
delegate(Contact c)
{
// has no guns and more than 5 dollars
if ((c.Gun.Count == 0) && (c.NetWorth > 5.0)
return true;
else
return false;
});

But for something more likely, and powerful. Say you are moving new items to list of existing items. Say I have a list of new contacts, but first I have to figure out if the contact doesn't already exist. To do this you have to find contacts with the same first name and last name.

List currContacts = GetAllContacts();

foreach(Contact newContact in contactList)
{
Contact found = currContacts.Find(
delegate(Contact c)
{
if ((c.FirstName == newContact.FirstName)
&& (c.LastName == newContact.LastName)
return true;
else
return false;
});

if (found != null)
{
currContact.Add(newContact);
}
}


Finally, I've been looking into Generic methods. You can have a single method in a class that uses generics, without making any changes to any other part of the class. Very cool! Here is an example:

public T MaxValue(T currentValue, T newValue)
{
if ((currentValue > newValue)
return currentValue ;
else
return newValue;
}

This is making much of my life much simpler.

February 21, 2007

Install issues with SQL Server 2005 on Vista

OK, first off, SQL Server 2005 does run just fine on Vista (as far as I can tell right now at this particular time)

But...at work we all just got new Dell laptops with Vista Business Edition installed (from what I hear you can't even order a laptop with WinXP on it anymore).

Anyway, we went out to install our standard set of software: Visual Studio.NET 2005, SQL Server 2005, etc; and SQL Server 2005 will NOT install.

The culprit: Microsoft Office Web Components 2003. You need to uninstall the Web Components to be able to install SQL Server 2005. Don't worry if you need them, SQL Server 2005's install reinstalls them.

BTW: if you do need the Office Web Components, you need to stop. Microsoft is dropping support for them. Eventually.

Snow?

Figures. 4 days ago (Saturday) it was sunny and 70 degrees. This morning (Wednesday) I wake up to 2 inches of snow.

This will make for a fun commute.

Well, it is February.

February 13, 2007

Boise Code Camp 2.0: Post Mortem

It is finished. Now I don't expect a tearing of the cloth, but I do believe I hear angels singing. With a sign of relief I can now say Boise Code Camp 2.0 is over. Long live Boise Code Camp 3.0.

Overall, it went really well. At least I thought so.

* 215 people showed up. Not bad for a city the size of Boise.
* We had enough room for everyone -- thank you many times over Boise State University.
* We had enough pizza for everyone without a lot of left overs.
* Pizza was catered by the university, so they brought it in, set it up, and took it away. Nuf said.
* Plenty of sessions. We had 38 at last count. Pretty good for a one day event.
* All of the speakers had working laptops.
* Dinner was a little late...but not too bad.
* The sponsors were very happy with the turn out.
* I got to play RoboRally at the dinner.

Problems:
* We had one problem room where lights and projects all got poltergeist for a few sessions at the end (sorry to everyone at Martin Danner's presentation on VSTS Unit testing session -- we are going to try to do that again at a NetDug). But it was really funny when the lights would spontaneously turn off every time Doug Seven talked during the Software Quality panel.
* We still had a few scheduling problems. They did not go unnoticed. I believe all of the security sessions were at the end of the day.
* When doing the final raffle my dyslexia finally kicked in and I read a number backwards (I said 201 when it was 102). But all was well in the end, 201 was called for one of the grand prizes.

And my one session when well. Beginning MDX (an SQL like language for OLAP). I talked right to the end without going over, so that was good. But I didn't leave much time for questions at the end either.

Things I would like to change for next time:
* Get the wives involved earlier. Especially David Star's wife Eleanor. Lets just say she stepped in just in time. There is something about geek (or just men in general) that had organizing things. We would rather play with toys and talk. We need her, and Dawn McKeeth, again to pull this off well, and the sooner the better.

* Have it in March. We moved everything up to February this year. That was a minor mistake. But basically, nobody took it seriously until after New Year (actually, second week of January). And another month would have saved me a bit of stress.

* The web site. I'm going to burn the old one. We were better off with WordPress from last year. Problem was, while everyone was asking me for help with the web site, I couldn't do anything about it. For example, you had to be logged onto the machine to get a count of people who signed up. And WAY too many people put in tracks when the meant to put in a session.

* More non-Microsoft specific sessions. I'm not trying to knock Microsoft here (I've make my living off of Microsoft since 1997), but there are alternatives out there that have good market share and are worth learning. For example: Java, Ruby, Python, PHP, ColdFusion, Perl, Delphi,... All good technologies.

* Lastly, to give at least one non-Business Intelligence related talk. People are beginning to think that is all I do.