Browsing Posts published in July, 2007

You’ve encountered a dreaded <Colour> Screen of Death (where Colour = Blue, Black, Yellow, Fuschia, etc.) or similar problem. After googling the error message, you come across a blog post (maybe one of mine) referring you to some Microsoft Knowledge Base Article for a hotfix. The good news is you’ve done all the legwork and you know exactly the hotfix you need. The bad news… hotfixes require you to call Microsoft Product Support (PS).

Now the folks in PS are really nice, helpful people. It’s not that I mind talking to them. It’s just that I have to go through the whole hotfix song-and-dance. Yes, I need the hotfix mentioned in KB 123456. Yes, I am experiencing the problems described in that KB article. Yes, I know that the hotfix hasn’t undergone rigorous testing in the way service packs do. Yes, I understand that the hotfix could cause unspeakable evil if used incorrectly.

No longer! You can now fill in this online form to receive the hotfix instead. Simply submit your country, the KB article number, platform (x86, x64, ia64), language, and email address. Then you’ll receive a download link via email within 8 business hours.

Let me freely admit that my main purpose for this blogpost is so that I can find the download link easily the next time I need a hotfix because Microsoft doesn’t place that link in any obvious place on the Microsoft Help and Support site. The only reason I found it is because of a link in the Daily Grind!

After my DNIC video interview, John just wanted to know more about agile development. So we did it again, this time podcast-style. You can check out the audio interview here.

Coming to Austin, TX… October 5-7, 2007… Brought to you by the NHibernate Mafia themselves… 3 days of ALT.NET mayhem… See behaviours twisted, tests tortured, dependencies injected, object-relations mapped, and DSLs like you’ve never seen them before…

More seriously, what exactly is ALT.NET? David Laribee coined the term to describe developers who look outside the “official gospel” for ideas of how to develop software better.

  1. You’re the type of developer who uses what works while keeping an eye out for a better way.
  2. You reach outside the mainstream to adopt the best of any community: Open Source, Agile, Java, Ruby, etc.
  3. You’re not content with the status quo. Things can always be better expressed, more elegant and simple, more mutable, higher quality, etc.
  4. You know tools are great, but they only take you so far. It’s the principles and knowledge that really matter. The best tools are those that embed the knowledge and encourage the principles (e.g. ReSharper.)

Scott Bellware has assembled an all-star organizing committee, including:

The conference will be run in an open space format, which is very agile in nature and execution. Fundamentally OpenSpace is a conference with self-organizing sessions. If you have an idea for a session, you post it on the schedule. If you see a session that interests you, you show up. If that session sparks an idea you’d like to talk about, post your new session on the schedule. Lather, rinse, repeat… This will be my first time participating in an OpenSpace conference, but I’m excited by the concept.

You can expect topics covering:

  • Software design
  • Testing strategies and continuous integration
  • Test-Driven Development (TDD)
  • Behaviour-Driven Development (BDD)
  • Domain-Driven Development (DDD)
  • Domain-specific languages (DSLs)
  • Object-relational mapping (OR/M) using NHibernate
  • Dependency injection with Castle Windsor
  • Web development with MonoRail
  • Agile team practices, such as XP and Scrum
  • Plus anything else that attendees want to discuss

The Important Stuff

Cost: FREE! (except for the cost of airfare and accommodations)
Location: St. Edwards University Professional Education Center, Austin, TX
Date: Friday, October 5th, 2007 @ 5pm to Sunday, October 8th, 2007 @ noon
Attendance: 100 (max)

If you are interested in attending the event or would like to know more, please don’t hesitate to contact me or one of the other organizers.

I was trying to connect to a TFS server in another domain, but without success. I could connect to the TFS web services through FireFox after providing the correct credentials, but Visual Studio was simply failing with a TF31002: Unable to connect to this Team foundation Server: tfs.


I wasn’t being prompted for alternate credentials when using Visual Studio, only when navigating to the TFS server (http://tfs:8080/services/v1.0/ServerStatus.asmx) through FireFox. Navigating to a network share (\\tfs) also prompted me for credentials and allowed me to see the shares. Only Visual Studio wasn’t prompting for credentials. I decided to try IE7 and received a 502: Bad Gateway error. Ah ha! A lead. Tools… Internet Options… Connections… LAN settings… Uncheck “Automatically detect settings”… OK… OK… Refresh IE and I’m prompted for credentials and can see the server status page. Woohoo! Now let’s try adding the TFS server again in Visual Studio:


Click OK and the moment of truth…


We have a credential prompt!!! Type in correct credentials for the other domain and…


Houston, the eagle has landed! Looks like automatic proxy detection somehow prevents IE and Visual Studio from connecting to TFS successfully. I would like to point out that “Automatic proxy detection is enabled” was not listed amongst the possible reasons for failure in the TF31002 error. Go figure.

Thanks to everyone for attending Simple Patterns for Simple Problems last week. Source code – before and after – can be found here.* The “after” source is where we left off. The additional Utility methods are left as an exercise for you, dear reader. If you have any suggestions on how to improve this presentation in the future, I would love to hear from you.

* I haven’t included NUnit in the zip file as that would have bloated the download. Once you unzip, simply copy NUnit-Net-2.0 2.2.8\bin to SimplePatternsForSimpleProblems-[Before|After]\tools\NUnit.

After my presentation yesterday on Simple Patterns for Simple Problems, John Bristowe, a fellow plumber (and closet agilist), interviewed me about agile development on the .NET platform. We talked about why developers should be interested in learning more about agile development techniques, including unit testing, TDD, code coverage, continuous integration, and more. Check it out: A Chat with James Kovacs on Agile Development.

UPDATE: One thing I forgot to note was that when I said most agile developers use Visual Studio and ReSharper, I should have qualified that with most agile developers [on the .NET/Windows platform] use Visual Studio and ReSharper, though I’m sure that was obvious. Java and Ruby developers don’t typically use Visual Studio. Tongue out

(via Raymond Chen)

What happens when you pit a Trojan Horse filled with a half-dozen Greek soldiers versus modern security guards? Watch and find out…

Of all the attempts, I found it most amusing that the history department had not learned its lesson from history, but the Turkish embassy didn’t fall for the ploy a second time.

(via Jean-Paul Boodhoo)

Manoj Khanna just created the Calgary Open Source Group specifically to foster the use of open source software in the Calgary market. Here is the group’s mandate:

“Calgary Open Source Group (COSG) is a forum that promotes the spread of Open Source Software and Free Software culture in Calgary. Through lively debate/talks, presentations and interactive network events, COSG aims to showcase the potential of open source software development and the impact it may have on software engineering for companies based in the oil city.”

Given the amount of open source software that I use in my day-to-day development and the fact that I often promote good open source tools in my presentations, I thought it only appropriate to join the group myself. So I’m member #3 right after Manoj and JP. I look forward to contributing to the community by promoting the adoption of open source tools where appropriate. Hopefully we can organize some presentations specifically around high quality open source tools for .NET development, especially for agile development. (Honestly, most of the great agile development tools – minus JetBrains ReSharper – come from the open source community.)

Jean-Paul Boodhoo and I will be presenting Simple Patterns for Simple Problems at the Calgary .NET User Group at noon on Thursday, July 19, 2007. Here’s the abstract:

Everyone has that little (or not so little) class called Utility that holds all kinds of interesting bits of business logic. It is a hodge-podge of code that you’re not sure where to put. This session will examine some common types of methods found in utility classes and how to refactor your design using simple patterns to eliminate these troublesome kitchen-sink classes.

330 – 5th Avenue SW, T2P 0L4
Calgary AB Canada
Conference Room CP1-1106
(the elevator will be open to the floor between 11:30 and 12:00 so no security pass will be required)

Food and beverages provided by Nexient.

Every time I need to set up a bunch of virtual machines, I have to go back and look up where to find the Sysprep tool and how to use it. Here are the details so I can find it in the future…

In case you haven’t encountered Sysprep before, it is a tool that allows you to create a base OS image (including Windows, Office, Visual Studio, or whatever other applications you want) and then re-package it. You can then create cloned disks (or just copy the whole thing) and when you boot the new disk, it is like booting Windows for the first time, except with all your software installed. You get to choose a new computer name, SIDs are regenerated, etc.

Each version of Windows requires the correct version of Sysprep. Where do you find the correct version of Sysprep? On your install disks in <DVD>:\Support\Tools\ Although System Preparation tool for Windows Server 2003 Service Pack 2 Deployment claims to install the Sysprep tool, I’ve never been able to make it work on my system. So don’t bother wasting your time. Go to your original install media and grab the file from there.

Creating the Sysprep Image

  1. Open <DVD>:\Support\Tools\ and extract setupcl.exe, setupmgr.exe, and sysprep.exe to C:\Sysprep. (N.B. C: is your system drive. If you installed Windows to another drive letter, use that drive letter rather than C:.)
  2. Run setupmgr.exe from C:\Sysprep.
  3. The Setup Manager wizard starts. Click Next…
  4. Create new… Next…
  5. Select “Sysprep setup”. Next…
  6. Select the correct OS version… Next…
  7. Select “No, do not fully automate the installation”… Next…
  8. Enter Name and Organization, Time Zone, Product Key, and Workgroup or Domain. The other settings can remain defaulted. Note that you don’t want to specify the computer name since you will be creating multiple computers from the base image and you don’t want to specify the admin password, even encrypted. If the sysprep program can extract the password from the answer file, so can any hacker worth their salt. Click Next… through to the end.
  9. Finish… Save to C:\Sysprep\sysprep.inf. OK…
  10. Wait while Setup Manager finishes. Cancel… (Yes, odd way to exit a program that has completed successfully.)
  11. Run sysprep.exe.
  12. Click OK.
  13. Ensure that “Don’t regenerate security identifiers” is UNCHECKED. You want to regenerate the SIDs when each new clone boots.
  14. Click Reseal, OK to confirm that you want to regenerate SIDs, and wait for the system to shut down.

Creating a Cloned Server

  1. If you’re using VMWare Workstation, create a linked clone of your Sysprepped server. (You can also create a new linked disk using VirtualPC using File… Virtual Disk Wizard and then creating a new VM using the linked disk.)
  2. Change any VM settings such as memory. DO NOT change number of processors from 1 to 2 as the HAL (hardware abstraction layer) for uni-processor vs. multi-processor Windows is different. Your system will blue screen if you do this.
  3. Boot the cloned server.
  4. The Windows Setup wizard will appear. Next…
  5. Accept the license agreement. Next…
  6. Enter a new computer name and administrator password. Next…
  7. Windows will boot and you can log in with the administrator password you just entered.
  8. When prompted, click “Yes” to update your product activation.
  9. Select “Yes, let’s activate Windows over the Internet now”. Next…
  10. Select “No, I don’t want to register now; let’s just activate Windows”. Next…
  11. OK…
  12. Update this server… to go to Microsoft Update.
  13. Once you’re ensured that your patches are up-to-date, you can close the browser and click Finish… then Yes… on the dialog to start using Windows.

You should now have a fresh copy of Windows. You can create as many cloned servers as you need for your mini-network.