Browsing Posts published in June, 2007

My duties as a TechEd booth babe are now done – at least until next year. It was a fun, but exhausting, week and I was typically running on 3-4 hours sleep per night. It all started Sunday night with Party with Palermo. Jeffrey Palermo threw an awesome party again with 437 geeks in attendance at the Glo Lounge. Every party is bigger than the last. If he keeps this up, he’ll have to rent a conference centre next time!

I spent most of the week answering questions at the TLC Architecture booth with Peter Provost, Jeffrey Palermo, Don Smith, David Schmidt, and many others. There was a huge amount of interest in agile development techniques, including test-driven development (TDD), mocking, pairing, Scrum, Extreme Programming, and more. I also realized how dependent (in a good way) on ReSharper I’ve become. I was demonstrating some design techniques (specifically model-view-presenter) and grew so frustrated with vanilla Visual Studio installed on the kiosk, I grabbed my laptop and got down to some serious coding with the help of ReSharper. (Remember going from Notepad to Visual Studio and finding out how addictive IntelliCrack(TM) can be? Becoming proficient in ReSharper is an equally large step in productivity and going back is just painful.) Thanks to everyone who dropped by the booth to chat!

In addition to my booth babe duties, I led a Birds of a Feather session on Creating Flexible Software: TDD, Mocking, and Dependency Injection. The session was scheduled for 7:45pm Tuesday night, which made me a bit worried that I’d only get half-a-dozen people showing up. As it turned out, approximately 50 people turned up for a very lively discussion. There were many agile practitioners there, who generously shared their knowledge and experience. We had to wrap up the discussion after an hour because another group needed the room. The discussion moved into the hall with about a dozen people talking for another hour about experiences, tools, and techniques. It was great to see such enthusiasm from people about one of my favourite topics.

Next was Speaker Idol on Wednesday. What can I say other than complete flame-out on my part? I’m an experienced speaker and have spoken in front of crowds of 500+. Standing in front of a judging panel made me panic. My 5-minute talk was to explain the TDD-style development. I tried something crazy (a rhyming jingle about software development) to be different, but tripped up midway through and didn’t recover. It also turned into more of a rap than a rhyme, and everyone knows that white men can’t rap. Here is the full version meant to be said in the style Jenga, the 80s commercial:

Traditional Development Jenga

You take an object from the bottom and you put it on top,
You take an object from the middle and you put it on top.
That’s how you build your software; you just don’t stop.
You keep building that software putting objects on top.

It teeters and it totters, but you don’t give up;
it weebles and it wobbles, but you build it on up.
You take an object from the bottom and you put it on top,
you take an object from the middle and you put it on top,
till someone breaks the build, and that’s when you stop,
debug all night until you drop.

I wrapped (rapped) Confused it up with TDD Jenga, which went marginally better, though I rushed it:

TDD Jenga

You write a test and see a red glean,
You write some code and you make it go green,
Refactor that solution, that’s what I mean,
You are a TDD machine.

Commit that source to svn,
Cruise Control.NET kicks in,
Builds that software, tests it too,
You go home early ’cause now you’re through.

Needless to say, I didn’t make it to the finals. There were speakers more deserving than me. That evening, I drowned my sorrows/embarrassment with the judges at the Influencers Party. Hopefully one day I will live down the “Rapping Speaker” appellation that I seem to have earned from Stephen Forte.

On Thursday, Jeffrey and I met up with two members of the Microsoft Data Platform team to discuss the Entity Framework. Between that discussion and the one we had at the MVP Summit, the DP team is getting it. They understand what the “NHibernate Mafia” are trying to do with domain-driven design (DDD) and why EF has to be persistent ignorant (PI) if it is going to be useable for DDD the way that NHibernate is used today. Daniel Simmons, one of the EF architects, had a great post explaining his epiphany regarding our ask for PI in EF. Kudos to Daniel for taking the time to do some reading and understand why true DDD requires a persistence-ignorant object-relational mapper!

It was a busy and tiring week, but I’d do it all again. Feel free to live vicariously by browsing through the TechEd 2007 Flickr Set.

I spent some time troubleshooting a Subversion failure. I created a new repository using CreateSvnRepo.ps1 and successfully fetched the contents using TortoiseSVN. I added some files and then tried to commit the changes, but I got this highly cryptic error message:

Error: Commit failed (details follow): 
Error: Authorization failed 

The causes of this generic error are many and varied. So googling did not pinpoint the problem. I tried turning authorization off in the conf\svnserve.conf. Same result.

Now that was really odd. I turned off authorization, but authorization was still failing for writes. After a bit of head scratching, I noticed this:


Thank you Notepad2! The character encoding was set to Unicode and svnserve.exe was choking silently on the encoding. Without a readable svnserve.conf, it was using defaults, which allow anonymous reads, but not writes. That’s why I was able to fetch the repository, but not write to it. Switching the character encoding to ASCII solved the problem. Here is the offending line in the PowerShell script:

“[general]`r`nanon-access=none`r`npassword-db=../../passwd`r`nrealm=Default`r`n” > $repoConfigFile

Once I updated the command to specify the character encoding, everything was good for creating new repositories too.

“[general]`r`nanon-access=none`r`npassword-db=../../passwd`r`nrealm=Default`r`n” | Out-File -filePath $repoConfigFile -encoding ASCII

You can grab the updated version of CreateSvnRepo.ps1 here.

Let me wrap up by saying that I like Subversion, but its failure modes leave something to be desired. It would have been more helpful to fail with an unreadable svnserve.conf than ignoring the file and using defaults. Even better would be if it understood Unicode configuration files.

Having done this a few times before and always ending up scouring the documentation regarding exactly how to enable the options I need, I’m hereby committing it to long-term memory…

Subversion 1.4.0 and later support running Subversion directly as a Windows Service. This allows you to access your repository via TortoiseSVN, svn.exe, etc. using:


You can find information in the Subversion FAQ as well as a link to a document describing exactly how to set it up. There is no tool provided to configure the Windows Service. So you’re stuck using sc.exe, the Service Control command line tool, which ships with various versions of Windows. It is rather quirky, even for command line tools. Note that the name/value pairs are “Name=” followed by a space followed by “Value”. The equals sign is part of the name and won’t work if the equals sign is omitted or if you insert a space before the equals sign.*

Here’s how I typically configure Subversion to run as a service:

sc create <ServiceName> binPath= “\”<PathToSvnBin>\svnserve.exe\” –service -r <SrcRepoRoot>” DisplayName= “Subversion Service” depend= Tcpip start= auto obj= <Computer or Domain\ServiceAccount> password= <Password>


<ServiceName> is the name of the service (as used in commands such as net stop <ServiceName>).

<PathToSvnBin> is the fully-qualified path to svnservce.exe. N.B. You have to surround it with \” to escape the path if it contains spaces.

<SrcRepoRoot> is the fully-qualified path to the directory that contains all your repositories.

<ComputerOrDomain\ServiceAccount> is the user account under which you want to run the service. You need to include the computer or domain name (depending on if it’s a local or domain account, respectively).

For my environment, it ends up looking like this:

sc create svnserve binPath= “\”C:\Program Files\Subversion\bin\svnserve.exe\” –service -r c:\SrcRepos” DisplayName= “Subversion Service” depend= Tcpip start= auto obj= Server\SvnDaemon password= P@ssw0rd

I usually use a local computer account, SvnDaemon, for running my repositories. After creating the account, I remove it from the Users group. By removing the account from Users, no one can log in using that account and it also removes it from the main log-in screen in Windows XP and Vista. In Local Security Policy… Local Policies… User Rights Assignment…, grant SvnDaemon the “Log on as a service” privilege. Explicitly grant Full Control to c:\SrcRepos.

Last thing you need to do is punch a hole in your firewall to allow connections on the standard svn port, which is TCP 3690.

Now you can start the service via “net start svnserve”. Your firewall might prompt you to grant permission for svnserve.exe to listen on the Subversion port.

Time to test. Launch the TortoiseSVN RepoBrowser and enter “svn://server/RepoName”. You should be able to now browse your repository.

* Note that PowerShell doesn’t grok the “Name=” syntax. PowerShell tries to interpret it as some sort of assignment. I haven’t bothered digging in to find out how to instruct PowerShell to treat the “Name=” literally. In the meantime, it works just fine from cmd.exe. Confused