Speaking at the Victoria .NET Users Group

I’ll be speaking tomorrow to the Victoria .NET Users Group. The topic is introducing Visual Studio 2005.

I’ll cover some of the new features that previous versions don’t have, as well as give an overview of all the new editions. So, if you’re in Victoria and you’re not related to me, come down to UVic at 7pm. We’ll be in Cornett B112.

Resharper 2.0 is going to be sweet

If I was told I could choose only one add-in for VS, it would definitely be ReSharper. Even the modest functionality that they came out with Version 1.0 was worth the price. And now they have Version 1.5. I found out from Phil that they’re increasing the price to $149. Don’t care, already got it. It’s still totally worth getting if you don’t.

But what really got me going was that they’re “offering free upgrades from ReSharper 1.x to our new baby, ReSharper 2.0.” And then, via Larkware News’ Mike Gunderloy, we have the new feature list for 2.0. Man! That is sweet! I’m really looking forward to it. Especially now that I’ve started playing with VS 2005 and found the refactoring and code generation support to be lacking compared to what I have with ReSharper. I’ve even changed my keyboard settings so Extract Method is Ctrl-Alt-M in VS 2005. It’s just not the same.

Blogging is hard

About two months ago, on the day I returned from Australia, we got a phone call a really terrible person who happened to be a realtor representing our landlords. She informed us that the landlords intended to sell the apartment, and that they’d like to give us the first crack, before it went on the market. I had several discussions while I was down in Australia about property, buying a house and what not, so it was on my mind when I got the call. It seemed like destiny. We didn’t get it, mostly because of the evil, devil-lady realtor.

In retrospect, I’m glad the realtor was such a terrible, terrible person, because the property wasn’t so good, and it wasn’t going to get any better. (We don’t live in the best of neighbourhoods in Victoria.) Nevertheless, the real estate market being what it is here, the place sold in a day; so we had to move, again. This has been the fifth move in as many years. We were lucky to get a place that was literally down the street from our last place, and it’s nicer, so it’s not that bad a deal. I’m now absolutely sure that moving is the positively the worst thing ever. This time, we decided to spend a modest sum on cleaners: that was the best money I ever spent. I might “outsource” more of the work next time I move, like packing. One conclusion I came to while moving: I can’t pack irregularly shaped things. Books, putting little boxes into bigger boxes, placing my computers and their parts in their original packaging: all of this I’m fine with. But as soon as I’m confronted with knick-knacks or the can opener, I tilt my head, try the irregular shape in a few places in the box and remind myself to do it later, ’cause the box isn’t going to be filled properly and I JUST CAN’T TAKE IT…

Anyway, as soon as I found out we had to move, my blogging frequency and my interest in writing entries took a steep decline. We’ve been moved in for a month this Friday, and I’m only just thinking of things that I want to post. I’ve thought about why I don’t blog as much as I want. Here’s some of the reasons:

  • I want this to be a largely technical blog; this means XML in the content or code samples. .Text is not setup very well for XML content, especially if it’s formatted. It’s mostly the shitty text box that it comes with, but upgrading to Community Server Blogs is not going to happen. It’s supposed to be easier and more powerful, but I couldn’t get the damn thing working at all. So I’m not happy with my blogging software. I haven’t had the time to investigate any others, but I might just take the opportunity to actually learn ASP.NET and write my own.
  • There are things I want to say, but I’m either too lazy or too busy or I think no one would possibly care about what I want to post, so I don’t do it. Part of it is because I censor myself: there are things that I’ve kept off-limits. Having those limits makes it harder to post about things that I didn’t restrict. So I’m going to try to not impose those limits.
  • This site is butt fucking ugly. I don’t like that. I’m not inclined to make posts ’cause I don’t want to look at the site. This has to a lot to do with the first point; it’s another limitation with .Text. The style I picked was one of the only ones that works in Firefox, my browser of choice.

 

 

IEnumerable<T> in .NET 2.0 Beta 2

I’ve started playing with the full version of Visual Studio 2005, the Feb CTP. I’ve abandoned the Express edition because they stripped it of all functionality. No wonder they’re giving it away free. No Add-Ins, no refactorings: do they think that hobbyists and students are idiots and won’t want those features?

Anyway, I had some code that worked with Beta 1, but was broken when I re-compiled in Beta 2. I eventually found that IEnumerable<T> implements IEnumerable in Beta 2. So if you have a class that implements IEnumerable<T>, you’ll get a compiler error that is pretty confusing. Suppose you have a class that implements IEnumerable<T>:

public class ExampleCollection : IEnumerable<Example>
{
  public IEnumerator<Example> GetEnumerator()
  {
    //give examples
  }
}

When you compile in Beta 2, you’ll get the following error: ExampleCollection does not implement interface member ‘System.Collections.IEnumerable.GetEnumerator(). ExampleCollection is either static, not public, or has the wrong return type. At first, I thought: “No shit. Of course I don’t implement interface IEnumerable, I implement the generic one. Stupid computer!” But it just sat there silently mocking me.

Then I looked at the docs, and saw that in Beta 2, the generic IEnumerable<T> inherits from IEnumerable as I mentioned earlier. And, as you all know, if you want to implement interface methods with the same signature that differ by return type, you have to implement one of them explicitly. So adding the following to your class will now be required:

public class ExampleCollection : IEnumerable<Example>
{
  public IEnumerator<Example> GetEnumerator()
  {
    //give examples
  }

  IEnumerator IEnumerable.GetEnumerator()
  {
    return GetEnumerator();
  }
}

Perhaps the compiler error message should be a little more clear on that.