The Johnson Blog

Ramblings of a geek with a few hobbies…

Category: General

  • Chef 1.2 Available for Download

    Version 1.2 is now available; get the upgrade if you’re already a user, or give it a try for the first time!

    This release contains a few bug fixes and enhancements as requested by users.  The best new feature is Recipe Scaling, check it out.

    Also along with this release is a modified installation procedure.  Rather than having an enormous download upfront, which tends to scare people away, I wait to download the database engine until installation time.  I know that’ll annoy some people, so I also have the full package built and ready for download too.

    I spent a little bit of time making minor changes to the website.  I’m not a good web designer so I realize it could look much better, but oh well 🙂

    www.ejichef.com

  • Happy Halloween!

    Happy Halloween everyone!

    Ana decorated the house quite nicely and in a manner fitting her Black Widow costume.  Teresa and Robert brought Emily by before she went out for some candy, she looked great in her Elmo costume.

    Katherine came over (also in costume) and helped feed the hungry trick-or-treaters.  Ana wouldn’t have been able to keep up with all of the traffic without Katherine’s help.

    We were then visited by the infamous Nottingham Family (no blog to link to… ahem… ahem…), complete with an Astronaut (Cameron), Witch (Emma), Rock Star (Cici), and Thomas the Train (Max). It’s always loads of fun when they stop by; I sense some eggrolls on the horizon..

    Finally, not to be left out, Ana’s parents, who are celebrating their 30th wedding anniversary, also stopped in for a visit. In costume!

    Thanks everyone who came by this evening, t’was fun.

  • Another Sonogram

    Here are a couple photos from the sonogram this morning: regular, 4D (not sure why it’s “4D” instead of “3D”).

    The baby is measuring 4lbs 10oz, with 7.5 weeks remaining.  Wooo.

  • Hematologist

    Today we met with the hematologist Ana has been seeing since her hospital visit. She had a blood test run and it came back at 27,000. “Not good, but OK” according to the doctor. We continued talking with him and asked explicitly about what would happen if she needs to give birth and her platelets aren’t at the levels the other doctors say they want them to be (50,000 for delivery, 100,000 for epidural). Much to our relief, he explained that once a bag of platelets gets infused, she’ll have levels of 250,000 in her. Her body would attack them as they have been, but it would be plenty high for delivery. And he would just keep giving her the platelets as long as she needed them to get her through the delivery.

    Whew. I wish we would have asked that question 3 weeks ago.

  • FTP problems on Windows Vista

    This is an addendum to On Windows Vista from a couple months ago. This weekend I’ve been making some modifications to the installation process for Chef, making it so the database engine isn’t packaged with my installer and making it such an enormous installation package. So now I have it so that when Chef is run for the first time, it will (if needed) download the SQL Express install from my website.

    All fine and dandy, until I needed to upload the SQL Express install to my hosting account. I usually just fire up my FTP client and never think twice about it. Well this time it didn’t work. A couple megs would be uploaded and then the client would ask me if I want to overwrite the (incomplete) file on the server. I tried several times with FileZilla to no avail. Then I tried SmartFTP which is certified for Vista. Same thing. Figuring I couldn’t go wrong with WS-Ftp, I gave that a shot and it too failed.

    Today I tried the upload from my Windows 2003 server using FileZilla, and it worked without a hitch. WTF.  Just to rule out a problem with my internet connection the previous day, I tried again from my Vista desktop and it failed once more.

    Has anyone else seen such behavior?

  • CWLP Tour

    CWLP (City Water, Light & Power for those not from Springfield) was giving tours today of the new coal power plant which is under construction. My parents, Ana and I went and found it to be pretty cool (surprise, surprise!) and I’m glad they opened it up to the public. Construction is supposed to take another two years and it sure would be cool, if doubtful, for them to offer tours of the finished product.

    I’ve got a few of the pictures online, feel free to peruse them.

    I don’t think they view this, but here’s a funny shot of my parents. Caught mom a little off guard with the camera 🙂

    ————CENSORED IMAGE—————-

  • C# operator== overloading

    I recently came to a situation where operator overloading C# (specifically the == operator) would really be beneficial. Since I’ve typically steered away from this technique, for readability and maintainability, I hadn’t had much experience with it.

    My overloaded operator looks something like this:


    static bool operator==(Id<T> a, Id<T> b)
    {
    return a.Value == b.Value;
    }

    That has been working just as planned for a few months now, but today I hit a snag when trying to do a null test against a variable of that class type, like:


    Id<int> x;
    ...
    if (x == null)
    {
    ...
    }

    This causes a nice null reference exception at a.Value because a is null. My first thought was to test for null in the operator== method before I attempt accessing a.Value (or b.Value), like:

    if (a == null)
    {
    return b == null;
    }
    else
    {
    return a.Value == b.Value;
    }

    Thinking I had the problem fixed, I reran; and quickly hit a StackOverFlowException. What the? Ooooh, the if (a == null) was causing that method to be called over and over, recursively until it blew the stack! OK, now how the heck can I test against null without the operator== being called??

    After a moment of slight panic, I realized how to get around it. When doing just if (a == null), the Id class’ static overload is being called. The way out of this is to have the object class’ operator== explicitly called by making a simple change:


    if ((object)a == null)
    {
    return ((object)b == null);
    }
    else
    {
    return a.Value == b.Value;
    }

    And that’s it! I now have an overload that handles null checking.

  • Blood Test

    Ana has a blood test scheduled for 8am tomorrow morning.  We’ll see if the last visit did any good.  Stay tuned for more information.

  • New Url!

    You’ll notice the blog has a new domain, http://www.thejohnsonblog.com.  Please update your links and bookmarks accordingly.

    The migration went well, I think I got all internal links modified.  We’ll see!