Articles by Eric

UI Horror: Birthdays

By Eric

Last year I wrote about my dislike for cell phones. Despite that, I actually have one now. Maybe I'll write more about that at some point, but I was just recently reminded (irony to be revealed later) of a particularly sloppy user experience associated with adding birthdays to contacts and …

Read more...

.NET Cold Startup Performance: More

By Eric — 2 minute read

A few months ago I wrote about an approach to improving .NET cold startup performance. Here's a little more information that I've learned since then.

Another useful tool for optimizing cold startup is Microsoft's free CLR Profiler 2.0. While this tool has the aesthetics of a wadded-up paper sack …

Read more...

Are .NET Properties a Mistake?

By Eric — 1 minute read

As I mentioned the other day, I'm reading Jeffrey Richter's book CLR via C# right now. I was kind of surprised to read this statement by the author: "If I had been involved in the design of the .NET Framework and compilers, I would not have offered properties at all …

Read more...

Guidelines for Method Parameter and Return Types

By Eric — 1 minute read

I've been reading Jeffrey Richter's CLR via C# lately, and just read a section titled "Declaring a Method's Parameter Types". That title doesn't exactly promise a riveting read, but it did a nice job of articulating some guidelines for method parameter and return types, independent of any particular programming language …

Read more...

Corrupt docx File After Adding Custom Properties Part

By Eric — 4 minute read

I spent a few days implementing a component that adds some custom properties to Office 2007 files. Using the System.IO.Packaging namespace from .NET 3.0, and looking at some sample code in some Visual Studio snippets, things went pretty smoothly. Just when I thought I was done, though …

Read more...

.NET Cold Startup Performance: An Example

By Eric — 6 minute read

When running a .NET application for the first time after rebooting or hibernating the computer, you might find that it takes a long time to start up. I've been trying to address this problem in a few situations recently. In spite of having read several articles on the subject, I …

Read more...

Converting from Visual Studio 2005 to Visual Studio 2008

By Eric — 3 minute read

I've just finished switching over our development environment from Visual Studio 2005 to Visual Studio 2008 (except for a C++ solution that uses boost, which will take some further effort). These are the things that I needed to do, and the gotchas I encountered.

  1. Getting installed - Aside from being a …

Read more...

Automatic Test Cleanup in VS 2008

By Eric

I'm working on switching from VS 2005 to VS 2008. I just tried running some unit tests and got the following dialog:

clean-up-tests.jpg

Hooray! I've been trying to figure out how to implement automatic test cleanup myself, but I (fortunately) hadn't had time to devote serious effort to it. Up to …

Read more...

Getting the Host's Main Window Handle in an Office Add-in

By Eric — 1 minute read

Sometimes you want the window handle of the host application when you're writing an Office add-in. Excel includes that as a property of the Application object in newer versions of the object model, but Word and PowerPoint don't. I seem to remember some sample code from Microsoft that suggests using …

Read more...

Paste Special Macro for Word

By Eric — 1 minute read

I sometimes wonder how often the default paste operation in an application is appropriate. Maybe I'm abnormal (maybe?) but it seems like 73.2% of the time, I want pasted text to match the formatting of where it is going rather than where it came from. I guess the exception …

Read more...