Skip to main content

Posts

Rubber Duck Debugging

If Wikipedia knows it, it’s official; Rubber Duck Debugging is a new tool in my developer toolset! I first heard about this technique here: http://www.codinghorror.com/blog/2012/03/rubber-duck-problem-solving.html . An extract from the original story : Bob pointed into a corner of the office. "Over there," he said, "is a duck. I want you to ask that duck your question." I looked at the duck. It was, in fact, stuffed, and very dead. Even if it had not been dead, it probably would not have been a good source of design information. I looked at Bob. Bob was dead serious. He was also my superior, and I wanted to keep my job. I awkwardly went to stand next to the duck and bent my head, as if in prayer, to commune with this duck. "What," Bob demanded, "are you doing?" "I'm asking my question of the duck," I said. One of Bob's superintendants was in his office. He was grinning like a bastard around his toothpic...

Optimizing for happiness

A must watch for every developer oriented organization(and I hope my boss will read this too ). Tom Preston-Werner(one of the founders of GitHub ) talks about the balance between optimizing for happiness and optimizing for money. If this will not help to inspire your people…

Enable net.tcp binding support in IIS 7.5

To optimize the performance of a WCF service I built, I decided to change the binding from wsHttpBinding to netTcpBinding.  So I added a second endpoint in my WCF configuration configured to use the netTcpBinding. After deploying the updated application to IIS I got the following error: “Could not find a base address that matches scheme net.tcp for the endpoint with binding MetadataExchangeTcpBinding. Registered base address schemes are [http].” Starting from IIS 7.0 other protocols then HTTP are supported. As I was using IIS 7.5 this couldn’t be the problem. I found out that one extra step is required: you need to add the net.tcp binding to the binding of the application in IIS. How can we do this? Open the Internet Information Services Manager. Right click on the virtual directory/application in IIS. Choose Manage application -> Advanced settings. In the Enabled Protocols part add net.tcp (separated by a comma) and that’s it.

Rolling out TFS 11: Update your SQL Server first

Last week I finally had some time to start migrating our TFS 2010 environment to the TFS 11 beta. The first time I tried to do the migration it failed because I didn’t had the latest updates installed for SQL Server 2008 R2. The installation procedure mentions that you need at least SQL Server 2008 R2 with SP1 and Cumulative Update 1 installed. So to get everything working, first install SP1: http://www.microsoft.com/download/en/details.aspx?id=26727 Afterwards you can download and install the Cumulative Updates(I think Cumulative Update 4 is the latest version): http://support.microsoft.com/kb/2633146 . Don’t try to mix the order, in that case you’ll end with the following error message(or something similar) during installation: The version of SQL Server instance MSSQLSERVE does not match the version expected by the SQL SErver update. The installed SQL Server product version is 10.50.1600.1, and the expected SQL Server version is 10.51.2500.0.

WCF Performance Tuning

Configuring WCF can be a daunting task. So a lot of people just use the WCF default settings and change as little as possible. However changing these defaults can dramatically improve the service performance, so it’s really worth the effort. Let’s have a look at the most used binding in enterprise environments; the WsHttpBinding. By default the following setttings are used: <wsHttpBinding> <binding name="BadPerformanceBinding"> <security mode="Message"> <message clientCredentialType="..." negotiateServiceCredential="true" establishSecurityContext="true" /> </security> </binding> </wsHttpBinding> There are 2 settings here that can have a negative impact on the performance: negotiateServiceCredential This setting determines whether the clients can get the service credential using negotiation with the service. When this setting is set to "true" a bunch of infr...

CruiseControl and TFS:Unable to perform the get operation because it is writable

To integrate CruiseControl with TFS, we are using the TFS CCNET Plugin project on CodePlex. The plug-in works great will all versions of Team Foundation Server(although there is no official support for TFS 2010). However last week, after importing a specific project, we got the following error message from CruiseControl: ThoughtWorks.CruiseControl.Core.CruiseControlException: Warning AssemblyInfo.cs - Unable to perform the get operation because it is writable What happened? During the build, we update the AssemblyInfo.cs class to include the build number in the assembly information. Therefore we remove the readonly attribute from the file and add the build information to the file. The problem is that TFS tries to be smart about your workspace usage based on the fact that your files are readonly(although this has changed in TFS 11). So it doesn’t like that it finds some files that are not readonly inside your workspace. As CruiseControl does not remove the workspace by de...

Internet Explorer 9: JavaScript window.onerror event

For a web application we are building, I added some global error handling behavior using the window.onerror event But when debugging the application I noticed that the onerror event was never called. I lost a lot of time until I discovered that it was an IE9 only issue. This fact brought me to the this forum post( Error Handling in IE9 ) where I found the following information: “In IE9 when debugging is enabled the window.onerror listener does not get fired as the error was essentially passed to the debugger. The only workaround is to disable debugging. Alas there isn't a work around for this and so far we haven't received any servicing requests for a patch, but if you need one please do contact support / your MS account rep. … In IE10 the behavior was reverted back to the IE8 behavior and onerror should will always be called.” So if I run the application without a debugger attached, it should work fine. Always fun, this browser specific behavior…