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.

comments edit

Here’s the code

<img src="maintenance.gif" />

And the result

Can working on the
server

At least this seems to be my experience with Twitter lately.

Look, I can understand the need to save costs with outsourcing, but you get what you pay for. It’s no wonder that Twitter is down so often given they’re using cats for their server maintenance.

At least pay a little extra and hire these guys!

comments edit

UPDATE: Problem solved thanks to some members of the IIS 7 team!

I am at my wits end trying to get IIS 7 to work on my Vista Ultimate box and I have tried everything I can think of.

I’ve tried every step in the following tutorial, Where did my IIS7 Server go? Troubleshooting “server not found” errors. I also tried every step in this post on troubleshooting “service unavailable” errors. Trust me when I say I went through every one of these steps twice. Rob Conery can back me up on this because he watched me do so in a when I shared my desktop with him via GoToMeeting.

As far as I can tell, IIS 7 or http.sys must be corrupted somehow and the only thing left for me to try is to repave my machine and reinstall Vista. Unless of course one of my dear readers has an insight that will help me solve this, or knows someone who does.

The Problem

I’m running Vista Ultimate which has IIS 7 installed. When I navigate to http://localhost/ or http://localhost/iisstart.htm, I get an HTTP Error 503 Service Unavailable message.

What I’ve Tried

Confirmed that Skype is not listening to port 80 (Skype tries to listen on port 80 by default).

​1. Confirmed that App Pools were configured correctly and started.

​2. Ran the following command: appcmd list apppools which produced the output:

APPPOOL "DefaultAppPool" (MgdVersion:v2.0,MgdMode:Integrated,state:Started) APPPOOL "Classic .NET AppPool" (MgdVersion:v2.0,MgdMode:Classic,state:Started)

​3. Confirmed that Website was started.

​4. Ran the following command: netstat -a -o -b which produced the output:

TCP [::]:80 METAVERSE:0 LISTENING 4Can not obtain ownership information

The 4 there is the PID which I confirmed to be System as in the NT Kernal & System.

​5. Confirmed bindings were configured in IIS Manager and set for localhost port 80.

​6. No error messages in the event log under System nor Application.

​7. Made sure that my user account and the Network Service account both have access to the c:\inetpub\wwwroot directory.

​8. Tried browsing to http://MYCOMPUTERNAME/, http://localhost:80/, http://127.0.0.1/, etc… (I was getting desparate).

​9. Tried changing the default AppPool’s managed pipeline mode to Classic.

​10. Tried changing the default AppPool’s .NET framework version to No Managed Code (recall that I am trying to request a static HTML page).

​11. Able to ping localhost.

​12. Tried to telnet localhost 80 and then issue the command GET / and received the same message.

​13. Double checked that all the Handler Mappings were enabled.

​14. Made sure Anonymous Authentication was enabled. Heck, I tried it with them all enabled and tried it with only Windows Authentication enabled.

​15. Authorization Rules has one rule: Mode=allow, Users=All Users.

​16. Enabled Failed Request Tracking. Nothing showed up in the logs.

​17. Uninstalled and reinstalled IIS 7.

​18. Tried pulling my hair out and rending my garments and sacrificing chickens^1^.

Any ideas?

So there you go. I’ve tried everything I can think of and now I appeal to you for help.

The funny thing is that this works on my Vista box at work and I compared every setting in IIS. This confirms in my mind that something got fubar’d. But I hesitate to repave my machine just yet in the hope that someone out there has some definitive answers for me.

^1^ No actual chickens were harmed in troubleshooting this problem.

comments edit

First week on the job and I’ve already got the keys to the company blog. I just posted my first post at koders.com announcing the latest set of site updates.

One thing that I was surprised to learn this week, though it really shouldn’t surprise me, is that Koders uses an open source search engine to create the full-text index. More specifically, it uses Lucene.NET, a port of the Java Lucene project.

I’m familiar with Lucene.NET because the Subtext and RSS Bandit projects both use it for searching (though I was not the one to implement it in either case). As far as I know, it pretty much is the de-facto standard for open source search software on the .NET platform.

Of course Lucene.NET is only part of the Koders code search picture. It provides the full-text indexing, but if you use the Koders search engine, you’ll notice that there is some level of semantic analysis on top of the text index. Otherwise, you wouldn’t be able to search for method names and class names and such, not to mention the syntax highlighting when viewing code.

I’m still learning about all the layers and extensions Koders built on top of Lucene.NET. As I said in the post, those are probably topics I can’t get write about in too much detail.

Screenshot of project
browserOne thing I should point out is that code search is only part of the picture. Koders also has a pretty sweet code repository browser (click on thumbnail for larger view).

My favorite open source project is now in the index and can be viewed here.

On a side note, I recently talked about Search Driven Development in the theoretical sense, but have been able to put it to good use already at Koders.com. In the great developer tradition of dogfooding, I needed to look at some code from home before I had my VPN setup. It was nice to be able to login to Koders internal Enterprise Edition and find the snippet of code I needed.

comments edit

Real quickly, check out our brand spanking new build server. Notice anything different? No? Good! Hopefully everything is working just fine, but faster.

As you know, I’m ever the optimist. What’s that trite phrase, “When the crap hits the fan, make lemonade”? Or something like that.

So in this tragedy becomes triumph story, the bricking of my tiny little home built build server caused me to start thinking of a more permanent solution. In steps Eric Kemp, Rob Conery’s right hand man (in the clean sense of the idiom) on the Subsonic team.

He converted the VMWare image to run on Virtual Server and is hosting our virtual build server on a pretty hefty machine. Finally, I can shut down the virtual machine running on my desktop.

Eric ended up moving the server twice before settling on a final location. Eric, if you have a moment, remind me what the specs are on that baby.

So now it is time for me to step in with my part of the bargain, which is to help the Subsonic team get a continuous integration setup going. Now that their code is hosted in a Subversion repository, this will be a lot easier than it would’ve been before.

Even so, I’ll probably look at using CIFactory and hopefully enlist the help of an Software Configuration Management Ecowarrior, aka Jay Flowers.

comments edit

Simone Chiaretta, a member of the Subtext development team (among other open source projects), has been quite busy lately. I recently mentioned the Vista Sidebar Gadget for CruiseControl.NET he published. He also was recently in a video interview by MindBlog. Go Simo!

Loading... The post that caught my eye recently is how to make a Gmail-like loading indicator with ASP.NET Ajax. This is a nice demonstartion of how to use the ASP.NET Ajax library to simulate various styles of user interface.

Personally though, I’m not a fan of this particular loading indicator at the page level. When I have my browser fully expanded, I sometimes don’t notice it. However, it works great when constrained to a box, such as the corner of a login box.

comments edit

At the end of an average eight-hour workday, the fingers have walked 16 miles over the keys and have expended energy equal to the lifting of 1 1/4 tons. - DataHand

Ergonomic
Diagram And that’s just for a piddly eight hour workday! What about developers who go home and write more code for fun?

Around three years ago I wrote a post titled The Real Pain of Software Development Part 1 in which I talked about my experience with Repetitive Stress Injury (RSI). Because of the pain of typing at that time, I never really got around to writing part 2 until now.

So why am I bringing up this subject after all these years? Yesterday, I was reminded again about just how important developers need to take ergonomics in their daily work life.

As I wrote in that post, years ago, I suffered from a lot of pain when writing code. I started going to Physical and Occupational therapy which helped immensely.

During that time I went out and bought the best chair I could find, despite the high cost. (Note that the best chair for me might not be the best chair for you due to differences in body types. Jeff Atwood mentions theSteel Case Leapas his favorite in a post that highlights the importance of a good chair to a developer’s productivity.)

Along with the chair, I bought a good keyboard, a keyboard tray with an articulating arm, and a trackball and made sure it was configured in a way that was comfortable for me and ergonomically sound.

And over time, I got better. In fact, I got much better.

At that point I vowed to never to skimp on the tools I needed as a developer. As Jeff points out in his Programmer’s Bill of Rights,

It’s unbelievable to me that a company would pay a developer $60-$100k in salary, yet cripple him or her with terrible working conditions and crusty hand-me-down hardware. This makes no business sense whatsoever. And yet I see it all the time. It’s shocking how many companies still don’t provide software developers with the essential things they need to succeed.

I realized that not every company will follow through on this reasonable advice, so I took it upon myself to make sure I have what I need personally.

In the past several years, I’ve worked alot more from home due to my open source contributions. In the past two years, I worked full time from home. I made sure that I had the best quality setup for me possible. Better than any other employer ever provided. To the items I mentioned before, I added two very bright and sharp LCD monitors which reduce eye strain. This setup is finely tuned for me and the way I work.

Which brings me back to yesterday. It was my first day of work at my new company and naturally, the workstation has not had the opportunity to be configured by me, through no fault of my employer. My requests for a new keyboard, trackball, and keyboard tray were all approved. I plan to bring in my own chair because I have two Neutral Posture chairs at home. I don’t screw around with my equipment any more.

Unfortunately, after just one day I am having trouble sleeping due to pain in my hand and back.Shoot, I need to get up in three hours!

Yeah, I know what you are thinking. What a freaking wuss!

But no amount of macho posturing changes the fact that some people, for better or worse, are more prone to these type of injuries than others.

I wish I could remember his name, but there’s a very famous software developer world renowned who cannot type for himself. He has others type for him. I’m sure someone will remind me.

What my Occupational therapist taught me is that my recovery is based on a delicate balance. Upsetting that balance can bring back a lot of pain. In my case, I will never fully be free from pain while working. But through therapy, I learned techniques to reduce the pain as well as deal with it better.

As fortune would have it, this was around the time I received a private office, so it was less of a spectacle when I would get on the floor with a foam roller and do my stretches every couple of hours.

The pain had gotten so bad, there were days I could barely type a line of code, instead finding ways to be productive without coding. I started to wonder about my future, or lack thereof, as a software developer.

My recovery allowed me to not only work through a normal day productively, but actually start putting in extra coding effort in the evenings as I started to contribute to RSS Bandit and eventually start the Subtext Project.

I became even more productive than before, working day and night at the computer. A stark contrast to when I could barely type a single method of code. I could never have started Subtext if it weren’t for the therapy. For that, I am eternally grateful to the occupational/physical therapists at UCLA medical center.

So if you experience a lot of pain while developing, don’t be a hero. Be smart about it and seek information and help. The pain could be the thing holding you back from your potential.