Monthly Archive for: ‘November, 2008’

Team Foundation Server Build Notification Tool

1

I’m currently enjoying setting up a Greenfield implementation of Team Foundation Server 2008 for a new client, and getting the development and test teams up to speed on TFVC, work item tracking, continuous integration, and all that groovy agile stuff that Team System make so easy.

After six months away from TFS, it’s nice to get reacquainted with my old friend, and realise that the product has come a long way since the original 2005 release.

I’m delighted to see that MS have continued their tradition of releasing frequent enhancements as a pack of downloadable “Power Tools”, one of the coolest of which is the Build Notification Tool.

When running, an icon will appear in your system tray which looks something like this (the symbol within the circle will differ depending on the current status of the builds being monitored):

tfs1

Right-clicking on the icon and selecting options allows you to specify the builds and the events in which you’re interested:

tfs2

Having done that, you’ll get toast popping up above your system tray when any of the specified events occur. Also, the icon changes accordingly.

Here’s what it looks like when a build starts. Note the hyperlink to stop the build if desired:

tfs3

When a build is successful, the toast includes hyperlinks to view the associated work items, or open the build drop location:

tfs4

If When a build breaks, the toast includes a hyperlink to the associated changesets, and the icon turns into a red cross:

tfs5

At any time, you can right-click on the Build Notification icon and select “View Build Status” to get a summary of the current status of all the builds in which you’ve expressed interest:

tfs6

It really is quite neat, and I prefer this approach to subscribing to the automated build event emails, which I tend to overlook.

Huge TVs a Huge Waste of Money?

1

From the Amazon.co.uk Associates Blog, something to bear in mind if you’re considering buying a gigantic TV for Christmas:

“It’s easy for your customers to get drawn in by larger screens at bigger prices, but bear in mind that eight feet is the minimum recommended viewing distance for a screen of 32 inches, which is about the maximum the average living room can accommodate. 40-inch-plus screens may be nice for keeping up with the neighbours, but the viewing experience will be inferior if sitting too close. The other advantage of sticking to 32 inches is the resolution. At this size there is no visible difference between 720p and 1080p whatsoever; if your customers are forking out for 1080p on anything less than a 40-inch screen, they are throwing their money down the drain no matter how many sales people tell them otherwise!”

Performance of Loops on Collections

0

Interesting article from Patrick Smacchia (the NDepend guy) in which he runs some benchmarks on the cost of looping in different ways over different constructs and comes to the conclusion that:

“looping on array using for is 5 times cheaper than looping on List<T> using foreach (which I believe, is what we all do)”

Well worth a read, although I suspect that in my solutions the bottlenecks will remain the out-of-process calls, i.e. database access and web service calls. Still, a 5x gain is not to be sniffed at.

Patrick Smacchia – An easy and efficient way to improve .NET code performance.

Choreographer of a Dance of Code

0

Uncle Bob Martin on Dot Net Rocks:

“The programmer becomes this choreographer of a dance of code as it’s flinging around the system, becoming better organised and better strucutred…”

Awesome. I’m gonna stick that on my CV…

Coolest EULA Ever

0

I’ve just installed the very useful HashTab shell extension, and laughed out loud when I saw the licence agreement:

HashTab

VB.NET to C# Converter

0

Just when I thought I’d seen it all, I’ve encountered a mutant web project containing a mixture of VB and C# pages. I kid you not.

This online converter from DeveloperFusion is proving invaluable for sorting out this abomination. It’s not perfect, but it cuts out a huge amount of busywork.

Versioning Databases

2

IM received this morning:

Morning young man. Do you know of anywhere that I can get hold of best practices for stored procedure source control?

My response was to recommend checking out the series of articles on this subject by K. Scott Allen. They’re in my del.icio.us bookmarks at http://delicious.com/ianfnelson/databases+alm

For .NET developers with MSDN premium licenses, achieving this through the use of Visual Studio 2008 Team System for Database Professionals is the obvious way to go. Since the start of October, this Team System SKU has been available to anyone with the Team System for Developers SKU (see Soma’s post). An updated, General Distribution Release, is due for release soon, and as usual GertD has been blogging frequently about the forthcoming enhancements.

Alternatively, I know of people who swear by Red Gate Software’s SQL Toolbelt suite, in particular the SQL Compare tool, which is available from just £245.

Exception Handling Worst Practices

1

Oh, my eyes! I’m currently looking at a VB.NET class which includes a dozen examples of the following exception "handling" anti-pattern:

'Send e-mail
Try
Dim smtp As New SmtpClient()
smtp.Send(message)
Catch ex As Exception
ThrowException(ex)
End Try

Why would anyone write code like this?!

This violates some of the most fundamental of best practices to be followed when writing exception handling code, including:

  • Not catching System.Exception (which should really only be caught in one place per thread, at the top of your stack).
  • Not throwing System.Exception (instead of an appropriate custom exception class).
  • Not catching exceptions that you can’t handle (if the best you can do is rethrow the exception like a hot potato, then why bother? Just let it bubble up).
  • Clearing the stack trace when rethrowing (in the example above, a new exception is thrown, with a cleared stack trace. Valuable debugging information has been lost).

I can only assume that the original author of this code didn’t understand the concept of exception handling whatsoever.

Still, this is all easily solved by me and my trusty Delete key :-)

Bull or Bear?

2

Two articles, both published today in two of the world’s most august organs, each reaching dramatically different conclusions on the prospective state of the British economy and the implications of the recent drop in the value of sterling:

International Herald Tribune – “Britain, like Iceland, in big trouble”

The Times – “Pound’s fall may herald recovery not doom”

On days like today it strikes me that economists can use “the facts” to reach whatever conclusions they choose! Although having said that, I do respect Anatole Kaletsky’s work, and he was spot on in predicting that the the UK government would be forced to offer to take stakes in all banks bar HSBC. So, I hope he’s right on this one too.

Strange Surname of the Day

1

Looking through a database today, I noticed a person record containing a “6″ in the “LastName” field. I suspected that this was duff data, but it turned out to be this guy.

Wikipedia reveals that he used to have a much more prosaic name.

Page 1 of 212»