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.
Slimming down the FxCop rule set
I asked a group of consultants currently working in my office for advice on which FxCop rules were actually applicable to our environment. One particularly useful piece of advice was to consider whether or not unknown people or applications would be using what I’d written. It allowed me to disable the following rules:
- Mark assemblies with CLSCompliant. Since there won't be any third-party users of the assemblies I ran FxCop on, that rule can go away.
- Mark assemblies with ComVisible. The same argument as above applies to this rule.
- Assemblies should have valid strong names. Once we get certificates, we would reactivate this rule.
Safari on Windows
I’m trying it out on my laptop at work to see how I like it (I’m all Mac at home now). In regular use, the speed advantage Safari is supposed to have over Firefox isn’t really noticeable. Most sites I visit render correctly, except for the occasional message in Yahoo! Mail. It has the sort of problems I’d expect rendering ASP.NET web controls, but so does any browser that isn’t IE.
At least for now, I wouldn’t ditch Firefox for it. I might use it more on my Macs though.
Index Seeks versus Index Scans
We were pointed to this blog entry by one of the DBAs at work today. I didn’t fully understand the difference before I read this post. The bottom line: seeks are preferred. I know I’ll be looking more carefully at query plans from now on.
Use code coverage
Eric Sink wrote this post in favor of code coverage. I wasn’t terribly familiar with the concept before two years ago, and my current job is the first one where I’ve seen such tools used seriously.
The best applications our organization puts out (correctness, performance, ease of maintenance) are the ones that have unit tests. The application I have the most confidence in though, is the one that has code coverage.
I’m trying to develop that habit for the code I write, so I can be a better example to the team I manage.
Requirements
Eric Sink’s post on requirements is the best and most concise treatment of the subject I’ve read yet. The document vs. database treatment of requirements and his comparison of traceability to a compiler are inspired. He even touches briefly on the shortcomings of bug-tracking systems as requirements management systems.
I haven’t read the book he recommends in his post (Software Requirements, by Karl Wiegers), but I have no doubt that it’s good. The book on requirements that I can vouch for is Exploring Requirements: Quality Before Design. It has tons of great advice on the process of gathering requirements. If you analyze, design, build, and/or test software, read Eric Sink’s post. If you manage technology projects, you should definitely read it. Highly, highly recommended.
TFS: Scenario Coverage Analyzer
We use TFS at work, so I found this blog post on scenario coverage rather interesting. I especially liked the Project Traceability Matrix which indicates code that can’t be traced back to a requirement. Using attributes to connect assemblies and the methods they contain to individual requirements is a great idea.
I hope the author does a NCover-based version like he suggests.