Agile Development: The Wrong Analogy (Again)? How about this one?

Analogies are very powerful, either to mislead or to instruct.  For many years people (including me for a short while) have used the analogy of building a house—or a bridge, or a skyscraper, or anything else—to understand how to properly build software.  I recently came across another example at one of my favorite database-related web sites, SQL Server Central.  Here it is, followed by what I think is a better one:

Read the rest of this entry »


Calling Reporting Services’ CreateReport() from Powershell

The specification for CreateReport() provided by Microsoft is inaccurate, as far as I can tell.  In c# it won’t matter, but it does in Powershell, due to the oddities in how Powershell handles empty arrays.

The specification says that CreateReport() will return an empty array if there are no errors or warnings.  I believe that in SQL Server 2008 it actually returns a null.  Maybe later I’ll find a flaw in my thinking…but maybe not!

Look at this code:

Read the rest of this entry »

Powershell: nulls, empty arrays, single-element arrays

One of the biggest gotchas for people new to Powershell is the handling of null, empty arrays, and single-element arrays.  If you come from another language such as c# you’ll be shocked.  And even for an experienced Powershell writer, the behavior can lead to ugly bugs.

Other people have covered this topic before.  Here’s a good discussion by Keith Hill.  But I wanted a short reference with examples of the strange (to many people) behavior, so I’m writing this today somewhat for my own benefit.  But maybe someone else will find it useful.

Read the rest of this entry »

Localizing SQL Server Reporting Services Reports

Bret Hill recently published an article on how to localize a Reporting Services report.  This is an important article because of its completeness.  If you’ve ever tried to localize a report for a controlled, load-balanced web site, you’ve probably spent a lot of time with Mr. Google, because you have to read a bit here and a bit there to get all the pieces of information you need.

Read the rest of this entry »

My Powershell Surprise Of The Day: An Array’s -eq Operator

I’m always discovering stuff in Powershell.  I know I’m not a guru but I don’t think of myself as a novice either—and yet I keep coming across something that makes me think, “how could I have missed something so basic?”  Today it was the –eq operator for an array.

Read the rest of this entry »

Testing A New Syntax Highlighter

This is a test of a new syntax highlighting plugin that works for WordPress-hosted blogs.  I think I’m going to like it!  I’ll post here the same code as in my previous post.  In that one I couldn’t get it formatted acceptably by my previous favorite, Code Snippet so I had to try something else that I didn’t like but at least was readable.  This one seems to work much better, probably because it was specifically designed to work with WordPress.

Read the rest of this entry »’s Tip Of The Day–Avoid Use Of Set-StrictMode In Production? No Way!

I appreciate the Powershell tips from

But the Monday, 3/21/11 tip recommends avoiding the use of Set-StrictMode “latest” in production, and I think that’s bad advice.  Here’s a quote from the tip:

However, Set-StrictMode should only be used on development machines. You should never use it on production machines or in production scripts as PowerShell will not complain about non-existing properties. Have a look:

Dir $env:windir | Where-Object { $_.Length -gt 1MB }

Read the rest of this entry »