Die patent troll, die!
Thanks to Judge Dale Kimball, we may finally be rid of SCO. Since he ruled that they never owned UNIX patents, they owe Novell 95% of the money they got from Microsoft and Sun for the license rights they sold. It’s doubtful they have the money, so they’ll probably have to declare bankruptcy. It couldn’t happen to a more deserving company.
Refactoring
An excellent post by Julian Bucknall of Developer Express on refactoring–more specifically the eight refactorings he uses most. Of the ones he names, I use the 8th one (use string.format) the most. As you might expect with inherited code, there are plenty of places where strings are concatenated with plus signs. I root them out of every piece of code I rewrite, and highlight them in code reviews.
SQL Server Table Properties
I needed a T-SQL statement to get the created date of a couple of tables as part of a project. One of my colleagues came up with this query:
SELECT create_date FROM sys.objects WHERE type = ‘U’ AND name = ‘<tablename>’
It works in SQL Server 2005.
The SQL Server 2000 equivalent is:
SELECT crdate FROM sysobjects WHERE xtype = ‘U’ and name = ‘<tablename>’
Jeremy D. Miller on Software Teams
His top three preferences in brief:
- internalized discipline over externally-enforced discipline
- coaching over enforcement
- collaboration over direction
Miller does the best job of explaining his third preference. Providing the rationale and context for a course of action gives a developer input and an opportunity to buy into an idea. The success of this approach still depends on the having the right people. I follow it with my own employees as much as possible.
Is Fit Testing Dead?
Jeremy Miller asks that question in this post.
I haven’t had a chance to use it on any projects, but I really like the idea of customer-facing tests. Miller describes them very well as “executable requirements”. The comments highlight a number of alternatives to Fit, including FitNesse, Green Pepper, and ZiBreve.
From the comment volume on Miller’s post, it seems that only the specific implementation of Fit is on its way out. The idea looks very much alive.
Implementing IDisposable
One of the FxCop rule violations I found in one of my projects had to do with IDisposable not being implemented. My search for examples of how to resolve this yielded a lot of helpful links, including these:
- An MSDN article on correct implementation of IDisposable
- A older CodeProject article on IDisposable that takes an odd shot at unit testing
- A newer CodeProject article on IDisposable and the dispose pattern
- A Channel9 discussion on IDisposable
Comma-delimited strings in SQL with COALESCE
I came across a nice how-to post this morning. When it comes to databases, I’m a fan of anything that eliminates the need to use cursors.
ALT.NET-->NOT.NET?
I came across this James Avery post via Mike Gunderloy’s blog. Avery attempts to make a similar point to one Martin Fowler puts forward about the best developers moving away from the .NET platform. Beyond the sort of anecdotal evidence I’ve read, I don’t see much abandonment of .NET as a platform.
When I read this post by Dave Laribee, I decided that Avery missed his point. The point of ALT.NET isn’t as a bridge to a different set of tools, but to recognize two things:
- The best solutions on the .NET platform won't always come from Microsoft.
- The best ideas from other software development communities can work very well on the .NET platform.
Strongly-typed datasets and queries without matching select clauses
I learned an annoying lesson about these late last week. I’d created the dataset by dragging and dropping the necessary tables from SQL Server in Visual Studio 2005. Then I added a query to one of the tables that didn’t include every one of its columns. Unfortunately, a number of the columns my query didn’t return didn’t allow nulls. I ended up modifying my query to include those columns, even though I don’t use them. I didn’t try removing the columns from the dataset, but that probably would have worked too.
Subversion and Team Foundation Server
There’s a Codeplex project that enables developers to use their Subversion clients with Team Foundation Server (TFS). It’s certainly an interesting project, though I don’t quite grasp the rationale. TFS is really expensive, so if a shop can afford it, they can afford Team Explorer too.
I found out about initially via TheServerSide.NET.
Ruby on Microsoft
This piece by Martin Fowler interests me more for his contention that the best technical leaders are abandoning .NET than for what he writes about Ruby. It’s the sort of argument that seems true because anecdotal evidence seems readily available. I’d be interested to see if there’s more quantitative backing for the assertion.
Some poking around on Google did reveal at least a couple statistics:
"Rails.NET" Revisited
It’s been almost a year since I learned about the .NET Action Pack. Since then, the project has changed names (to SubSonic) and switched to using Google Code as a repository (though they still use CodePlex for other things). The team appears to have enhanced it significantly, including the addition of a command-line utility and support for non-web applications. Since we’re short-staffed at work, we definitely need to jump on anything that will generate code for us.
Fun with Settings.settings
Apparently this is where Visual Studio 2005 stores connection strings when you add strongly-typed datasets in an application. Even though I had an app.config file and I’d changed it to point to a new database, I was still getting SqlExceptions when I ran my unit tests. I just didn’t know the old value was still stored in Settings.settings and needed to be updated.
My 2 cents on the iPhone
This Sunday’s Opus comic strip captures the hype perfectly.
I did get to play with one for a few minutes at an Apple store in Maryland yesterday. It handles its primary job (being a phone) very well. The sound quality was good. The interface really is as clever as the advertising suggests. A quick finger swipe moved whatever you needed in the right direction.
Typing with the iPhone turned out to work better with your index finger than with your thumbs. Whatever logic they’ve got in there for guessing what you meant when you mistype something works extremely well though.
That said, I don’t see myself coughing up the dough for an iPhone anytime soon. Functional and attractive as it is, I don’t need that much of an upgrade over the Razr (which while it has plenty of shortcomings, fits nicely in my pocket and only cost me $100). Besides, if version 1 of the iPhone is this good, imagine version 2 ;-)
Unlocking Value at Microsoft
I came across this article, via a post from Mini-Microsoft. I wouldn’t necessarily expect a software product manager to be able to write code. I would expect them to be more technology-savvy than this guy appears to be. Whether he was trying to be funny or not, this will certainly add more fuel to the fire for the legion of MBA-haters that already exist.
While I’m not a Microsoft employee, I have my doubts that he’ll be successful in his role without a better understanding of the technology. As someone who has a computer science degree and an MBA, I’ve found that the combination gives me an advantage in explaining technology choices in business terms. The other thing working against him is his product. The vast majority of individuals and corporations that own copies of Office only use a fraction of the functionality available in the older versions of the suite. Getting any company to pay more for a newer version of something that already meets their needs sounds like an impossible task to me.
Validation for Windows Forms
I don’t do much WinForms work. So when I was trying to find out how to get the equivalent of ASP.NET validator controls for WinForms, this article by Michael Weinhardt was a great find.
VSS Shadow Folders
We still use Visual SourceSafe at my job for version control. I inherited the administrative duties (for one VSS database and a TFS installation) after one of my colleagues left to join a startup. We found a legitimate need for its “shadow folders” functionality not long ago, and finally implemented them this morning. I came across this page when figuring out the particulars.
.NET Utility Classes
I just came across this great post on overlooked .NET utility classes. I prefer to buy functionality or use open source rather than build from scratch, so it’s ideal when there’s already something in the .NET framework I can use.
Guiding principles for developers
This list comes courtesy of Patrick Cauldwell, an architect at Corillian Corp. I’m definitely in favor of most of their list, especially test-driven development, continuous integration, and buy vs. build. I’m not so sure about the Windows authentication point simply because it takes so much effort to get developers access to our databases at work.