Ever since Microsoft released Windows Live Writer, posting articles to this blog (and others) has been really easy. Even though this blog is powered by WordPress, Microsoft’s Live Writer let’s me author my blog posts, include pictures, format code and do all kinds of other tricks really easily. One of the side benefits of using Live Writer is it gives you a very easy way to format HTML code.
So, turns out, that when you are writing a post with Live Writer, at the bottom of the page there are three tabs, Edit, Preview and Source.

When you switch to source, you will see the raw html. You can also modify the source there which is our trick for formatting the HTML.
So, here are the steps:
1. Start Live Writer (it starts with an empty post)
2. Copy your unformatted HTML into the “Source” tab as shown above (it will look like this below)

3. Click on the “Edit” tab at the bottom of the page
4. Click Back on the “Source” tab at the bottom of the page
And now, it will look like this:

Now, you can cut and paste the code and put it anyplace you want.
Hope this helps!
http://www.linqpad.net/ – Use with Microsoft .Net for building Query type expressions with LINQ
I’m not a wizard at writing LINQ expressions so I often find myself in Google looking for something similar to what I want, then I put it into my application and run it. This has worked pretty well, but it takes a couple iterations to get it right. It occured to me that someone probably has written a LINQ interpreter so I just guessed the name, LINQPad, typed it into search, and I find the authors of the book C# 3.0 in a nutshell, Joseph Albahari and Ben Albahari, (which I like a lot) have written it.
(more…)
Can hardly contain my excitement. I was just cleaning up a business object to post in my MVC article and of course was using JetBrain’s Resharper 4.1. Not sure if any of you remember, but when I started learning ASP.NET I developed some nice business objects to use with my MSDN articles. One of the nice tricks used is using anonymous delegates to sort lists. The code was a little tricky, but id did the job. Here is the old code:
[DataObjectMethod(DataObjectMethodType.Select, true)]
public List<BusinessObjectItem> GetMembers()
{
listBusinessObject.Sort(
new Comparison<BusinessObjectItem>(
delegate(BusinessObjectItem lhs, BusinessObjectItem rhs)
{ return lhs.Name.CompareTo(rhs.Name); }));
return listBusinessObject;
}
(more…)
Background
For the past couple of years, I’ve been really impressed with how much content there is out there on the Internet in people’s blogs. To harvest all this content, you really need some kind of aggregating software to help you organize all this content. For no real reason, the first aggregator I used was Bloglines. It worked pretty well but I got tired of days when it was very slow, and other days where this cute plumber would be displayed telling me Bloglines was offline and I should come back later. About 2 months ago, I switched to Google Reader. So far, I’m a happy camper.
(more…)
One of the really nice features I enjoy using in Resharper 4.0 is the refactoring that converts inefficient (and unpleasant to read) syntax into nice efficient code. In this post, I’ll show some refactorings that Resharper (from JetBrains) gives us. There are lots more, but the ones listed below seem to come up the most in my own c# code.
(more…)
After adding the RSS feed to our Silicon Valley Code Camp Web site I noticed that the feed was not discoverable by Internet Explorer. That is, the little RSS Icon on the toolbar was not finding it.

(more…)
I’ve been addicted to using multiple monitors for programming for many years now. Recently (through other MVP blogs), I’ve noticed people talking about using UltraMon as a "must have" if you use multiple monitors. Frankly, I couldn’t see how it could get much better, but after using it for just a couple days, I’m hooked! There are lots of features to the product that I don’t yet know about or have played with, but the ones I have used so far have been very nice. I’ll outline them here.
First, it’s really nice to be able use one picture to cover your complete desktop (in my case, three monitors). While in New Zealand in 2003 on a bike vacation, I took this panorama picture. I forget where it is, but if any of you know, please add it to the comments. Here is a picture of that picture.

(more…)