TFS Screencasts – Part 2 – Scrum For Team System Features

September 4th, 2008 by ryan No comments »

One of the things we are using here at SDS for our TFS installation and projects is the Scrum for Team System which provides a new Sharepoint Portal layout, Reporting Services reports and graphs, Work Item Templates, and an awesome Process Guidance reference

In this screencast, I try to point out some of these features and how to get to them.  It’s short (just over 2 minutes) and I’ll dive into each as we continue our storyline.

Shoutout to Camtasia which is sooo simple to use.

TFS Screencasts – Part 1 – Create a Team Project

August 27th, 2008 by ryan No comments »

One of the projects I’m working on for my company, Strategic Data Systems, is our internal Team Foundation Server 2008 solution.  I’m working with some of the guys who head up our Agile Development Center to make sure things fit well with what they are doing.  It’s been difficult to find overlapping free time, so I have started putting together screencasts to highlight our procedures and what I consider best-practices.  We’ve published written documentation internally, but these are so much more palatable.

These are geared toward our organization in content, but should be generally relevant to anyone interested in TFS.  This particular screencast walks through creating a Team Project and specifying permissions for implementing Scrum roles.

 Direct Link

p.s This is hosted, for free (as in beer), by Silverlight Streaming Services.  It took all of 20 seconds to sign up and 5 minutes to upload the video made with Camtasia.

Outlook 2007 does the little things

August 26th, 2008 by ryan 2 comments »

People give Microsoft Outlook a lot of crap, but if you’re willing to think outside the box, you’ll realize they did all the little things that make life easy.  For instance, I rarely use the calendar popup for creating new appointments.  No, if I have a meeting next Wednesday, I type “next wed” and hit tab.  It’s at 1pm, well, type 1 and hit tab.

Done.

New Appt. Screenshot

SQL Server 2000 vs 2005 Lazy XML Validation

August 19th, 2008 by ryan 1 comment »

Someone was looking to do quick-and-dirty validation of an Xml document inside a SQL Server procedure today.  I assumed, and regretted, that he meant 2005, which would have looked like this:

declare @xml1 xml 
declare @xml2 xml 
set @xml1 = ‘<Node1><Node2 attrib=”This is it.” /></Node1>’
set @xml2 = ‘<Node1><Node2 /></Node1>’
select Col.value(’count(./@attrib)’, ‘int’) as count
from @xml1.nodes(’Node1/Node2′) as Tbl(Col)

select Col.value(’count(./@attrib)’, ‘int’) as count
from @xml2.nodes(’Node1/Node2′) as Tbl(Col)

After being told, “that blows up”, I jogged the memory a bit and came up with this mess:

/* THE STUPID WAY */
DECLARE @hdoc int
DECLARE @doc1 varchar(MAX)
DECLARE @doc2 varchar(MAX)
set @doc1 = ‘<Node1><Node2 attrib=”This is it.” /></Node1>’
set @doc2 = ‘<Node1><Node2 /></Node1>’
/* DOC 1 */
EXEC sp_xml_preparedocument @hdoc OUTPUT, @doc1

IF EXISTS( SELECT    *
FROM       OPENXML (@hdoc, ‘/Node1/Node2/@attrib’,1)
            WITH (attrib  varchar(20)))
BEGIN
PRINT ‘Dumb ass’
END
exec sp_xml_removedocument @hdoc

/* DOC 2 */
EXEC sp_xml_preparedocument @hdoc OUTPUT, @doc2

IF EXISTS( SELECT    *
FROM       OPENXML (@hdoc, ‘/Node1/Node2/@attrib’,1)
            WITH (attrib  varchar(20)))
BEGIN
PRINT ‘Dumb ass’
END
exec sp_xml_removedocument @hdoc

 

Moral of the store?  UPGRADE!

Installation Guides

August 6th, 2008 by ryan 2 comments »

This evening I completed my first split-server (or dual server as it’s called in the guide) installation of Team Foundation Server 2008.  I’ve installed TFS a few times now in single-server mode which is pretty crazy easy when you consider what you get (way more than SVN or CVS by themselves).  Throughout the entire process I actually found myself RTFM step -by-step.  For all the grief that Microsoft receives, you have to give them a ton of credit for their manuals, guides, and walk-throughs.

Reason #29 for using Virtual Machines

August 6th, 2008 by ryan No comments »

Today I blew up a server.  Couldn’t figure something out so I pushed every button I could find, flipped every switch and changed every setting.  Nothing.  So you know what I did, I deleted it, copied over a new Sysprepped Hard Drive and had a clean slate in about 5 minutes.

I figured out my problem, by the way.

Why Plain Old LINQ is so powerful

July 31st, 2008 by ryan 1 comment »

Ian Griffiths posted a great example of how powerful and cool LINQ is when used in everyday code (it’s not all about databases people).

If you haven’t started to learn how to incorporate this awesome toolset into your daily coding life, you’re killing yourself.  No excuses.

Roadblock to Mocking Unit Tests

July 15th, 2008 by ryan 14 comments »

I’ve been a faithful unit tester for a few years now.  I may not do everything by the book (I think end-to-end unit tests are helpful), but I do get good coverage most of the time.  That said, I’ve found myself unable to use any of the Mock frameworks out there, because I don’t use your typical Dependency Injection pattern.  That is, I don’t like “building up” very freaking instance with all the “Provider” or “Service” interfaces I’m might need in the possible life of a business object.  Yes, if your Customer class is only going to create or save an Order, it feels OK, but my objects are busy dude, so I’d need the longest constructor of all time.

I prefer Dependency Resolution.  I don’t use any fancy framework, I just use a good old, DI.Resolve<IBusyBee>() and go about my business.  It works wonderfully, it’s light-weight (cause I don’t use configuration based DI frameworks), and it’s my baby.

That said, it’s also been the roadblock to my mocking foray.  That was, until I “got it” today.  Long story short, here’s how I roll:

Create a Mock DI Container…

Mock<IDIContainer> mockContainer = new Mock<IDIContainer>();

Create the Injected Mock instances…

Mock<INotificationManager> mockNotifMgr = newMock<INotificationManager>();
Mock<IRepository> mockRepository = newMock<IRepository>();

Tell the mock IDIContainer to return the mock instances when asked…

mockContainer.Expect(c => c.Resolve<INotificationManager>(null)).Returns(mockNotifMgr.Object);
mockContainer.Expect(c => c.Resolve<IRepository>(null)).Returns(mockRepository.Object);

Mock your heart out…

mockNotifMgr.Expect(mgr => mgr.NotifyEmailConfirmation(It.IsAny<Member>())).AtMostOnce();
Member.Register("username", "firstname", "lastname", "ryan@myus.com");

mockContainer.VerifyAll();
mockNotifMgr.VerifyAll();

I’m very happy to have finally jumped on the Moq bandwagon as it will certainly make some unit tests much easier to write.  Maybe I’ll even do the test first part more faithfully now. 

FYI, I use my own DI framework which is just a glorified HashTable.  It works for me and it is quick.  Moq has also become my Mock framework of choice for no good reason other than I downloaded it first.

Video Conferencing Code of Conduct

July 7th, 2008 by ryan No comments »

My team uses ooVoo for video conferencing our Daily Scrum.  It’s been great and very reliable.  My only complaint is a lack of whiteboard or desktop sharing, but we’ve overcome these obstacles with other tools (see SharedView).  Over the months, I’ve come to acquire an expectation of what the experience should be like and, from that, a Code of Conduct.  Here it is:

Don’t Be a Slob – Just cause you’re in your bedroom or PJ’s doesn’t mean I want to know about it.  Put a decent shirt on and brush your hair.  Same goes for yawning, coughing, and every other table manner.  Cover your mouth, mute the Mic, whatever.

Have a Headset – I’m sure some guy out there is ecstatic about the next step in the evolution of the speaker phone, but they still suck in comparison to a headset and Mic that are placed against their corresponding body part.  You’re laptop’s built in speaker and Mic are no better, so fork out the 10 bucks and get a cheap headset you cheap-arse.

Go Full or Go Home – I’m glad your torrents are racing, but your video looks like the corner of your head just entered the Atari zone.  Stop downloading the latest SUSE iso for a few minutes and give me your full bandwidth attention.

Setting up a Virtual PC Domain

July 7th, 2008 by ryan 4 comments »

I do a lot of demos and Virtual PC 2007 is a mainstay in my arsenal for those demos.  I’ve used VMWare Server (the free one) and it is very nice, but I run an x64 OS and VMWare had neglected to sign certain emulation drives which caused me enough headache that I ditched it for the easy of VPC. 

I mentioned using Syspreping for my VPC library prior which saves me a ton of time, but one of the things I’ve always started but never finished was setting up a Virtual Domain.  Well this weekend, I finished things up and I’m happy to say, it wasn’t that bad. 

Here’s what I did:

Create My Domain Controller Machine by copying a Syspreped Window 2008 Server harddrive image and creating a new Virtual PC using an existing hard drive.  About 120 seconds later I have a free standing vanilla server ready to roll.

imageConfigure Network Adapter(s) by specifying Local Only in the VPC’s Network Settings. 

At this point you’ll want to log into VPC if you haven’t already.  We’ll want to isolate our domain and let each of the workstation VPC’s communicate with the domain controller by going into the Network Adapter’s properties.  Our little domain network is going to be rather isolated.  To accomplish this, we will specify a specific Subnet and IP address range.  Here is what I’ve used for mine:

IP Range: 192.168.8.1 – 254 (where 192.168.8.1 is my domain controller IP)
Subnet Mask: 255.255.248.0
Gateway: 192.168.8.1 (DC/DNS server)
Primary DNS: 192.168.8.1 (DC/DNS server)

image Setting up Active Directory is a breeze if you do it the easy way.  Of course, I did it the easy way the last time.  (Note to self: when just learning, take the defaults).  Windows Server 2003 and 2008 have this concept of Roles.  A server can fill one or more roles which are the conglomeration of settings, services, etc to do something more abstract… like be a DC.  We are going to add the role Active Directory Domain Services.  

After the Add Role wizard does it’s thing, you actually “promote” the machine to a DC by running dcpromo.exe (Start, dcpromo, Enter).  This is where you make your selections, which in this case, I’ve chosen:

Create a new domain in a new forest
FQDN: vpc.com

You’ll want to let the machine also be a DNS server.  This is where I screwed up the first time.  Don’t get scared here, with our networking settings this domain we’re setting up won’t touch your corporate domain or anything crazy like that.

Let the Wizard do it’s thing and reboot when it is complete.

Your Active Directory Domain Controller is ready to roll.  Great job.

Adding Workstations is a matter of adding a Computer entry into the Active Directory Users and Computers console and then actually adding the computer to the domain.  You’ll find the AD Users and Computers MMC console in Administrative Tools.  Once you’ve added a computer entry, log into another VPC instance which has the same Network Adapter settings as above (different IP of course .2, .3, etc) and add the machine to the domain (vpc.com) in my case. 

imageHere’s a quick screen capture of my Network Adapter on the Workstation I added to the domain.

It’s great being able to demo Enterprise software this way or test things like integrated authentication for intranet applications.