- I survived the weekend no problem. My wife has the details of what she did for the weekend while I played Mr. Mom. The kids were great, we even went to see the Easter Bunny on Sunday. Wish the weather had been better, but we did get to go on a little walk around the neighborhood between hailstorms Sunday after naps.
- Between taking the kids all morning until Jules got home from the airport and going to opening day for a team morale event, I worked about 30 minutes yesterday. In case you’re wondering, that’s way below average. I typically work at least twice that every day. 😄
- After maintaining a post a day average for January and February, I slipped a bit in March. Twenty seven posts in thirty one days. So that puts me five posts behind for the year as of this one.
- Dale let me borrow Madden 07 for the weekend so I could pump my gamerscore (a practice called gamerscore whoring). I still need 255 points by April 22nd to complete the Old Spice Experience Challenge. I’m not proud of it, but it’s not like I have much time to play these days.
- Mads Kristensen has a new .NET blog engine intuitively called BlogEngine.NET. I wonder how it compares to dasBlog, which powers DevHawk. (via DotNetKicks)
- I wrote a last week that unit test support should be in the Express editions of VS. Thanks to Jamie Cansdale, it is. (via Larkware)
- Scott Hanselman saved his C# Tiny OS project from the impending shutdown of GDN and reposted it to his blog. I first met Scott at TechEd Malaysia 2002, so I remember seeing him present this “back in the day”.
- EMI is going to start offering songs sans DRM @ $1.29 a pop. Assuming other labels follow suit, this is gonna be huge. (via Loke Uei)
- Jomo Fisher writes about using LINQ as a string switch compiler that’s about 900% faster than using a hash table. Money quote: “Any time I see a data structure with a capability I’m not using it makes me wonder whether I can trade that capability for something I do need—in this case a speed boost.” LINQ is turning out to be much more interesting than just a (much) better way to query databases. (via DotNetKicks)
Morning Coffee 56
VSTDB, Where Have You Been All My Life?
Honestly, this post started off as a rant entitled “Is it Me, or is DB Development a Pain in the Ass?” about the sorry state of database development tools in Visual Studio. But in searching around on MSDN for information about the built-in “Database Project” type (which could more accurately be called “just a bunch of SQL scripts”), I stumbled across information about the Database Professionals edition of Visual Studio Team System. That’s right, I had forgotten that we shipped this late last year.
I short, VSTDB (or whatever the “official” acronym is) is 90% of what I was looking for in a DB dev tool. Sure, it’s not perfect, but it’s a massive improvement over the previous state of the art.
The primary feature of VSTDB is the ability to “build” your database the same way you build your code. You use lots of small scripts that get compiled together into a model (for lack of a better term) of the database as you’ve defined it. That model can be deployed to a new database instance or used to update an existing instance. You can also compare that model against an existing database in order to determine what’s changed and automatically build update SQL scripts for the DBA’s to run in the production environment (since you don’t want your developers doing that).
It takes a little getting used to, but the “lots of small scripts” approach has a lot of upside. If you have a table with a primary key, you’re supposed to define the primary key, indexes, constraints, triggers, etc. in separate scripts from table creation script. This makes things much easier when you’re trying to figure out what’s changed in your source control system.
VSTDB has a variety of other cool looking features like data generation and unit testing, but I haven’t really dug into them much yet. One thing that VSTDB supports that I wasn’t expecting was Service Broker! SQL Management Studio has limited SSB support – if you want to create new SSB objects you have to write the DDL directly. VSTDB requires you to write the SSB DDL also (it makes you write DDL for everything, see below) but it at least has templates for all the SSB object types. Very Cool!
Of course, there are always things that could be improved. The T-SQL editor does syntax highlighting but not IntelliSense. It doesn’t support the existing visual database tools like the Table Designer. And while you can build T-SQL stored procs, functions, types, etc, VSTDB doesn’t support the development of managed SQLCLR stored procs, et.al. Things to work on for v2, I suppose.
If you’re using VS Team Suite, you can download an add-on that adds VSTDB functionality to your existing VSTS installation. It’s only 8MB, so it’s definitely the way to go for Team Suite users.
I’m Wrong Because Ruby and Powershell Are Mainstream
Brad Wilson and Scott Hanselman took me to task for my comment the other day that no “mainstream” language had implemented extension methods:
How mainstream is Ruby on Rails for you? Ruby is a full fledged dynamic language. No hacks for “extension methods” (Brad)
Ya, I kind of blanched at that statement too…method_missing is pretty mainstream… (Scott)
They’re right, Ruby does support the addition (and redefinition I think) of methods on a class at any time. There’s a sample of this in the Classes and Objects chapter of Programming Ruby (aka the pick-axe book) where they add a basic documentation facility “available to any module or class” in Ruby by adding a doc instance method to the Module class.
class Module
@@docs = Hash.new(nil)
def doc(str)
@@docs[self.name] = str
end
def Module::doc(aClass)
# If we’re passed a class or module, convert to string
# (‘<=’ for classes checks for same class or subtype)
aClass = aClass.name if aClass.type <= Module
@@docs[aClass] || “No documentation for #{aClass}”
end
end
Given how Ruby classes are defined, I think the newly added methods have access to the private data of the class. Extension methods in C#3/VB9 only have access the public interface of the object. But that’s a fairly minor difference.
FYI, Powershell can do this as well, though not as succinctly as Ruby. Scott has an example how you can add a DatePhotoTaken property to System.IO.FileInfo using Omar Shahine’sPhotoLibrary project.
Chalk this up to my continuing ignorance of dynamic languages. I’m working on it, albeit slowly.
Morning Coffee 38
- As predicted, the XNA guys had a bunch of news to announce at GDC. They launched the XNA Creators Club Online with samples, forums and a new starter kit. Also they announced some cool partnerships for Creators Club Premium members (aka the folks who paid $99 a year to be able to run code on their Xbox 360) including access to the highly anticipated Torque X Engine.
- From Don Syme, we here that the new 1.9 version of F# is almost ready. When I shifted from learning F# to learning PowerShell, it wasn’t because of a sudden lack of interest in F#, so I’m glad to see them still chugging along. And by the time they release 2.0 later this year, I hope to have learned enough PowerShell that I can spend some time focusing on learning F#.
- Apparently Jenny Lam at Microsoft reviewed more than 10,000 images to pick the new Vista Wallpapers. Not sure if I would love or hate that job. But some that didn’t make the cut are available online. (via DotNetKicks)
- Tomas Restrepo reviews a number of lightweight, syntax-highlighting text editors. Personally, I like Notepad2, but as Tomas mentions there’s no way to save your settings. Also, there’s no way to add new syntax highlighting without recompiling it. For example, Wesner Moise compiled a version that added Ruby syntax. I really want a version that that supports PowerShell. Maybe it’s time to give Notepad++ a closer look
- Dale has some new SOAhlocis Anonymous shirts available.
- Jeff Atwood discovers that the French acronym for object oriented programming is POO.
Morning Coffee 32
- As 24 sputters, Lost hits it’s stride. Last nights episode rocked.
- My old team keeps churning out great stuff. This time, it’s the new Composite Applications site.
- In a follow up to a post from a couple of weeks ago, Joe McKendrick declares that “Rogue IT is Cool“. In the spirit of rogueness, maybe we get the Rogue Ale guys to whip up some IT themed beers? Service Oriented Stout? Architecture Ale? Programmer’s Porter? (you get the idea)
- Scott Hanselman provides a detailed look at static analysis in general and NDepend in particular. I hereby coin the acronym YAGTSR, which stands for “Yet Another Great Tool Scott Recommends”.
- Jeff Atwood thinks we should code smaller. He lists some positive aspects of small code (less bugs, less chance of failure, etc) and links to Bob Koss talking about the negative aspects of big code (harder to understand, harder to reuse, higher likelihood of duplication, etc). OK, I’m down, but where’s the how? I’ve got fairly radical ideas on this subject: regularly throw out your old code and start over. In movie making, there’s this idea that you have to “kill your babies“. Not literally of course, they’re talking about having the willingness to scrap your pet idea, favorite line, coolest shot, etc. for the sake of the bigger picture. I think the same goes for making software.