Rants, rambles, news and notes from another geek

TechEd: Unit Testing and the SDLC

Barry Gervin hosted this BoF. It was originally scheduled to be at the same time as my Continuous Integration BoF, but Jim Newkirk suggested that we work to reschedule and Barry graciously asked to have his moved.

Having Jim involved was very nice. As the original creator of NUnit, Jim is basically the #1 guru of Test-Driven Development in .NET. Jim helped provide some excellent advice to the community around unit testing. One of my favorite things about Jim is how pragmatic he is. Everything he says is grounded in a very pragmatic approach that basically asks, “Do you have to do that?” This is the essense of the XP principle “Do the simplest thing that could possibly work.”

One of the things that Jim brought up, that he also brought up when he spoke at the XP Denver user group meeting, is Brian Marick’s four quadrants of testing. When we talk about Unit Testing, he reminded the group, we are talking about programming tests against the technology, not user interface testing, not performance testing, not scalability testing, etc.

All in all it was a good chat. I hope some of these people come to my continuous integration tool.

Tech Ed: Code Generation BoF

So I’m sitting here in Scott Hanselman’s BoF about Code Generation and it is hard to type and even harder to pay attention because I keep laughing. Scott is a wonderfully fully presenter and his interaction with the audience is stellar.

We talked about a variety of code generation techniques… CodeDOM, GenX, XML, CodeSmith, etc.

There was a huge discussion led by John Lam about why he doesn’t like XML. He generally felt that there was a significant “angle bracket” tax on the maintenance and production of XML. He felt that customized languages and parsers were better.

From there the discussion went into some interesting lands. Some people felt that John was leading us to a good place. Others felt that this was just going back to the 80’s. There wasn’t a whole lot of consensus but it was a fun and lively discussion.

TechEd: Fun on Sunday

My wife came along with me on this trip. We have a two year old at home and are expecting another in July, so I told her to come with me as a break before we head into life with two children.

She came with me to the registration this afternoon and said some of the funniest things I’ve ever heard at a tech conference…

“If I were single, I could get some serious ass here.”

That one really broke me up. Then later she said this…

“Make over shows could kill it here.”

Man, that is some funny shit.

Since I’m here on Microsoft’s dime this time (working the Arch cabana), I had to attend a “staff training” meeting. Generally good stuff, but also pretty straightforward communication and sales stuff. Not all that exciting.

On my way in I ran into Rory Blyth and Carl Franklin from .NET Rocks. While I was chatting with them, Harry Pierson and Sandy Khaund showed up. It was good to see all of them.

Earlier today someone asked me. “Are you going to Rory’s Non-Influencer Party tonight?” They were talking about the Coding Slave get together, but I thought the name was funny. When I told Rory about he laughed too.

Tonight looks like it will be the busiest night of the trip. I am planning to attend the Architects Road Rally, the Unit Testing BoF and the Code Generation BoF. It will be fun to try to get all of that done at the same time.

Gotta go…

TechEd: Code Generation BoF - Get Free Stuff

If you are here and aren’t busy, you need to come to the Code Generation BoF hosted by Scott Hanselman at 7:00pm.

If you come you will get a FREE COPY OF CODESMITH PRO!

There. If that doesn’t convince you, nothing will.

For more information, see Scott’s post on the topic.

TechEd: Off to San Diego

We’re out of here. I’m taking the 5:05pm flight from Denver to San Diego. You can get me on any of the following IM networks: I’ll try to be online as much as possible during the week. If it is anything like PDC, the only problem will be finding power in the session rooms, not network connectivity.

  • MSN:├é peter at nospam provost dot org├é (remove the nospam)
  • AIM: PeterPro69
  • ICQ: 1156001
  • Yahoo: pprovost

As I mentioned before I will be working the Architecture cabana as part of my MVP duties. Here is my schedule for that as far as I know:

  • Monday 1:45-3:15pm
  • Tuesday 2:00-3:00pm
  • Wednesday Noon-2:00pm
  • Thursday 3:00-4:00pm

Please come say hi if you’re in the neighborhood. I don’t know exactly where the cabanas are, but you should be able to find them.

Â

See you there!

NUnit 2.2 Beta 1

The NUnit team has released the first beta of the fourth major release of NUnit. I’ve been playing around with the source tip of this version for a couple of weeks and it is cool:

  • Assert.AreEqual now supports comparing arrays
  • CategoryAttribute allows you to group tests into logical categories like “FastTests” or “SlowTests”
  • ExplicitAttribute allows you to say that a test should only be run when explicitly indicated by the user
  • NUnit GUI now has checkboxes so you can select specific tests to run
  • Comes with a built-in, lightweight Mock Object facility
  • Mono support

You can download the beta here.

Geek Notes 2004-05-21

So tomorrow I leave for San Diego and Tech Ed 2004. Should be a blast. As I did for PDC, here is a picture of me… if you see me, grab me and say hi. Or ping me on MSN IM… I am peter at provost dot org.

I spent way too much time today dealing with hoteling problems for the trip. Ugh. What a pain in the ass. But it looks as though I’ve got it worked out. Except for Saturday night I will be at the Airport Hilton with a number of other Interlinkers. Anyone else staying there? Do you know if we will have bus service? The TechEd website says no, but the travel people on the phone said yes. Guess I’ll find out when I get there.

Also, I’ve got a nice CruiseControl.NET demo setup for my BoF on Tuesday night. Should be fun. Please come. Here are a few links to make this a right and proper issue of Geek Notes.

  • YouSendIt.com - When you have a fat attachment that you can’t send via email, these guys will let you post it for free. I wonder what they get out of it? (Besides an opportunity to read everyone’s attachments.)
  • Scott’s TechEd List - Scott Hanselman posts his list of the TechEd sessions he thinks you should attend.
  • Weather Takes Out Debit Cards - The guys over at “This is Broken” find the funniest stuff…

A little while ago I got an IM from Marcie asking, “So are you going to come BOF the Datagrid Girl?” I almost fell out of my chair! I don’t think Eli would like that.

Remove Unused Printer Ports

When I’m travelling around visiting clients, I often end up connecting to one of their local printers by creating my own TCP/IP printer port. But after a while, you end up with all of these damn ports and no way to get rid of them (that I could find).

Google to the rescue! I found this page on TechNet that had the following script on it. Works like a charm!

Set objDictionary = CreateObject("Scripting.Dictionary")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colPrinters =  objWMIService.ExecQuery _
    ("Select * from Win32_Printer")
For Each objPrinter in colPrinters 
    objDictionary.Add objPrinter.PortName, objPrinter.PortName
Next
Set colPorts = objWMIService.ExecQuery _
    ("Select * from Win32_TCPIPPrinterPort")
For Each objPort in colPorts
    If objDictionary.Exists(objPort.Name) Then
    Else
        ObjPort.Delete_    'Yes that underscore matters!
    End If
Next

Software Development Karate Belts

Today Kris and I were talking about comments. He used to believe that making your development teams write lots of comments in the code produced a better end product, while I felt that all the comments meant either:

The code isn’t clear enough and needs to be refactored.

Or

The comment is in the way of perfectly clear code and makes it harder to read.

Well, Kris is starting to come around to my way of thinking. Today he used this metaphor…

It reminds me of the test cards for color blindness…

“What does the code say?”

“Huh? I can’t see any code.”

What he is saying, of course, is that when all of the comments are there, (including the ‘XML’ comments at the top of the method) they often get in the way of the code. If&nbsp_place_holder;the code&nbsp_place_holder;is written clearly enough, you shouldn’t need the comments.

Another way that I like to explain it is:

Comments should answer the why question and not the what or how question.

So I wouldn’t say that comments are a code smell per se, but they are, as Martin Fowler said, “often used a deodorant.”

And that brings me to the real point of this post. I think we should have belt levels&nbsp_place_holder;like karate (White, Yellow, Orange, Green, Blue, Brown, Black) or Cub Scout ranks (Bobcat, Wolf, Bear Webelos, Arrow of Light). Only when you have reached a certain level are you allowed to do certain things.

Like it or not, the open-source community has had something like this for a long time. You can’t just join an OSS project and expect to get commit rights to the repository. You have to prove yourself but participating in the community, submitting bugs and (more importantly) fixes. In effect, you have to prove yourself.

I’m thinking of something like this (I’m just picking on comments and source commits, but there are many many other activities that would be controlled this way.)

  • If you are a white belt, you can write code and send it in, but you don’t get commit rights.
  • Yellow belts can commit code that has been reviewed by someone else to the repository but they still have to comment their code
  • Orange belts can commit without review, but they still have to comment
  • Green belts don’t have to comment their code
  • Etc…

I know that the various certification programs are trying to set a baseline for skillsets, but really we are talking about a different thing here. I’m talking about a progression of skills from the bottom (we don’t know who you are and probably don’t trust you to touch our code) to the top (you are a god… do what you will).

&nbsp_place_holder;