Monthly Archives: October 2007

Microsoft's interesting "embrace" of Windows Open Source

If you follow Microsoft’s web development world you might have noticed an interesting trend dating back to January of this year. You see, back in January they hired RubyCLR guru John Lam. In July they hired top tier (.NET) blogger and lead developer of the dasBlog open source blog engine Scott Hanselmen. More recently they’ve hired Phil Haack, lead developer for SubText another .NET blog engine and now they’ve hired Rob Conery the developer of SubSonic.

It’s possible and perhaps the hiring trend extends further back than January although these four hires alone seem fairly significant in the realm of .NET based OS software. It makes me wonder if perhaps Jeff Atwood is next? He just finished writing An ASP.NET 2.0 Anthology with none other than Phil Haack (and a few others) and already has a deal with Microsoft where they’ll match his OS donations. Of course, ScottGu is a big blogger and he personally reached out to Rob Conery so it wouldn’t surprise me if Scott and his crew have “gone shopping” for people who are influential .NET bloggers as well as OS developers. In fact, Rob talked about the significance of keeping his blog as well as his SubSonic work alive and I’m sure similar conversations occurred with ScottH and Phil.

To top it all off, check out this email from last May that Clemens Vasters (the original dasBlog developer) sent to the dasBlog developer’s mailing list. Here is a quote from that message.

“The purpose of this work is, as indicated, to use the engine as a testbed for a lot of new technologies we’re bringing online in RTM or Beta form over the course of the next several months. The current intent is to have all dasBlog-based bloggers from our division here at Microsoft and also the one or the other official “team blog” run on that testbed.”

I’ve been using dasBlog for about a year now and I really like it so all this attention will be interesting to watch. I wonder what it means for SubText?

Subsonic DAL now backed by Microsoft

I first mentioned SubSonic, a .NET DAL framework, almost a year ago in a post discussing my decision regarding a DAL framework for use in an ASP.NET project I was working on. When I made my decision Subsonic was in it’s very early stages of development but peaked my interest nonetheless. I think it’s interesting that a little over a week ago I decided to use SubSonic for a project at work and now Rob Conery, Subsonic’s primary developer, has joined Microsoft to continue development as part of the new MVC framework.

If you haven’t looked at SubSonic, it’s well worth a try particularly if your database consistently makes use foreign keys allowing for the generated object model to provide deep navigation capabilities for lookup field values etc. I’m working on a large ERP system with a database of 300+ tables and generating a SubSonic assembly took only a few minutes. At any rate, it’s always nice when an OS project you’ve chosen receives this sort of backing offering at least some reassurance.

[UPDATE: Jan 10, 2007] Fix spelling of Rob’s name.

Solution file warning MSB4051 GUID was not found in the .SLN file

We’re using CruiseControl.NET with an MSBuild task to build the solution file for a large ERP system which includes 21 .csproj files and recently when some code was moved to a new project the build started failing with this error:

Velocity.sln : Solution file warning MSB4051: Project {958E0376-0272-4149-A1CF-E03521D12A72} 
is referencing a project with GUID {14F4138C-4DA7-4029-A8D3-B1B3954C2839},
but a project with this GUID was not found in the .SLN file.

The weird thing is that from within VS.NET the project would build just fine. It turns out that the .sln file was missing “EndProject” line just above the GUID mentioned. Here is the fragment of the .sln file with the problem (fyi, I’ve wrapped the two project lines):

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VelocityProductionPlanning", 
"VelocityProductionPlanning\VelocityProductionPlanning.csproj",
"{4BAFD59F-EBB5-4FDA-8639-F7FC63F7F351}"
ProjectSection(WebsiteProperties) = preProject
  Debug.AspNetCompiler.Debug = "True"
  Release.AspNetCompiler.Debug = "False"
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VelocityLibraryMessaging",
"VelocityLibraryMessaging\VelocityLibraryMessaging.csproj",
"{14F4138C-4DA7-4029-A8D3-B1B3954C2839}"
EndProject

Notice, the project VelocityProductPlanning has no “EndProject” line. That caused MSBuild to generate the above warning and subsequently the build to fail.

Hope this helps.

Processing fixed length or delimited files quickly and easily in .NET

I recently ran into a really useful Open Source project called FileHelpers by Marcos Meli. FileHelpers is a .NET library used to import and export data to/from fixed length or delimited text files. The library is highly customizable with good documentation, lots of examples and a record class wizard to help you build classes that match your data.

FileHelpers record class wizard screenshot

It even supports master detail as well as multi-record mappings making it easy to work with all sorts of structured flat file data.

I’ve been working on a large ERP system and I’m currently focused on adding support for EDI Invoicing. EDI is a set of standards for structuring data that’s passed electronically between trading partners. EDI files are structured plain text files and I’m currently investigating FileHelpers MultiRecordEngine class for use with producing and consuming EDI files. I’ve only spent a few hours so far and I already have basic reading and writing of EDI 810 Invoices working.

One thing I did want to mention is that the example on the site for hooking up events is incorrect so here is an example of subscribing to the AfterWriteRecord event:

m_engine = new MultiRecordEngine(GetSelector(), GetRecordTypes()); m_engine.AfterWriteRecord += new EventHandler<AfterWriteRecordEventArgs<object>>(AfterWriteRecord); private void AfterWriteRecord(object sender, AfterWriteRecordEventArgs<object> e) { ... }

Microsoft Script Debugger breaking on a JavaScript ParseDoc function caused by IE Developer toolbar

Recently, I installed AutomatedQA‘s TestComplete (TC) in preparation for a training session I’ll be giving on October 29th. TC requires the Microsoft Script debugger (MSD) for debugging so installing that is a requirement. The problem I ran into was that after installing the script debugger I started seeing MSD popping up on an exception in a routine called “ParseDoc”. Unfortunately, there was no filename and no indicator of where the message came from. At first, I tried checking the Disable script debugging (other) option from IE’s Internet Options which unfortunately, that made no difference. I figured it must have something to do with my installed add-ons and after perusing the list I immediately guessed it was IE Developer Toolbar. Bingo.

After a bit of spelunking it turns out there are essentially four options:

  1. Uninstall IE Developer Toolbar
  2. This post with a hack to edit IE Dev Toolbar with a resource editor and add a blank try catch block around the line in question.
  3. Disable the IE Developer Toolbar BHO as follows:
    1. From IE7 select Tools|Manage Add-ons|Enable or Disable Add-ons
    2. Select IE Developer Toolbar BHO in the list, click Disable then OK
  4. My personal favorite, use Firefox.

Of course, the last option renders the add-on practically useless but it’s quick and painless. I’m using version 1.00.2188.0 of IE Dev Toolbar which has been out for awhile which makes even more annoying this problem hasn’t been addressed.

Google Custom Search Engines for C# and Facebook development

When I created a Delphi Custom Search Engine (CSE) I not only found it really useful but that it returned much better results than just using google.com. I’ve been playing with the same idea for C# and Facebook development and have created the following search engines including links to quickly add these to your browser’s Search Bar for Firefox and IE7:

http://www.stevetrefethen.com/csharpsearch/

Add C# Search to your browser’s Search Bar

This engine includes 26 sites so far and I’m sure I’ll be adding to that over time. I’ve only been using it a few days now and I can already see the improved quality of the links coming back.

Here is one for Facebook development. I really like the Facebook platform and there seems to be a lot of interest in application development for it.

http://www.stevetrefethen.com/facebooksearch/

Add Facebook Search to your browser’s Search Bar

I’ll be tweaking both of these as time goes on and feel free to ping me if you know of some good resources for either. Btw, Google Coop rocks!

Btw, please let me know if you would like to collaborate on either one. Same goes for my Delphi Search engine since I’m rarely using that one these days.

Enjoy!

[Update: Oct 19th] Fix Add search engine links

Using Vista's Speech Recognition

This is a new blog post using Vista’s speech recognition. I just purchased a Logitech 350 USB headset which enables me to use speech recognition to write blog posts. This should be an interesting experiment to see whether not speech recognition will allow me to write without using the keyboard.

Recently, Scott Hanselman blogged about speech recognition where he mentions using it for writing blog posts and e-mail. It seems like an interesting idea if it actually works. Of course, I’m sure you’ve seen the videos where windows speech recognition fails miserably.

I just started using Vista’s speech recognition and it seems to work surprisingly well. It will be interesting to see if it improves over time as I dictate new text as it says.

Have you tried it? How did it go?

And baby makes three…

This will be short, today at 1:13pm PST my wife gave birth to our third child, a boy weighing 7lbs 2.5oz and 20″ long. Both baby and Mom are doing very well. No name yet but we’ve narrowed the field so we’re close. We didn’t know the sex though I was fully expecting a girl as a result of what I thought was a slip-up by our ultrasound tech so I wasn’t really prepared for a boy’s name. Time to get some sleep.

[UPDATE: Oct. 7, 2007] We’ve settled on a name: Bryce Logan Trefethen and yes we’re aware of the initials being “BLT”.