August, 2004

  • Eric Gunnerson's Compendium

    Good subjects for IR photography?


    I recently bought an accessory adapter and a Hoya R72 filter for my Canon G3, so that I could do some infrared photography. This is "near IR" photography, the kind where things look weird

    not thermal infrared, where you can see how hot things are:

    The filter cuts down the amount of light by a pretty huge amount - I went from a 400th of a second down to around a 4th of a second on an outdoor scene.

    The results were as I expected (weird and very red), but I'm looking for some advice on subjects.

  • Eric Gunnerson's Compendium

    NUnit on Whidbey Beta 1 experiences...

    I've been having problems getting NUnit to work on Whidbey Beta 1, and I'm curious what experiences you've had, either good or bad. Jim hasn't been having the same trouble, so we're trying to figure out what's what. For him, it works if he updates the config file, but I'm getting a BadImageFormatException.
  • Eric Gunnerson's Compendium



    Luca, who is taking over for me as C# Compiler PM, wrote this post:


    I heartily agree with him when he says "DO NOT WRITE THAT CODE".

  • Eric Gunnerson's Compendium

    1.1 SP1, 1.0 SP3 released


    A few new service packs are now available.

    .NET Framework 1.1 SP1 for WS03

    .NET Framework 1.1 SP1

    .NET Framework 1.0 SP3

  • Eric Gunnerson's Compendium

    Another career option...


    The first time, I thought it was a joke.

    I'd just written a short link post, and I'd gotten the following comment in my blog:

    When is the proper time to get up and leave the breakfast lunch or dinner table,whether it be with your spouse and childen and or company?

    I just figured that one of my readers was messing with me. Then there was another:

    My cousin is having an adoption party for her 3 sons that her present husband is adopting. What kind of gift would you give in this case?

    I appreciate your feedback....

    A quick look at my referrer page shows that I have a bunch of hits coming from Google - 250 or so right now. Turns out that due to my Google Karma, I'm the 8th most popular post on "Miss Manners".

    I ignored this for a few days, until I got the following email last Thursday:

    Sender: Ann
    Email address: <deleted>

    How does this work...I submitted a question, but I've noticed that none of the other questions posted on you site have been answered!!! I asked best way to say "no gifts" please.

    Hmm. Ann is serious, and apparently, so are the other 17 people who also asked me questions. Which therefore poses a bit of a dilemna:

    Should I answer them?

    I mean, I'm not an advice columnist, but many of these questions are pretty easy to answer. For example:

    Q: What is the proper language to use in asking your co-workers to support your child's fundraiser?

    A: Such language does not exist. Most co-workers likely have no connection at all to your child, and it's unfair to ask them to help support something your child is doing, especially in a way that might make them feel like they have to contribute. This is really bad if you're young and childless and all your co-workers have kids. Friends are another story, though one should also try not to impose.

    If there's a way to post something on a bulletin board or on your desk so that people can offer to donate if they want, I think that's okay.

    Q: What is most polite way to suggest "not" bringing gifts to an adult birthday party?

    A: People want to bring something to a party, and if you tell them to bring nothing, they won't feel as nice - especially if somebody else does bring something.

    Two ideas for getting around this:

    1. Make it a theme party. Ask everybody to bring a different bottle of wine for a wine tasting, or their favorite cheese, or something like that. Something cheap and consumable.
    2. Do something for charity. Write something like, "Since I have been lucky in life, I don't really need any presents, so if you wish, instead of a present please bring a blanket to donate to the homeless". Or do the same with food for a food bank.

    The danger, of course, is that I would hit the #1 spot on Google. In fact, merely the mention of "M. Manners" in this post might bump me up.


  • Eric Gunnerson's Compendium

    Removing games from a broken XBox

  • Eric Gunnerson's Compendium

    Blog to email gateway?


    In talking with my mom a few weeks ago, I realized that readers of my blog know more about what's going on than my family does. Writing individual emails to them isn't going to happen, so I'm looking for a blog to email gateway. It should:

    1. Monitor a specific category in the blog for new posts...
    2. Create a templated email message from each new blog post...
    3. Send that email to a list of recipients...

    Anybody know of something that does this??

  • Eric Gunnerson's Compendium

    Museum of Flight - Personal Courage Wing


    Yesterday morning Samantha and I went over to the Museum of Flight to check out the new Personal Courage Wing.

    The Personal Courage wing is a new two-floor exhibit dedicated to aviation during the first two world wars. The museum of flight was able to exhibit the collection of the Champlin Fighter Aircraft Museum on the condition that the provide a dedicated space for the aircraft, and it's fair to say that they've done that.

    In fact, I think this is one of the best museum displays that I've ever seen. The sound, lighting, and staging are all world class. From the world's first fighter plane that greets you as you enter the WWI section, the 1914 Caproni Ca 20, to the 400 MPH P-38L Lightning of WWII, everything is beautifully done.



  • Eric Gunnerson's Compendium

    Hydrogen from Sunlight


    John Read wrote in this ABlog post (I hate group blogs):

    The Aussies have done it. And not a moment too soon! Using special titanium oxide ceramics, they can now use sunlight to split water, and produce hydrogen fuel for unlimited energy. The device rivals still-unrealized “controlled fusion”

    This is an interesting development in the research area of Photoelectrochemical water splitting, but it's not about whether you can get hydrogen from sunlight. You could already do that, if you were willing to go from photovoltaics to electrolysis, or use solar energy for thermal water splitting. So, I think John is a bit over-enthusiastic.

    The real question is whether you can produce energy at economical rates, and I haven't seen any information on that. Given a competitive efficiency, it's likely that you could create such a system that's quite a bit cheaper than photovoltaics, but you still have to deal with the fact that solar energy is a fairly diffuse energy source. Time for a little math - how much space would it take to support an average household. Feel free to check my numbers...

    Picking a spot in California as a test case, we find that it averages about 5 KWh / sq meter / day.

    The average US household uses around 12000 KWh / year = 32.8 KWh / day

    So, if our system were 100% efficiency, we'd need about 6.5 meters of collector area. That sets a lower bound. Picking some more reasonable numbers:

    Light to hydrogen efficiency = 10%

    This seems like a fairly reasonable guess. Photovoltaics are in the same realm, and photosynthesis clocks in at around 8% for efficient plants.

    Hydrogen to electricity efficiency = 75%

    This is a harder number to come up with. There are claims of up to 80% here, so I'm going to choose 75% as a reasonable number.

    Power inverters (to go from DC to AC) are approximately 90% efficient.

    So, that makes our sunlight to AC power efficiency =

    0.1 * 0.75 * 0.9 = 0.0675

    Dividing our 6.5 meters by this factor gives us around 96 square meters of collection area required to take a California house off-grid. That's a collector that's properly aligned with the sun - being at the wrong angle reduces the efficiency.

    That's a pretty large amount of space.

    If, however, you can do this in large desert areas, you can get a megawatt of daytime hydrogen out of a collector that's about 150 meters square.

    There are also some interesting space applications. Presuming you can get water from asteroid sources, you could perhaps generate hydrogen and oxygen fairly simply.

  • Eric Gunnerson's Compendium

    After Careful Deliberation


    After careful deliberation, I have decided to withdraw my petition to the IOC to include Ladder Dancing as a demonstration sport in the 2008 Beijing Olympics.

  • Eric Gunnerson's Compendium

    May contain fish or wheat


    On the box of frozen breaded cod filets from Trader Joes:

    "May contain fish or wheat"

    Yeah, I was kindof hoping that it *would* contain fish.

  • Eric Gunnerson's Compendium

    6 stitches later...


    It rained a bit here last night. Something like an inch and a half.

    The gutter by our outside window got clogged and overflowed all night. This morning, I went out to clean out the drains. Got the first one down (with my 28' extension ladder). Went to move the ladder, and it torqued out of my hands. When the top hit the ground, it spun the ladder around and whacked me in the ear. I went inside and layed on the floor while Kim applied direct pressure.

    So, I got to spend 2 hours in the emergency room, getting my ear stitched up. At least my Nurse Practioner was also a cyclist who had been in France for the tour, so we got to talk cycling while she stitched me up. Unfotunately, the only thing on TV was the Women's marathon. An hour of running doesn't make very good TV...

  • Eric Gunnerson's Compendium

    Monkey Gallery


    Jill Greenberg has turned her talents towards monkeys.

    from Boing Boing

    BTW, "Monkey Gallery" is a great name for a band...


  • Eric Gunnerson's Compendium

    Best "Improve Your Dev Skills" books...


    I've been looking through a few of my "Improve your Dev Skills" books:

    What are your favorite books in this genre? Why?

  • Eric Gunnerson's Compendium

    Practice your parking



  • Eric Gunnerson's Compendium



    Last night, Kim and I took advantage of our temporarily childless state, and went out for dinner at SeaStar in downtown Bellevue.

    I've been a bit disappointed in the last year or so when we've gone to nice places. We went to Cutters back in May, and while the food was okay, the shrimp was overcooked. I don't think it's unreasonable to expect a seafood restaurant to be able to cook shrimp correctly.

    So, anyway, on the strength of Joe's recommendation, I got us a reservation at SeaStar.

    We started with the California roll, which was just about perfect.

    For the entree, I had a porcini-encrusted salmon fillet, which was cooked absolutely perfectly - done on the outside, not quite done on the inside. It was accompanied by a pesto rice, where the rice was cooked al dente (also hard to find in restaurants). Kim had prawns in panchetta (also cooked perfectly), and a nice salad. Dessert was lemon foam with fresh berries.

    All accompanied by a nice glass of Fat Bastard Chardonnay (huge wine list, BTW).

    Overall, this was one of the best meals I've ever had. Great ingredients, cooked to perfection, and great staff. All for a hair under $100.

    Definitely recommended.

  • Eric Gunnerson's Compendium

    Descriptions for my current state...


    So, I'm in a weird state at work right now. I'm not really here at my old job - I can't start anything real, and I'm trying to close things down, but neither am I at my new job. I was talking with Matt, trying to come up with good names for this condition. Here are a few ones I came up with, but I'm looking for more:

    • Pushed back from the gate
    • Waiting in the green room
    • Looking over the fence




  • Eric Gunnerson's Compendium

    Miss manners will help you now...

    Etiquette Hell
  • Eric Gunnerson's Compendium

    Job opportunities in the C# team...


    The following is paid commercial advertisement...


    Gus wrote about the open jobs on the C# team.

    Have you ever thought about working for Microsoft, on a great team that (yes, I'm leaving, but it's still a great team...) creates a product that many of you love (or at least like)?

    The C# team has a few openings that you might be interested in. He talks a lot about the open QA positions, but there are also open Dev and PM positions as well. If you follow the link in his post, you can get directly to the job listing.


    We now return you to your original programming, already in progress.

  • Eric Gunnerson's Compendium

    Be a language designer redux...


    Thanks for all the responses to the question that I posed. The reason I posed it is that I've been seeing a lot of language requests coming through the MSDN feedback site, which is a good thing, but some of them are pretty obviously impractical, so I wanted to try to explore a little of the "language designer" mindset.

    Several people pointed out that Cyrus had blogged about this a while back. That's true, though he doesn't explore things from a language designer standpoint, but rather from a language user standpoint. That's a nice place to start, but it doesn't really explore the areas you need to explore when thinking about adding a language feature.

    So, here's my analysis of the request. Note that I'm only one member (so to be an ex-member) of the language design team, so there may be other opinions...

    If you truly want to support non-null types, they need to be a runtime feature. That's the way that you get a secure, easy-to-use system that works the way users would want it to work.

    Unfortunately, at this point in time, it would be somewhat difficult for the runtime team to do it. Even if they did, it's really not practical to modify all the existing libraries to take advantage of such a feature, as that would pretty much require that every bit of .NET code be revisited/recompiled. If you changed String.IndexOf() to only take a non-null string, think of how many places that's used in the .NET universe.

    If we had it to do again, creating the runtime and CLR with such support seems like a good thing to do, but we weren't sharp enough to figure that out early on, so it's not something we can realistically add at this point.

    So, where does that leave us? Well, it is possible to approach this from the "parameter validation" perspective rather than the "not null type" perspective, and you can likely get the effect that you want (ie not having to write your own parameter validation code), though it's decidedly less efficient to check for null everywhere than to just know that null is not a possible value. We will be talking about the parameter validation scenario in future design team meetings.

    I think that Daniel O'Connell and Matthew W. Jackson probably came the closest to how I would approach the issue, so 250 points to each of them.

  • Eric Gunnerson's Compendium

    List<Employee> or EmployeeList?


    In current versions of C#, to get a strongly-typed collection, you need to define a separate type for that collection. So if you want to expose a collection of employees, you created an EmployeeCollection class.

    With generics, it's now possible to just use List<Employee>, and it's also possible to write a pretty simple version of Employee collection as well:

    class EmployeeCollection: List<Employee> {}

    So, which one is preferred?

    My advice is to prefer List<Employee>, as anybody who looks at such a definition will already know what operations are present on it, while it's not clear what operations an EmployeeCollection might provide.

    I would switch to EmployeeCollection when I want to add behavior beyond what List<T> provides (I obviously *have to* switch if I want to add behavior).

    This also has the added benefit of not cluttering up the program with types that really don't need to be there.

  • Eric Gunnerson's Compendium



    Yesterday afternoon, I drove my daughter over to eastern Washington, 20 miles from the nearest town and left her with a group of people that I'd never seen before.

    Yes, it's camp time, and my daughter is at "horse camp" for a week, at highly regarded "Camp Wahoo". She's been "doing the horse thing" for a couple of years now, so I don't have any worries about any equine-related injuries, but it is one of those bittersweet parental moments. I really want her to have a good time on her own without her 'rents around, but it's a bit sad to realize that as time progresses, I'll be doing a lot more worrying about her than she will worry about being away from me.


  • Eric Gunnerson's Compendium

    Be a language designer...


    I started writing a normal blog post - well, as normal as any blog post of mine ever is - and then I decided to let you do the hard work. So here's the situation.

    You're part of the C# language design team thinking about the next version of C# (ie the version after VS 2005). You get the following email:

    When I'm writing code, I often come across a situation where my code throws an exception because another component called with a null parameter. I'd like a way to prevent that from happening.

    What are the pros and cons of such a feature? What are the ramifications of adding it to the language? What would have to change? What is your recommendation? Exactly what would such a feature look like?

  • Eric Gunnerson's Compendium

    Zoo Hill


    I wimped out on my ride yesterday morning (it's hot and hard to sleep), so this morning I decided to tackle the infamous "Zoo Hill", which climbs up Cougar Mountain near Issaquah.

    Probably the worst hill that I've normall rode is Juanita Drive, which gains about 400' over 1.3 miles, for a 5.8% grade. I hadn't looked at the Zoo stats in a while, which turns out to be a good thing.

    The climb starts immediately when you turn off of Newport, and it pretty brutal. It's more brutal if you ride for 10 minutes, look down, and then realize that you still have one gear back at the back.

    I usually run out of leg strength before I run out of aerobic capacity, but I ran out of breath lots of time on the climb. Definitely a good test of my capacity.

    Overall Stats:

    Length:    2.63 miles
    Elevation: 1200 feet
    Gradient:   8.1 % average

    The average gradient is misleading. There are a lot of sections that are around a 5% grade, and even a few that are flat, so that means that the steep sections are up in the 15% range.

    Riding down, I had to brake most of the time, because if I didn't, I easily would have been in the mid 40's. Next time, I'll probably come down the next way.

  • Eric Gunnerson's Compendium

    Any COM interop experts out there?


    I've been spending some time trying to get Windows Media Player to work in a remoted mode from C#. There's a C++ example in the WMP9 SDK named WMPML that does it, but it uses some special interfaces.

    To get it to work, I need to register an IWMPRemoteMediaServices object with the WMP player, but despite setting it through SetSite(), my IServiceObject implementation is never called to return the type.

    Anybody with some experience on the internals of AxHost and how this stuff works?

Page 1 of 2 (39 items) 12