Visual Studio: Find in Specific File Types

My boss was just telling me about a small feature that he wished Visual Studio had. I misunderstood him, and thought he was talking about being able to find text in files of specific type, a feature that I have wanted before. I then realized that I had never really searched for such a feature; I had just assumed Visual Studio didn’t have it.

After a few seconds of looking through dialogs, I had found the option to filter a textual search based on file type:

findinfiletypes

There are a few preset file type filters, but you can also enter your own. I have a feeling that this feature just became one of my best friends.

API Tip: Don't create your own IDisposable

I'm in the middle of refactoring some ugly code that synchronizes a couple of our systems. One of our systems forces us to use an API; we're not allowed to modify the database directly or we void our service contract. You'd hope, then, that they provide a decent API for interacting with the system.

Well, first things first, the "API" is really just a bunch of horrible .Net wrappers around COM components.

Next, we come to the fact that they have their own "IDisposable" interface, called "IBBDisposable". It doesn't have a "Dispose" method, instead it has a "CloseDown" method. So basically, if you want to use it inside of a using block, you have to make your own wrapper for it. To make matters worse, the semantics of CloseDown aren't well defined like they are with IDisposable.Dispose.

As if that's all not bad enough, the classes that implement IBBDisposable also implement their own interface (ala DoSomethingClass : IDoSomethingClass), and these base interfaces don't implement IBBDisposable. This means that you have to do some casting to get to the CloseDown method, and that if you're using the interfaces it's not obvious that CloseDown even needs to be called.

Please, if you're designing an API, don't do this to the consumers.

First post from Live Writer

Let’s see how well SubText works with the MetaWeblog API.

Well, pictures don’t work. That’s a shame. I was hoping for some seamless, frictionless integration. Something that just works.

Not today. I can’t even put a FAIL picture up to show how much of a fail that is from a user perspective.

SubText Friction

I'm only a few minutes into setting up my new blog, and SubText is already giving me grief. This reminds me of why I decided to run off and build my own blog engine.

Lets see what issues I've run into so-far:
  • Couldn't get SubText to run under IIS7's Integraded mode; had to switch to Classic.
  • Had permissions issues on my App_Data folder.
  • Ran into several errors while changing some options that seem to have "fixed" themselves when I refreshed the page.
  • Getting a NullReferenceException when I try to save my Akismet API key. (But changing other settings on the same page works fine).
  • Right now, even as I'm editing this post, I can't update the categories. It tells me: "Category Update failed.There was a baseline problem updating the post categories."
  • Oh, almost forgot: It won't let me put my Google Analytics tracking code where Google recommends putting it (in the <head> tag).
I recenly joined the SubText google group with the intent of helping to reduce the level of friction this software gives its users, but now I'm leaning back toward writing my own.

First Post

Just finished setting up SubText... time for the obligatory "first post" post.

So yeah, this is the first post. Enjoy the ride :)