comments edit

As I mentioned before, I am the Product Manager for the Koders.com website. I am responsible for the search engine, the source code index, the forums, the blog and the Content Management System.

magnifying
glass My counterpart at Koders, Ben McDonald, is responsible for our client editions of the search engine which include the Enterprise Edition and the recently announced Pro Edition, which makes him one very busy fella.

He just recently blogged about a private beta we have going on for Pro Edition. The Pro Edition allows you to index and search code on your desktop. As far as I know, the initial beta only searches the file system, but future versions might index source control repositories just like the Enterprise Edition.

If you’re interested in trying it out and providing feedback, go ahead and sign up here.

The interesting part about this product for me is the tech:

Oh yeah, in case any of you are wondering we ended up with the following responses to the initial requirements laid out before us:

* 6.2 Mb installer\ * SQLite embedded database\ * Cassini Personal Web Server from Microsoft\ * To make sure developers have something to search immediately after installation, we’ve bundled the indexed source code of our implementation of a Amazon A9 OpenSearch client, broken down into two projects, the business layer and the web UI layer

I believe that’s a heavily customized version of the Cassini web server. The product works similarly to how Google Desktop works in that you search via the browser. This allows you to let other developers search code on your machine, should you so choose.

So what makes the Pro Edition different from just using a normal Desktop search? I’ll let Ben answer that in more detail. But I’m betting he’ll talk about how we provide some degree of semantic analysis of the code, allowing you to search specifically for a method or class for example.

comments edit

Panel
View Microsoft recently released Windows Live Writer Beta 2, the long awaited next version of their blog editing tool. Although there are a few quirks with WLW, I find the user interface and usability to be really nice. They make great use of the right sidebar panel.

In their latest release, they’ve introduced a few more extensibility points including a Manifest, which allows you to have a branded weblog panel. More than just for cosmetic reasons, this will help those who manage more than one blog see in an instant which blog they are editing.

It looks like WLW is positioning to be the rich client interface into your blog, a direction I like.

Barry Dorrans just posted a manifest on his blog for Subtext based on the one Tim Heuer deployed to his own blog.

You can download the manifest from Barry’s blog. He also committed it to our Subversion repository, so it will be included in the next version of Subtext.

Subtext remains committed to providing a great experience when using Windows Live Writer with a Subtext blog. We were quick to support Really Simple Discovery (RSD) and the newMediaObject method of the MetaWeblog API. We’ll work hard on providing first class support for adding and deleting categories.

I have an open question for the WLW team. Is there a community officer I should be in communications with to get a heads up on future features that might require changes to the Subtext in order to provide first class support? I am wondering if this information was available somewhere and maybe I just missed it somehow. I would love to provide advanced feedback and that sort of thing if you are interested. Consider it an open offer. ;)

Now if we could just get WLW to support search and replace in their HTML editor, I’d be much happier.

comments edit

I don’t know about you, but every company I’ve ever worked at had a Fort Knox like system in place for deploying code to the production server. Typically, deployment looks something like this (some with more steps, some with less):

  1. Grab the labeled (tagged) code from the version control system.
  2. Obviously, ensure that the application must compile.
  3. Another developer other than the author must review the code on some level and sign off on it.
  4. Automated unit tests must pass.
  5. If they exist, the automated system and integration tests must pass.
  6. The QA team tests the application and approves it.
  7. The deployment engineer (typically a developer or QA person) very carefully deploys the application attempting to avoid any downtime.

Interestingly enough, many of these companies didn’t have the same procedures for other documents and systems used to run the business. For example, one could in theory login to their CMS system and change the home page of the site to contain every expletive in the book just for fun and it would show up immediately.

Spreasheet photo by
http://www.flickr.com/photos/caterina/ There are a lot of people who want to make it so that the business user can write code by connecting legos. The typical examples include dynamic rules engines and their ilk. Yeah, let’s let Joe the finance guy tweak the rules on the rules engine on the fly by drawing lines and connecting boxes.

The problem with approaches like this is that it ignores the fact that the effect of these changes is no different than writing code, but often with much fewer checks on quality before it gets deployed to where it can do damage.

These systems often are lacking:

  • Version Control
  • Backup and Restore procedures
  • Quality Assurance testing
  • Formal Deployment procedures

A recent report (via Reddit) illustrates this point with a list of news stories on how errors in spreadsheets have cost businesses millions of dollars. A couple of telling snippets (emphasis mine). This one on the lack of version control and auditing:

http://www.namibian.com.na/2005/October/national/05E0F49179.html\ The Agricultural Bank of Namibia (Agribank) is teetering on the edge of bankruptcy. “There is no system of control on which the auditors can rely nor were there satisfactory auditing procedures that could be performed to obtain reasonable assurance that the provision for doubtful debts is adequate and valid,” note the auditors. Auditors found that its loan amount to the now defunct !Uri !Khubis abattoir changed from N$59,5 million on one spreadsheet to N$50,4 million on another, while the total arrears was decreased from a whopping N$9,8 million to only N$710 000.

And this one on the lack of training and Quality Assurance.

Only a matter of time before the spreadsheets hit the fan

  • Telegraph (UK), 30 June 2005\ In his paper “The importance and criticality of spreadsheets in the City of London” presented to Eusprig 2005, Grenville Croll of Frontline Systems (UK) Ltd. reported on a survey of 23 professionals in the £13Bn financial services sector. The interviewees said that spreadsheets were pervasive, and many were key and critical. There is almost no spreadsheet software quality assurance and people who create or modify spreadsheets are almost entirely self-taught. Two each disclosed a recent instance where material spreadsheet error had led to adverse effects involving many tens of millions of pounds.

The solution is not to make programming more like the way business users work now. The solution is to apply the lessons learned from software development into other business processes.

In the same way that companies rely on heavily trained developers and rigid deployment procedures in place for code, companies should make sure their business people are just as heavily trained in the software they use on a day to day basis. After all, million dollar decisions are based on the content of these systems daily.

For example, spreadsheets should be version controlled. Changes to rules within a rules engine should have to pass some automated tests and manual QA before being deployed. All of these should be peer reviewed.

tech comments edit

Ok, this will be my last post on Twitter for the time being. My last two posts on the subject pointed out flaws with it, so I thought I’d follow up with something positive.

A lot of people just don’t get Twitter, dismissing it as hype. I was firmly in that camp until I tried it, and now am a total Twit (Twitter addict). This morning as I stepped into the shower, I was wondering why Twitter has such a hold. Jeff Atwood calls it the combination of blogging and IM. But I had this nagging feeling that I’ve used something like Twitter before. Then it hit me.

Twitter is no different from a chat room, but with better usability.

Searching the web, I found I’m not the first to compare Twitter to chat or IRC. But lets look at what problems with IRC and Chat that Twitter solves.

  • The Firewall Issue
  • The Channel Overload Issue
  • The Signal to Noise Ratio and Trolling
  • The conversation persistence problem

The Firewall Issue

Unlike IRC and many chat rooms back in the day, Twitter runs over port

  1. Thus, it is less likely to be blocked by corporate and personal firewalls. The target here is ubuiquity and getting through the firewall is an important factor.

Channel Overload

I remember when I first started using IRC and then various chat rooms, I ran into the question of which, of the thousands and thousands of channels, should I join? In this case, too many choices causes a headache.

Twitter solves this problem by giving you one choice. Channel You. Public timeline aside, you have full control of who gets to see your tweets and whose tweets you wish to see. Twitter is a completely customized chat room.

Signal to Noise Ration and Trolling

The complete customization I just mentioned also helps solve the trolling problem I mentioned. If someone is being a nuisance, remove them from you friends list. You can allow only your friends to see your tweets you if you wish.

The Conversation Persistence Problem

I remember jumping into a chat room in the middle of a conversation and wondering, what the hell are they talking about? The fact that twitter keeps an ongoing archive makes it easy to back up and get caught up to where everyone else is in the conversation.

Now I know that over time, IRC and other Chat clients solved many of these same problems in one form or another. Twitter has solved them all in a compelling manner. It has the immediacy of IM with the public facing aspects of a blog, and the social interaction of a chat room.

comments edit

r_takeoff Jamie Cansdale recently wrote about some legal troubles he has with Microsoft. We were in the middle of an email correspondence on an unrelated topic when he told me about the new chapter in this long saga.

Jamie posted the entire email history and the three (so far) letters received from Microsoft’s legal team. Rather than jump to any conclusions, let’s dig into this a bit.

The Claim

First, let’s examine the claim. In the first letter from OLSWANG, the legal team representing Microsoft, the portion of the EULA for the Visual Studio Express suite of products that Jaime is allegedly in violation of is the following:

…you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways… You may not work around any technical limitations in the software.

The letter continues with…

Your product enables users of Express to access Visual Studio functionality that has been de-activated in Express and to add new features of your own design to the product, thereby circumventing the measures put in place to prevent these scenarios.

What Technical Limitation?

The interesting thing about all this is that nowhere in all the emails is it specific about which “technical limitation” Jaime is supposedly working around. Exactly what functionality has been “de-activated”?

So I decided to take a look around to see what I could find. The best I could find is this feature comparison chart.

In the row with the heading Extensibility,it says this about the Express Products.

Use 3rd party controls and content. No Macros, Add-ins or Packages

So 3rd party controls and content are enabled, but Macros and Add-ins or packages are not enabled in this product.

When I pointed this out to Jaime, he pointed out that this is not true. If the Express editions could not support Add-Ins, how does Microsoft release a Reporting Add-in for Microsoft Visual Web Developer 2005 Express or the Popfly for Visual Studio Express Users?

I imagine that Microsoft is probably not bound by their own EULA and would be allowed to work around technical limitations in their own product to create these Add-Ins. But another potential interpretation is that creating these add-ins is possible and that there is no technical limitation in the Express products.

The problem here is how do you define a technical limitation. It’s obvious that the Express product did not remove support for add-ins in the compiled code. In fact, it seems it didn’t remove add-in support at all, it just didn’t provide a convenient manner for registering add-ins. Is an omission the same thing as technical limitation?

Jamie sent me some code samples to demonstrate that he is in fact only using public well documented APIs to get TestDriven.NET to work to show up in the Express menus. He’s not decompiling the code, using any crazy hacks or workarounds. It’s very simple straightforward code.

The only thing he does which might be interpreted as questionable is to write a specific registry setting so that the TestDriven.NET menu options show up within Visual Studio Express.

So it seems that supporting Add-Ins does not require any decompilation. All it requires is adding a specific registry entry. Does that violate the EULA? Well whether I think so or not doesn’t really matter. I’m not a lawyer and I’m pretty sure Microsoft’s lawyers would have no problem convincing a judge that this is the case.

I would hope that we should have a higher standard for technical limitation than something so obvious as a registry setting. If rooting around the registry can be considered decompilation and violate EULAs, we’ve got issues.

The Kicker

Also, if that is the case, then you have to wonder about this section in Microsoft’s letter to Jamie, which I glossed over until I noticed Leon Bambrick mention it

Thank you for not registering your project extender during installation and turning off your hacks by default. It appears that by setting a registry key your hacks can still be enabled. When do you plan to remove the Visual Studio express hacks, including your addin activator, from your product.

This is interesting on a couple levels.

First, if the lack of a registry entry is sufficient to count as a “technical limitation” and “de-activation” of a feature in Visual Studio Express, why doesn’t that standard also apply to TestDriven.NET? Having removed the registry setting that lets TD.NET work in Express, hasn’t Jamie complied?

Second, take a look at this snippet from TestDriven.NET’s EULA

Except as expressly permitted in this Agreement, Licensee shall not, and shall not permit \ others to: …

​(ii) reverse engineer, decompile, disassemble or otherwise reduce the Software to source code form;

…\ (v) use the Software in any manner not expressly \ authorised by this Agreement.

It seems that by Microsoft’s own logic of what counts as a license violation, Microsoft itself has committed such a violation by reverse engineering TestDriven.NET to enable a feature that was purposefully disabled via a registry hack.

The Heart Of The Matter

All this legal posturing and gamesmanship aside, let’s get to the heart of the matter. So it may well be that Microsoft is in its legal right (I’m no lawyer, so I don’t know for sure, but stick with me here). Hooray for you Microsoft. Being in the right is nice, but knowing when to exercise that right is a true sign of wisdom. Is this the time to exercise that right?

You’ve recently given yourself one black eye in the developer community. Are you prepared to give yourself yet another and continue to erode your reputation?

The justification you give is that products like this that enable disabled features in Visual Studio Express (a dubious claim) will hurt sales of the full featured Visual Studio.NET. Really?! If I were you, I’d worry more about the loss in sales represented by the potential exodus developers leaving due to your heavy handed tactics and missteps.

comments edit

With all this talk of rockstar programmers, I like Ron Evan’s take when he says, “I Would Rather Be A Jazz Programmer”.

Here are some differences, as I see them:

Rockstar\

  • One bit hit song, then disappears\
  • Embarrass themselves as they age\
  • Claims they wrote the song\
  • Keeps trying to get back that sound they used to have\
  • Gets back together with the old band after unsuccessful solo careers\
  • Wants to marry a model and have a movie cameo\
  • Won’t play without a contract and advance payment

Jazzer\

  • One bit hit, and they become an influence\
  • Get cooler with age\
  • Claims the song is just a cool arrangement of a standard\
  • Keeps trying to produce a new sound\
  • Records with a variety of musicians over time\
  • Wants to become a professor at Berkeley School of Music\
  • Jams on the street corner just because they feel like it

While I like some rock bands such as U2 and I like some Jazz, my favorite music falls under the umbrella of Electronica including, but not limited to, BreakBeat, Trance, House, Trip-Hop, Electro, Jungle and Downtempo.

It occurred to me that I would rather be a DJ programmer than any of these.

phil-the-dj 

Here are some reasons why:

  • Never suffer from the Not Invented Here syndrome.
  • Are masters of re-use, to a fault.
  • The best do produce new music from scratch when they see a specific need that isn’t being addressed by already existing music.
  • Are great at mash-ups and integrating parts of multiple songs to create a new and more interesting song, aka a remix.
  • The best get paid a lot for a couple of hours of easy work. How hard is it to spin some vinyl, CDs, or audio files from a laptop as some do now?

At the very least, I would like to be paid like a DJ. Not the guy at your local dive, I’m talking about the big names who get paid $50K for three hours of work. What kind of music reflects your coding style?

comments edit

I don’t know about you, but I find it a pain to call stored procedures from code. Either I end up writing way too much code to specify each SqlParameter explicitly, or I use a tool like Microsoft’s Data Access Application Block’s SqlHelper classj to pass in the parameter values, which requires me to remember the correct parameter order (it actually supports both methods of calling a stored procedure). What a pain!

What I need is a strongly typed stored procedure. Something that’ll tell me which parameters to pass and will break at compile time if the parameters change in some way.

Subsonic can help with that. In general, Subsonic is most productive when combining its code generation with its dynamic query engine and Active Record. But sometimes, your stuck with Stored Procedures and want to make the best of it. Subsonic, via the sonic.exe command line tool, can generate strongly typed stored procedure wrappers saving you from writing a lot of boilerplate code.

I recently just finished updating Subtext to call all its stored procedures using Subsonic generated code. This post will walk you through setting up a toolbar button in Visual Studio.NET 2005 to do this, using Subtext as the example. This pretty much follows the example that Rob set in this post.

First, I made sure to put the latest and greates sonic.exe and SubSonic.dll in a known location. In Subtext, this is the dependencies folder, which on my machine is located:

d:\projects\Subtext\trunk\SubtextSolution\Dependencies\

The next step is to create a new External Tool button by selecting External Tools…from the Tools Menu.

External
Tools...

This will bring up the following dialog.

External Tools
Dialog

I filled in the fields like so:

  • Title: Subtext Subsonic SPs
  • Command: D:\Projects\Subtext\trunk\SubtextSolution\Dependencies\sonic.exe
  • Arguments: generatesps /config “$(SolutionDir)Subtext.Web” /out “$(SolutionDir)Subtext.Framework\Data\Generated”
  • Initial Directory: $(SolutionDir)

This tells Sonic.exe to find the Subsonic configuration within the Subtext.Web folder, but generate the stored procedure wrappers in a subfolder of the Subtext.Framework project.

With that in place, I then created a new Toolbar by selecting Customize from the Tools menu which brings up the following dialog.

Customize
Dialog

Click on the New… button to create a new toolbar.

New
Toolbar

I called mine Subsonic. This adds a new empty toolbar to VS.NET. Now all I need to do is add my Subtext Stored Procedures button to it. Just click on the Commands tab.

Customize
Commands

Unfortunately, the External Tools command is not named in this dialog. However, since I know the first command is the one I want (it’s the same order as it is listed in the Tools Menu), I drag External Command 1 to my new Subsonic toolbar.

Subtext SPs
button

So now when I make a change to a stored procedure, or add/delete a stored procedure, I can just click on that button to regenerate the code that calls my stored procedures.

comments edit

In a recent post, I compared the expressiveness of the Ruby style of writing code to the current C# style of writing code. I then went on and demonstrated one approach to achieving something close to Ruby’s expressiveness using Extension Methods in C# 3.0.

The discussion focused on how well each code sample expresses the intent of the author. Let’s look at the comparison:

Ruby:

20.minutes.ago

C#:

DateTime.Now.Subtract(TimeSpan.FromMinutes(20));

C# 3.0 using Extension Methods:

20.Minutes().Ago();

It seems obvious to me that the C# 3.0 example is more expressive than the classic C# approach, but not everyone agrees. Several people have said something to the effect of:

Yeah, that’s great for those who speak English.

Another person mentioned that the Ruby style of code panders to English speakers? Really?! Really?!

Yet somehow, the classic C# example doesn’t pander to English speakers? In the Ruby example, I count 2 words in English, Minutes and Ago. In the classic C# example, I count 8 words in English-Date, Time, Now, Subtract, Time, Span, From, Minutes(decomposing the class names into their constituent words via Pascal Casing rules).

Not to mention that all of these code samples flow left-to-right, unlike languages such as Hebrew and Arabic which flow right to left.

Seems to me that if anything, the classic C# example panders just as much if not more to the English speaking world than the Ruby example.

One explanation given for this statement is the following:

DateTime.Now.Subtract(TimeSpan.FromMinutes(20)); follows a common convention across languages, a hierarchical OOP syntax that makes sense regardless of your native tongue

I don’t get it. How is 20.minutes.ago not hierarchical and object oriented yet we wouldn’t even take a second look at DateTime.Now.Day or 20.ToString(), both of which are currently in C# and familiar to developers.

The key goal in object oriented software is to attempt to develop abstractions and work with in the domain of those abstractions. That’s the foundation of OO. Working with a Product object and a Customer object rather than a large set of procedural methods makes it even possible to understand a large system.

Let’s look at a typical object oriented code sample found in an OO tutorial:

Customer customer = Load<Customer>(id);
Order order = customer.GetLastOrder();
ShippingProvider shipper = Shipping.Create();
shipper.Ship(order);

I know I know! This code panders to English! Look at the way it’s written! GetLastOrder()? Shouldn’t that be ConseguirOrdenPasada()?

Keep in mind that this all stems from a discussion about Ruby, a language written by Yukihiro Matsumoto, a Japanese computer scientist.

Now why would a Japanese programmer write a programming language that “panders to English?”

Maybe because the only language in software that is universal is English. It’s just not possible to write a programming language that would be universally expressive in any human language. What might work for a Spanish speaker might be confusing to a Swahili speaker. Not to mention the difficulty in writing a programming language that would read left to right and right to left (Palindrome# anyone?).

Yet we must find common ground for a programming language, so choosing a human language we must. For historical reasons, English is that de-facto language. It’s the reason why all the major programming languages have English keywords and English words for its class libraries. It’s why you use the Color class in C# and not the Colour or 색깔 class.

Now I’m not some America-centrist who says this is the way it should be. I’m just saying this is the way it is. Feel free to create a programming language with all its major keywords in another language and see how widely it is adopted. It’s a fact of life. If you’re going to write software, you better learn some degree of English.

In conclusion, yes, 20.minutes.ago does pander to English, but only because all major programming languages pander to English. C# is no exception. In fact, pandering to English is our goal when trying to write readable software.

comments edit

Are your unit tests a little flat lately? Have they lost their shine and seem a bit directionless? Maybe it’s time to jazz ’em up a bit with the latest release of MbUnit.

Andrew Stopford posted a list of bug fixes, improvements, and new features. The new feature I’m selfishly excited about is the new Attribute that can Extract an Embedded Resource. Finally, I have a patch submitted to MbUnit! :)

MbUnit has changed the way I write unit tests. Here’s a list of a few of my posts on MbUnit.

Now go and robustify your application.

comments edit

UPDATE: Looks like Ian Cooper had posted pretty much the same code in the comments to Scott’s blog post. I hadn’t noticed it. He didn’t have a chance to compile it, so consider this post a validation of your example Ian! :)

Scott Hanselman recently wrote a post about how Ruby has tits or is the tits or something like that. I agree with much of it. Ruby is in many respects a nice language to use if you think in Ruby.

One of the comparisons of the syntactic sugar Scott showed was this:

Java:

new Date(new Date().getTime() - 20 * 60 * 1000);

Ruby:

20.minutes.ago

That is indeed nice. But I was on the phone with Rob Conery talking about this when it occurred to me that we’ll be able to do this with C# 3.0 extension methods. That link there is a blog post by Scott Guthrie talking about this feature.

Not having any time to install Orcas and try it out, I asked Rob Conery to be my code monkey and try this out. So we fired up GoToMeeting and started pair programming. Here is what we came up with:

public static class Extenders
{
  public static DateTime Ago(this TimeSpan val)
  {
    return DateTime.Now.Subtract(val);
  }

  public static TimeSpan Minutes(this int val)
  {
    return new TimeSpan(0, val, 0);
  }
}

Now we can write a simple console program to test this out.

class Program
{
  static void Main(string[] args)
  {
    Console.WriteLine(20.Minutes().Ago());
    Console.ReadLine();
  }
}

And it worked!

So that’s very close to the Ruby syntax and not too shabby. It would be even cleaner if we could create extension properties, but our first attempt didn’t seem to work and we ran out of time (Rob actually thinks eating lunch is important).

Found out from ScottGu that Extension Properties aren’t part of the language yet, but are being considered as a possibility in the future.

So now add this to the comparison:

C# 3.0

20.Minutes().Ago();

Just one of the many cool new language features coming soon.

comments edit

You know what I really like about posts like this? It’s a lot less writing for me. When people ask me what principles Subtext development tries to follow I can just point them to this post by Patrick Cauldwell.

I need to make sure the developer guide for Subtext development includes a link to this.

comments edit

There’s been a lot written about whether or not Microsoft is doing enough to support Open Source Projects on its platform. In the past, Microsoft’s report card in this area was not one to take home to mom.

Lately though, there’s been a lot of improvement, with initiatives like CodePlex as well as the many projects that Microsoft has opened up and moved over there. Many have expressed that there’s more that Microsoft can do and I for one believe that Microsoft is starting to listen.

If not Microsoft, at least Sam Ramji of Port 25 is. He’s effectively the Director of Open Source at Microsoft, though his official title is Director of Platform Technology Strategy.

Several members of the .NET open source community have been bouncing ideas around with Sam looking for ways for Microsoft to support these communities. I think we’ll see some big things come out of that, but it won’t happen overnight.

Meanwhile, as we wait for Microsoft to hammer out the details for potentially larger initiatives (with the help of the community), how can we as a community start supporting open source projects ourselves? How about an Open Source Incubator?

Like a good agile developer, the first iteration of the idea will start very small as a means to test the waters. Will developers participate? Will companies support this? Who knows? Let’s find out!

What’s In It For Me?

So far, Microsoft, via Sam, has agreed to support this effort (so far) with some MSDN licenses and MaximumASP has agreed to offer hosting (details being hashed out as we speak).

At the moment, this is a relatively informal idea, but if it catches on, we hope that more companies will want to support it (cheap publicity!) and we’ll have a successful model of not only how Microsoft can support the community, but how the community can support itself.

What about existing Open Source projects in need of licenses?

Good question! At the moment, this is a relatively informal experiment. If it works out, we’ll probably want to support both existing and new projects. An incubator doesn’t have to be just for new projects, does it?

If that answer doesn’t work for you, try reading the comments of Rob’s post. Maybe you can smooth talk Sam into giving your worthy project a license.

comments edit

I’ve been invited to participate on a couple of panels at the upcoming DotNetNuke OpenForce ‘07 conference, November 5-8 in Las Vegas.

  • .NET Open Source Panel with Scott Guthrie
  • .NET Open Source Architectures Panel

I’m pretty excited to be on the same panel as ScottGu himself, the man who never sleeps. Both of the panels I am on are focused on Open Source on the .NET platform, something I love to talk about. Well that and Subtext.

So what is the DotNetNuke OpenForce conference?

This is a DotNetNuke conference (so DotNetNuke sessions are emphasized), but with a bigger focus than just DotNetNuke. Keeping true to its roots, they want to help expand the visibility of other open source projects on the .NET platform.

Towards that goal, DotNetNuke created the OpenForce concept which will provide a conference venue for some of the largest .NET open source projects. This is a way for open source projects to band together, showcase their technology, and exchange ideas and support.

This conference will be co-located with the ASP.NET Connections conference, so I’ll be able to attend sessions at both. So if you’re going to be at either conference, leave me a comment!

And I’ll do my best to keep the “You Knows” to a minimum. If you’re there, feel free to keep a scorecard.

comments edit

NUnit 2.4 introduces a really nice programming model they call Constraint-Based Assert Model. I believe MbUnit 2.4 will also have this. I really like this approach to building asserts because it reads almost like English.

Assert.That( myString, Is.EqualTo("Hello") );

Look at that fine piece of prose!

I’m so enamored of this approach I thought I’d try to bring it to Subsonic. Here is an example of two existing approaches to create a Query in Subsonic.

new Query("Products").WHERE("ProductId < 5");
new Query("Products").WHERE("ProductId", Comparison.LessThan, 5);

Now what don’t I like about these? Well in the first one, there’s no intellisence to guide me on making sure I choose a valid operator. Not only that, if that 5 is a variable instead, I’m doing some string concatenation, which I find to be ugly and harder to read such as this:

new Query("Products").WHERE("ProductId < " + productId);

The second one is much better in that I get the benefit of Intellisense and it is pretty readable and understandable. But can we do better? I mean, who talks like that? “Hand me the nails where the length is comparison greater than five.”

This is where I find the Constraint Based model to be very elegant and readable.

new Query("Products").WHERE("ProductId", Is.LessThan(5));

Now if you’re looking at this and wondering, where is the intellisense for the table name and column name? Don’t worry, it’s there. I used strings here for brevity. But here’s the final query with everything strongly typed.

new Query(Tables.Product, "Northwind")
  .WHERE(Product.Columns.ProductID, Is.LessThan(5))

This is just my first pass at this for Subsonic. I need to get a better understanding of how these queries are being built so I can add the following syntax next:

new Query("Products").WHERE("ProductId", Is.In(1,2,3,4,5);
// AND
new Query("Products").WHERE("ProductId", Is.In(new int[]{1,2,3,4});

This code has been committed to the trunk and is not yet in any release. It is pretty simple so far.

I wonder if I should propose the following syntax helper:

Select.From("Products").WHERE("ProductId", Is.LessThan(5));

//Where Select.From is defined as:

public static class Select
{
  public static Query From(string tableName)
  {
    return new Query(tableName);
  }
}

Or is that taking this too far. Thoughts?

comments edit

I recently wrote about some 503 Service Unavailable Errors with IIS 7 that had me completely stumped. I tried everything I could think of to no avail.

Fortunately, a few of the members of the IIS 7 team stepped in to help. First, I received an email from Bill Staples, the group program manager of the IIS 7 team, kindly offered his assistance.

Meanwhile, Mike Volodarsky, a Program Manager on the IIS team in charge of the IIS 7 Web Server engine started offering help in my comments. Mike has a great blog with many useful troubleshooting tips for IIS 7. Highly recommended.

Mike brought in Chun Ye, a member of the http.sys team, who helped me get to the bottom of the problem. Here is the command he had me run.

netsh http show urlacl

The result showed that I had reserved http://+:80/ which takes precedence over all other URLs on port 80.

Reserved URL : http://+:80/
    User: METAVERSE\Phil
       Listen: Yes       Delegate: No
       SDDL:
D:(A;;GX;;;S-1-5-21-1527697538-1582451445-1978546337-1000) 

The solution was to run this command:

netsh http delete urlacl url=http://+:80/

Which removed the reservation.

To be honest, I have no idea why that reservation exists. Most likely it was something dumb I did a long time ago trying to debug some other long forgotten problem. I probably forgot to revert my change or didn’t even realized I had made a change.

I don’t have a real deep understanding of http.sys reservations. What I do know about it mostly comes from this post by security guru Keith Brown.

In any case, many thanks to the IIS 7 team for your help. You rock in my book.

comments edit

This just in. CodePlex is planning to roll out TortoiseSVN support!

A little while ago I wrote a comparison of TFS vs Subversion for Open Source projects. I’ll spare you the suspense by telling you that Subversion wins hands down, primarily because it itself is open source and is designed with open source in mind.

It turned out that there was already a work item for SVN support and it was the highest vote getter. On Friday, Jim Newkirk commented within the work item that they are adding support for TortoiseSVN. You can see in the work Item Details (click to enlarge) that it is set to release on June 5, 2007.

Jim’s comment mentions TortoiseSVN support specifically, but I assumed he meant Subversion support. Unless they are building some sort of Subversion bridge to TFS.

As I wrote in a recent post, there appears to be two camps at Microsoft in regards to Open Source - the old guard who are threatened by it, and the new guard who are embracing it as the opportunity it really is for Microsoft. CodePlex is emblematic of the new guard. They are listening to their users and building something that really will benefit the .NET OSS community. My heartfelt kudos to the CodePlex team!

Now it’s time for me to approach the rest of the Subtext devs to talk about a potential move after June 5. Of course, being pragmatic. I’ll want to test it out first. Kick the tires before making any commitments.

UPDATE: It looks like the CodePlex team has created a Subversion bridge to TFS. In other words, from the outside, it looks just like Subversion so you can connect using TortoiseSVN and SVN.exe, but under the hood, it is TFS. Technologically speaking, that sounds pretty cool. It couldn’t have been trivial. However, I’m a bit skeptical it will have (and maintain) feature parity, but I’m looking forward to trying it out. Not exactly what I hoped for, but I won’t sit around and bitch about it if it works.

comments edit

Scott Hanselman writes a thought provoking post that asks the question, Is Microsoft Losing the Alpha Geeks? An interesting question, but troublesome to make sense of, let alone answer.

First of all, how do you define “Alpha Geeks”? Who are they?Paul Graham would lead you to believe that alpha geeks are the influencers who use Macs and lots of parenthesis to write code. By that definition, the alpha geeks were never there or left a long time ago.

But I don’t think this is a fair definition of alpha geeks. Certainly there are still alpha geeks who love writing code for the Microsoft platform. Someone like Jeff Richter has to be considered an alpha geek, no?

So who are we talking about when we use the term Alpha Geek? Perhaps the definition of an ALT.NET developer proposed by David Laribee fits:

  1. You’re the type of developer who uses what works while keeping an eye out for a better way.
  2. You reach outside the mainstream to adopt the best of any community: Open Source, Agile, Java, Ruby, etc.
  3. You’re not content with the status quo. Things can always be better expressed, more elegant and simple, more mutable, higher quality, etc.
  4. You know tools are great, but they only take you so far. It’s the principles (sic) and knowledge that really matter. The best tools are those that embed the knowledge and encourage the principals (e.g. Resharper.)

Remove the .NET specifics and we’re left with ALT. Is the Alpha Geek the ALT developer?Getting warmer.

So who is Scott talking about? Let’s look at his post for some clues:

The one thing I learned about Rails and Rails/Ruby folks at this conferences is that they are enthusiastic and passionate. Not just because many are young (I suspect the mean age to be about 26 at this conference) but because they feel that Ruby and Rails expresses their intent in a clean and aesthetically pleasing why that avoids repetition. The code is DRY (Don’t Repeat Yourself.)

Ah! Some more clues! As expected, this discussion is really focused on web development. This is interesting because I would think that software developers such as Linus Torvalds, John Carmack, etc… would be considered Alpha Geeks, and they certainly are not building web applications.

But when you think about it, games and operating system kernels make up a very small percentage of all software being written today. In terms of public interest and buzz, building software for the web appears to be the only software development that really matters.

Alright then, with the understanding that we are not talking about 3-D gaming developers (you guys and girls do matter much to me no matter what anyone says. Thank you for Oblivion!) let’s get back to the original question. Are developers leaving Microsoft in droves for Ruby on Rails?

It’s hard to say. Show me the data. Certainly, Rails has a huge amount of buzz and a passionate fan base, which can create the impression that developers are heading over there in droves. But passion doesn’t account for statistics.

However, the gain in mindshare of the Ruby on Rails way of thinking cannot be dismissed or discounted. It’s why we’re reading about ALT.NET more and more in the first place. It’s why projects like Castle MonoRail and Subsonic have sprung up and gained many admirers.

Not to mention how recent blunders by Microsoft have disenfranchised many developers, it’s no wonder Scott and others are asking this question.

I think, the truth is somewhere in the middle. It’s not so much that alpha geeks are all leaving Microsoft in droves. But I do believe that many more alpha geeks are experimenting with other platforms such as Ruby on Rails.

It’s like the technological equivalent of the 7-year itch. You’ve been with her (Microsoft) for so long and things have been good for so much of that time that you are quite comfortable. But lately, the love just hasn’t been there. She’s constantly nagging you (Confirm or Deny) and it is more and more difficult to get anything accomplished when you’re together. To leave fills you with uncertainty, doubt, and pain. But, what if you could just have a little something something on the side? That wouldn’t be so bad, would it?

Of course where this analogy breaks down is in terms of technology, having a couple of other platforms and languages on the side is absolutely good for you. I wouldn’t recommend trying that with a human relationship.

So in my answer to Scott’s question, I think it may well be that many developers completely leave. But I imagine that many others will take the path that Rob Conery, the creator of Subsonic wrote about. He’s choosing to help try and change the developer culture around Microsoft from the inside, rather than jumping ship completely. Like a good ALT.NET developer, he sees some value in the Microsoft platform and tries to combine what is good from it, along with what is good from other platforms, rather than just giving in to the self-perpetuating cycle of successful programming languages.

One thing that writing .NET code still has for it is that it pays well and there are plenty of jobs doing it. To that end, Microsoft will still retain alpha geeks for a good while. It’s hard to leave the golden goose.

comments edit

Jeff Atwood tells me he’s thinking of leaving Twitter for Jaiku. Scoble wrote about how Leo Laporte already left.

Strangely enough, I’m having a sense of deja vu.

twitter
logo Twitter would do well to study the lessons learned in the history of Friendster vs MySpace. Building a Twitter clone is not rocket science. There is no huge barrier to entry. The only thing that keeps twitter on top of other services is their large user base.

As danah boyd points out in this essay which compares Friendster vs MySpace, People use the social technologies that all their friends are using. I personally am hesitant to switch, because everyone I know is on Twitter, not on some other platform.

However, too many days of showing users this damn cat (yes, I’m a dog person) instead of their friends and it won’t be long before they leave in droves.

Atwood is convinced that Twitter needs to switch to a platform other than Rails. As danah points out in the essay, it is not about technological perfection. Sticking to Rails because of the beauty of the code doesn’t matter to the masses. Especially when the service is always down.

I am more ambivalent on the question of whether they should leave Rails since I don’t fully understand if Rails is the bottleneck.

My experience with is that most scaling problems are the result of poorly written code, not the platform. More specifically, data access code is where I would look first. Simple mistakes like making a database call per item when loading a collection of hundreds or thousands of items can kill the scaling of a site. We recently fixed a bug like that in Subtext when displaying hundreds of comments. It can happen to anyone.

Twitter’s CEO blogged about yesterday’s outages in a post entitled, The Devil’s in the Details. Indeed. In any case, I’ll stick with Twitter a little while longer. But if they don’t do something soon, I’ll see you on Jaiku.