Archives - April 2010
Detect Unicode Usage in SQL Column
One optimization you can make to a SQL table that is overly large is to change from nvarchar (or nchar) to varchar (or char). Doing so will cut the size used by the data in half, from 2 bytes per character (+ 2 bytes of overhead for varchar) to only 1 byte per character. However, you will...
Sql Table Refactoring Challenge
I’ve been working a bit on cleaning up a large table to make it more efficient. I pretty much know what I need to do at this point, but I figured I’d offer up a challenge for my readers, to see if they can catch everything I have as well as to see if I’ve missed anything. So to that end,...
Government Mandates and Programming Languages
A recent SEC proposal (which, at over 600 pages, I haven’t read in any detail) includes the following: “We are proposing to require the filing of a computer program (the “waterfall computer program,” as defined in the proposed rule) of the contractual cash flow provisions of the securities in the form...
Determine All SQL Server Table Sizes
I’m doing some work to migrate and optimize a large-ish (40GB) SQL Server database at the moment. Moving such a database between data centers over the Internet is not without its challenges. In my case, virtually all of the size of the database is the result of one table, which has over 200M...
Sql Server Prevent Saving Changes That Require Table to be Re-created
When working with SQL Server Management studio, if you use the Design view of a table and attempt to make a change that will require the table to be dropped and re-added, you may receive an error message like this one: Saving changes is not permitted. The changes you have made require the following...
Sql Server Prevent Saving Changes That Require Table to be Re-created →
PowerShell Control over Nikon D3000 Camera
My wife got me a Nikon D3000 camera for Christmas last year, and I’m loving it but still trying to wrap my head around some of its features. For instance, when you plug it into a computer via USB, it doesn’t show up as a drive like most cameras I’ve used to, but rather it shows up as Computer\D3000...
Clone a VirtualBox Machine
I just installed VirtualBox , which I want to try out based on recommendations from peers for running a server from within my Windows 7 x64 OS. I’ve never used VirtualBox, so I’m certainly no expert at it, but I did want to share my experience with it thus far. Specifically, my intention...
Stir Trek 2: Iron Man Edition
Next month (7 May 2010) I’ll be presenting at the second annual Stir Trek event in Columbus, Ohio . Stir Trek (so named because last year its themes mixed MIX and the opening of the Star Trek movie) is a very cool local event. It’s a lot of fun to present at and to attend, because of its unique...
Run MSTest Without Breaking on Exceptions in VS2010
Quick tip I just figured out (no R# installed yet) when using VS2010’s test runner. If you want to just use the keyboard, then you can use ctrl-R T to Run Tests in Current Context. But if like me you tend to just leave ctrl held down when you hit the T, your test run will stop at any/every...
VS2010 Launch Presentations
Last week I was in Vegas to present at the DevConnections / VS2010 Launch event. The show was well-attended and everybody I spoke to agreed it was educational and enjoyable. My three talks were all on Wednesday, 14 April 2010, including one at 8am for which I was impressed to see a large turnout in attendance...
Adding Attributes to Generated Classes
ASP.NET MVC 2 adds support for data annotations, implemented via attributes on your model classes. Depending on your design, you may be using an OR/M tool like Entity Framework or LINQ-to-SQL to generate your entity classes, and you may further be using these entities directly as your Model. ...
How To Move or Rename a File using MSBuild
MSBuild is a very powerful tool, and it’s relatively easy to get started using it. You can run a “hello world” example of MSBuild in no time, and it’s easy to build up the files incrementally as your needs (and knowledge of the tool) increase. Here’s a handy list of the tasks that are built...



