Author Archive

IIS, WCF, and 64-bit Windows

Part of writing software is that you encounter bugs, some pedestrian, some pretty obscure. When I encounter the latter, I like to write about them, just to help guide the way for the next person stuck on this.
I have been trying to get some existing WCF Services up and running under IIS on Windows 7, [...]


Extensibility in ASP.NET MVC Via Messaging

Alright kids, buckle your seats because we’re about to drop some science. One of the core features of ASP.NET MVC is extensibility, and in this post I’m going to show how extensible it can be. You can provide significant functionality to your codebase and still allow it to be small and flexible.
Read On


Amusing Bad Programming Tip

Say you have a class with a property that’s a string. Using object initializers you can do this little nugget:

Product p = new Product { ProductName = Console.ReadLine() };

It will work as you’d expect (prompt you for input, then assign it to ProductName). However, that’s pretty easy to miss when you’re quickly scanning code. [...]


Use LINQ’s Select and Initializers to Make Mapping Easier

Mapping data between types on a Web Service can be a collosal pain. There are various frameworks out there that can speed things up, but sometimes you just need to do it by hand. Fortunately some of the features introduced with C# 3 can help speed things up.
Say the type on the server looks like [...]


How to Be a Helpful Tester

Disclaimer: I have not worked as a full time software tester, so this point of view is from a developer who would love to see the following qualities in QA personnel that I work with.

Sometime early in my career as a software developer, I learned that my code was not perfect and needed [...]


More Fancypants LINQ Fun

Say you had an object model that was generated from a database like so:
public class Lecture {
public List<Speaker_Lecture> Speakers { get; set; }
}

public class Speaker_Lecture {
public Lecture Lecture { get; set; }
public Speaker Speaker { get; set; }
}

public class Speaker {
public string Name { get; set; }
}
Unfortunately, you’re stuck with that semi-ugly Speaker_Lecture model, and [...]


Using LINQ to Reduce Collections

Recently, I had a Dictionary<string, string> object that I wanted to display as a single string, essentially like “[key1] => value1  [key2] => value2” and so on. Back in the olden days of .NET 2.0 and prior, you could have just done it like this:
string s = ""; // Or a StringBuilder
foreach (string key in [...]


Know How Your Framework Works

I like frameworks. I spent far too much time in my programming infancy reinventing the wheel, and I don’t want to ever have to write more code than I have to again. Thus, I like relying on frameworks to take the tedium out of certain parts of the craft.
However, a problem arises when you don’t [...]


Desert Code Camp Sample Code

I gave two talks at Desert Code Camp this last weekend on ASP.NET MVC. The talks went well enough, though the time was far too short to cover everything I wanted to. I did get requests to share the code created during the sessions. So, here it is, for the most part.
http://krazyyak.com/sogeti/DemoBlog.zip
I say “for the [...]


ASP.NET MVC and Rendering both HTML and JavaScript

In the project I am currently working on, we are using JavaScript and jQuery in just about everything. One of the frustrations that I have been seeing is that I’ll render a view representing an object, but also want a JSON version of that object to manipulate. I am also quite anal when it comes [...]