April, 2005

  • Eric Gunnerson's Compendium

    Hitchhiker's Guide to the Galaxy


    We had a "morale event" at the theater today, attending the opening of The Hitchiker's Guide to the Galaxy.

    Given the review that I wrote about a while back, I wasn't expecting very much. I wanted to be wrong about what I had read, as Adams' difference in perspective.

    To quote one of my friends, "I expected it to be funnier..." We had a good crowd at a fairly packed showing, and the crowd wasn't laughing very often.

    I'm not going to write at length about this - well, I *intend* not to write at length, but we'll see how the post goes. I'm writing this from memory, so I might get some things wrong. If you've never read the books, there are spoilers here. Note that you can safely see the movie and not know what's in the book, as there is major divergence.  

    A few of the things that bothered me:

    • The fact that Arthur has met Zaphod before is introduced before the earth is destroyed, when Arthur is pining for Tricia. We even see the party scene where Zaphod shows up. Doing this ahead of time totally ruins when Arthur and Ford make it onto the Heart of Gold. You're supposed to be surprised when Arthur meets Trillian there, and more surprised when we find out that Arthur already met Zaphod. This version, it's nothing. No laughs.
    • One of my all time favorites scenes - Arthur and Ford make it onto the Vogon ship, Arthur asks where they are, Ford says "we're safe. We're in the servant's quarters of a Vogon Ship" (or something like that). Arthur responds, "Ahh. Obviously some definition of the word 'safe' that I wasn't previously aware of".
      In the movie, they cut off the last line. What kind of comedic genius includes the setup for a joke, and then omits the punchline?
    • Airlock scene. Ford and Arthur are going to be tossed into space, and die. In the book, Ford, "but wait, what about this switch? No, wait, we are going to die..." There *is* no switch - Ford is still making jokes despite the fact that he's about to die. That's funny, and it's funny that we get introduced to a way out, but it's just a fake.
      In the movie, Ford plays with some gizmos and switches, and then says they're still going to die. That's not funny.
    • The guide is introduced before we see the actual device. "Don't Panic" is, inexplicably, on the back of the book, so in the setup show, you don't see it until the end of the introductory setting. You've seen the front. It doesn't have words. You've heard the narration. I says they're there. Ugh.
    • Arthur and Trillian. There really is no romantic subplot in the book, but it's a major part of the movie. Not funny, nor very well done.
    • Zaphod's head. Zaphod has a swivel head that comes out and is annoying. Very annoying. The whole point of the second head is that it doesn't do anything. Having it be a plot device ruins the surrealism. Similarly, with the third arm.
    • President of the Galaxy. No mention of why the president of the galaxy exists, nor any mention of the quest to find out what's really going on.
    • Zaphod's motivation. Zaphod is doing all this why? Well, we really never get a good idea of his motivation. He wants to visit deep thought. The storyline that his brain has been modified, and then when he finds out that he modified his own brain, that's surreal.
    • Zaphod's mannerisms. I don't think of Zaphod as being from Texas. In the books, he's far less obnoxious and far more cool than in the movie.
    • No fairy cake or brownian motion
    • When the philosophers come back to deep thought to get the answer, the dialog is rewritten to get rid of any interest, and there's a big crowd. Huh? One of the motivations for the philosophers is to find an decent question to go along with the answer, so that people will be satisfied. But that only works if the people didn't know what was going on.
    • Bulldozer scenes misses the part where Ford convinces the bulldozer operator that Arthur doesn't really need to be there, and Arthur to leave. This is weird, so we presume that Ford is different in some way. In the movie, Arthur just gets up because Ford asks him to. The filmmakers just don't get it.
    • Only 1:50. I think that included previews and credits. So, it's not like they were under pressure to cut out dialog.
    • "It's unpleasantly like being drunk. What's unpleasant about being drunk? Ask a glass of water."

      That's the sort of writing where Adams is truly brilliant, that shift in perspective that is not only unexpected, it's bizarre in some hard-to-describe manner. But no, we couldn't find time to put that into the movie...
    • Marvin is, for some reason, less funny. Not sure why.

    There are more, but I'm getting depressed.

    What was good?

    Well, the sets were well done, as were the creatures and the effects. Slartibartfast was well done. The guide graphics are well done.

    The worst part - it's pretty unlikely that anybody will be drawn to the books after such a poor movie...

  • Eric Gunnerson's Compendium

    Headphone amplifier?


    Some of the CDs that I own are from the early days of CDs, the days when recording engineers were very careful not to approach the 0dB level. This was a good thing, given the level of experience at the time, but it also means that I have a number of MP3s that are fairly quiet.

    My current work machine unfortunately has an inadequate amp on the sound card, so even with all the volume control sliders on 11, I can't get enough volume.

    I have a set of Altec Lansing speakers on my desk that can achieve impressive levels of sonic masking, so using the headphone jack on those isn't really a solution.

    Does anybody know of a nice headphone amplifier with good sonic performance, preferably with volume control?

    Or should I just stuff a decent sound card in the machine, and get better volume and performance? Or use a USB sound card?


  • Eric Gunnerson's Compendium

    You're getting very sleepy


    You're getting very sleepy

    Requires shockwave

  • Eric Gunnerson's Compendium



    I came across a link to TestDriven.NET today. Given that I'm not as plugged into the C# space as I used to be, I hope this is news to at least some of you.

    TestDriven.NET is a VS add-in that builds on top of NUnit to give you IDE integration for your unit testing features.

    I haven't had a chance to try it - if you have, please post your opinion in the comments.

  • Eric Gunnerson's Compendium

    BWM 3 series tires...


    I bought some new tires for my 328i a few weeks ago.

    I've had lots of good luck with Michelin tires over the years, but doing some research this time showed me that the Michelins that I liked were going to be $160 per tire. That's a fair bit of money for tires.

    I spent some time at TireRack.com reading the reviews, and ended up choosing a set of Yokohama V4s tires for $104 a tire. After a few weeks on them, I'm pretty happy. They're grippy in both the wet and the dry and you can feel when you're about to lose traction. They're reasonably quiet on the freeway - not quite as quiet as I'd hoped, but the 3-series isn't designed to be a super-quiet car.

    I got them from Discount Tire, who gave me really nice service. They were cheaper and had more selection than Costco.

  • Eric Gunnerson's Compendium

    Serenity the Movie


    The trailer for Serenity was released today.

    I really enjoyed Firefly a bunch - it had a different feel than most of the other sci-fi that's made it to television, and it looks like Joss Whedon (of Buffy fame) will be able to bring the same feel to the silver screen (and the 5.25 cm silver disc as well).

  • Eric Gunnerson's Compendium

    What's wrong with this code #6? (Discussion)


    Thanks for all the comments on my recent post. I have one more that I'll do in the next couple of weeks, and after that, I'm looking for suggestions for future posts. If you have an idea for one, please email me.

    The answer I was looking for was related to the object that I was locking on, and Scott Williams was the first to get the answer that I was looking for - changing the code to:


    The original code is bad because it can result in a deadlock - if somebody locks on a Notifier instance on one thread, and then does something that calls Notifier.Add() on another thread. Not really that likely in my book.

    So, that's one reason not to do it. A more compelling reason to lock on items is that, for best performance, you should lock on as granular an object as possible, and items is more granular than the entire Notification instance. If you have two lists that are both being protected by a single lock, that may slow things down.

    Now, onto the comments. I've elected not to comment on a few cases where I didn't think I could do it nicely. If you aren't mentioned below and you want to know what I thought, feel free to email me.

    Nick suggested locking on the SyncRoot property of the collection. This will work, but I don't see any advantage to using this over just using "items" in this case. Brad wrote a bit about this very subject.

    TAG went on a bit of a tangent in his discussion. It is true that you can use the Synchronized wrapper around an ArrayList(), but I think it's generally better to do the wrapping yourself.  Not only does that give you better control over how the locking happens, it makes it obvious to the reader that you are doing synchronization. If you want/need to encapsulate, then do so in a well-named class.

    I don't think that you should expose a property that allows others to lock your object. Locking is something private to the object, and encouraging other objects to do locking for you is a bad thing. Or, as another commenter (replier? poster?) noted, "hilarity does not ensue".

    Drew commented that the .NET library design guidelines say you shouldn't lock in instance methods of a library. I think the third bullet point is really more of an explanation for why the .NET libraries aren't threadsafe rather than a general guideline. If you're building a general-purpose library, then I agree with the guideline. If I'm building something to be used within my application, then I don't agree - I would rather build it into the library layer - where it is often more straightforward to write and easier to verify - than add it on on the application layer. I think it's more robust that way.

    I do agree that over-zealous synchronization can kill perf.

    In this case, though I didn't mention this, this was application-level code.

    Finally, Filipe suggested declaring a static object variable, and locking on that. Something like:

    class Notifier
       static object listLock = new object();


    This will work fine. Unfortunately, it provides one lock for all instances of the Notifier method, so that threads who are using different instances will still have to wait. In other words, the lock object isn't at the same granularity as the resource we want to protect.

    This is what you want to do if you need to protect a static resource and you don't have a handy instance to lock on.

  • Eric Gunnerson's Compendium

    Visual Studio Debugging Slowness - Solved


    My debugger had gotten slow recently. Really slow. Slow as in the "takes 20 seconds to hit a breakpoint" slow.

    After conversing with some of the debugger devs, it was discovered that there was an invalid directory in the "debug source files" list. One of my co-workers keeps the source for some code that we need on his box, and VS dutifully recorded that location to make my experience better. Unfortunately, when the new version of that component showed up, the directory was no longer there, and VS kept timing out trying to see if the file it wanted was there.

    The list is stored as a solution property. Right click on the solution, choose "debug source filse", and you'll find a list of locations that the debugger will search. Remove any cruft from this, and things get back to normal.

    This happened to me on Whidbey Beta 1. I'm not sure if it's present in Everett. The debugger team is thinking of (I'd say "planning to", but I don't want to speak for them...) adding some code to stop trying the same non-existant location over and over.

  • Eric Gunnerson's Compendium

    What's wrong with this code - #6


    After a long hiatus, here's the next entry in my not-really-regular-enough-to-honestly-be-called-periodic-(though-I-try-to-keep-up-a-somewhat-reasonable-schedule-I-don't-seem-to-keep-it-since-I'm-lazy-are-you-still-reading-this)-series about C# code.

    Anyway, here's some code that I've seen a fair bit, and written myself:

     class Notifier

       ArrayList items = new ArrayList();
       public void Add(object o) {
          lock (this) {
    This code will work fine, but it has a latent issue. What is the issue, and how should it be addressed?
  • Eric Gunnerson's Compendium

    IR Extenders


    Barry asked me how my components worked inside of the new stereo cabinet. I started to post a comment, but decided it warranted a full post.

    In our old house, my old Sony receiver sat about 5' off of the floor behind glass doors. Unfortunately, if you held a remote at couch level, it wouldn't work.

    This is true of the other Sony equipment that I have - it is both less sensitive to IR and has a more narrow cone of sensitivity.

    So, I need a solution, and settled on components from Xantech. There's a small receiver that sits where it can see the remote, a connecting block, and then an emitter that sticks to the IR window on the component. That solved the original problem.

    In this house, I upgraded the system. I have a receiver upstairs that is wired into a new connecting block, emitters on all the components and one that runs back to the computer in the office at the other end of the house, and 1/4" receiver that is in the shelf that's above the TV. The receivers need 3 wire cable that runs back to the connecting block, and the emitters only need two wires. IR signals are low frequency and low power, so they aren't picky about the kind of wire you run them on.

    I really like the Xantech stuff - it's well made, and with the exception of a few wiring problems on my side, has performed flawlessly. It's not cheap, however. The receivers run anywhere from $40 to about $100, the connecting blocks run from $10 to around $50, and emitters are $5 - $10 each.

  • Eric Gunnerson's Compendium

    Solving a problem


    For quite some time, I've had a problem. You may have the same problem. It looks like this:

    I've had a tall and wide entertainment cabinet for quite some time. It has three drawers for CDs and videos, a space in the middle for the TV, and the room at the top for components. It's on wheels, but given how big it is and how much it weighs, it's pretty much impossible to move on carpet. At our first house, it fit with another cabinet into a closet that I modified to fit perfectly, but in our current house, it hulked on one side of the room, taking up space and looking menacing.

    One of the reasons I wanted to buy our current house is that it had a closet in the corner of our rec room that had access from behind, and I could build an in-wall cabinet for the stereo components. But we needed to do it as part of a full remodel of the room. The first step was to have somebody else move the door to the outside to a more convenient wall. I tore out the old closet, built the new one, and built the hatch from behind.

    Then we did the floor, an Alloc one ordered from FloorShop.com. It's a wood-look laminate that is very durable, and proof against dog-claws. It took about 9 hours to do the whole room.

    Unfortunately, like most of our projects, I didn't take any good "before" pictures, but here's one during the floor installation:

    After the floor went down, we got ready for the next part. It was somewhat complicated by the fact that the outer walls were built on top of a 6" wide concrete base, which led to a 1 1/2" curb running around the outside. I handled that by furring out the lower section of the wall, putting 1/4" MDF over the furring, and then wainscotting and a 1x4 shelf to cap it off. To balance off the rest of the room, we did normal wainscotting around the inner walls of the room. All of the wainscotting and trim is made from vertical grain fir. The wainscotting rails and stiles all have a 1/4" bead routed into them (that took a ton of time).

    The stereo cabinet carcass fit into a framework of 2x4s that I built into the closet. It was made out of maple plywood, with a cherry-ish stained interior and black shelves, to match the entertainment center than we bought. The frame and door are built out of alder, designed and stained to match the entertainment center. The faux finish on the upper half of the room was done by my wife and daughter.


    The electrical box will have a picture on top of it to hide it.

    Here's the final view of the front of the room. Click here for a high-resolution version.

    Total cost estimate:

    Flooring                  $1500
    Wood for trim         $  800
    Cabinet wood         $  250
    Paint                       $   50

    Total (ish)               $2600

    I won't include the router bits and other tools I bought, but they total somewhere around another $200. At least, that's what I like to tell myselves.

    Up next -

    Tile for one of the bathrooms.

    New walls and insulation, then tile for the utility room.

    New walls, insulation, and flooring in the office.

    Three decks (two replacement, one new one).



  • Eric Gunnerson's Compendium

    Slacker Astronomy


    I've been listening to the Slacker Astronomy podcast for a few weeks now. It's really nice to have some hard science presented in an enjoyable and humorous context.

    Noteworthy shows:

    The Big Bang Rambles On (MP3)

    If you've ever wanted to know how we know the age of the universe and that the big bang happened, listen to this.

    The Big Bad Astronomer - Show #5 (MP3     extended-version (longer, but more interesting))

    An interview with the creator of Bad Astronomy.

    I use Doppler as my client. The betas for Doppler are distributed as podcasts (bitcasts? codecasts?), so new versions just show up on your machine, and you can install them as you wish.

  • Eric Gunnerson's Compendium

    Silent Bob Speaks - An Evening with Kevin Smith


    Last week, two DVDs showed up from Netflix. Because of the speed at which we've recently gone through movies, there are a number of old items in our queue, and the two DVDs I pulled out were "An evening with Kevin Smith", part I and part II.

    Kevin Smith, of course, being the irreverant filmmaker who bought us movies such as Clerks, Mall Rats, Chasing Amy, and Dogma.

    I'm a big fan, but, since Kevin plays the character "Silent Bob" ("Mostly silent but occaisionally insightful Bob" would be a little closer to the truth) in his movies, I didn't quite know what to expect. Something like "Inside the Actor's Studio" seemed likely, and my wife and I settled down to watch.

    What we got was the highlights of Kevin fielding audience questions at a number of university appearances. I knew that Kevin was a gifted storyteller, but he is able to do the same thing on stage.

    These DVDs are hugely entertaining. If you're a Kevin Smith fan, you should definitely see them.


  • Eric Gunnerson's Compendium

    PIC Programming Help?


    I've come up with a project for next year's holiday display, and I think I might want to build 7 or 8 copies of a single microcontroller circuit. I need to use a controller that's relatively cheap, and it seems reasonable to consider the PIC.

    So, I'm looking for good links, either online or books, to get started.

    I've never programmed embedded systems professionally, but I've done 3 68HC11 projects, all of them written in assembler, one of them hard real time (but still pretty simple, overall).

    I'm also looking for a decent programmer, and perhaps a C compiler.


  • Eric Gunnerson's Compendium

    Deep Windows - Inside the NT Kernel with Dave Probert


    I spent part of this morning watching/listening to a series of interviews with Dave Probert, an architect on the kernel team. Lots of interesting data about why Unix and NT have the structure they do and why, and lots of information about how things work inside NT-based systems.

    Cool stuff. I got it from the Channel9 podcast feed, but you can find the individual videos here.

    Part I
    Part II
    Part III

    Part IV


  • Eric Gunnerson's Compendium

    37 galaxies per hour


    [Update: Fixed BigPhotoHelp link]

    A Hubble image showing some 10,000 galaxies, created from a total of 11.3 days of exposure time.

    I downloaded the 61 MB full-resolution JPEG, and then uploaded it to BigPhotoHelp and ordered a 24" x 24" print (for about $20, delivered).

  • Eric Gunnerson's Compendium

    Windows Media Dev Center Launches


    I've spent some time working with Windows Media SDK (s) in the past, and had some trouble finding things.

    I'm happy to announce that there is a new Windows Media Dev Center to make that easier.

  • Eric Gunnerson's Compendium

    Who says the arts are dead for the younger generation?


    Who says the arts are dead for the younger generation?

    Most of these are after my time, but I did get the most obvious one.

  • Eric Gunnerson's Compendium

    More information on web forums


    Josh Ledgard pointed me to this introductory post about the the new web forums...

  • Eric Gunnerson's Compendium

    Go ahead and panic...


    I wrote earlier about some misgivings about the upcoming Hitchhiker's Movie.

    Okay, I blew one issue out of proportion.

    But today, I came across a review of a pre-screening of the film by MJ Simpson, author of the biography, "Hitchhiker".

    There's a short review, and a long version, with spoilers. He starts the short review with:

    The Hitchhiker’s Guide to the Galaxy movie is bad. Really bad. You just won't believe how vastly, staggeringly, jaw-droppingly bad it is. I mean, you might think that The Phantom Menace was a hopelessly misguided attempt to reinvent a much-loved franchise by people who, though well-intentioned, completely failed to understand what made the original popular - but that's just peanuts to the Hitchhiker's movie. Listen.

    (a nicely-written takeof on "the universe is big...")

    The long version concludes:

    Hitchhiker's is not so bad that it's good. It's just miserably, depressingly bad. It misses the point by a light year. Is it a good movie? No. Is it a good version of The Hitchhiker’s Guide to the Galaxy? Definitely not. It is ill-conceived, badly written, poorly directed and worst of all staggeringly unfunny. It is a travesty of a film. I mourn for it, I really do.



  • Eric Gunnerson's Compendium

    Cleanliness is important

    Cleanliness is important
  • Eric Gunnerson's Compendium

    Web Forums 1.1 now available...


    Web Forums 1.1, the new place to ask questions around Whidbey beta 2 and related technology.

    I hope this is a replacement for our newsgroups...

  • Eric Gunnerson's Compendium

    Product feedback and language design


    I got an email today with a suggestion for a C# language enhancement, and I pointed the person to the MSDN Feedback Center, which is the best way to give the language team usable feedback. If a lot of people want something, it helps aggregate the feedback into something more definitive.

    Note that popularity doesn't ensure implementation, for reasons that I've covered in the past.

  • Eric Gunnerson's Compendium

    Design question


    You need to design the outside of a fish. What is the first thing you do?




    You build a scale model.

  • Eric Gunnerson's Compendium

    I need handheld advice...


    My 10-year-old daughter has asked for a portable game system for her birthday, and my ignorance in that area is considerable, so I'm looking for some advice.

    I looked at the new Sony PSP. It's beautiful, but I think $250+ is way out of the price range, and, being new, there aren't many games for it.

    So, what should I consider? She's probably going to be renting most of the games (at least initially). In the PC, she spends most of her time on games like zoo tycoon, though she has wider-ranging preferences on the XBox (anything from Fusion Frenzy to driving games to a bit of co-op Halo with her father...)

Page 1 of 2 (29 items) 12