• A stab at another VPS

    Several weeks ago, the VPS (virtual private server) that I use to host my blog and Web site went down for more than 6 hours. The service, like most VPS services, has a 99%+ uptime guarantee. Well, the uptime guarantee is kind of useless as the site is still down and the few bucks credit I got aren't really worth much. Their support folks didn't get back to me until the end of the outage and then gave some excuse that they were short staffed. By the time the site had come back up, I had already signed up with another VPS and restored my site (I have scripts on the VPS that backup nightly and then everyday, my Mac syncs down the backups). The whole setup process takes me about 2 hours as my VPS isn't all that complicated.

    So, now I'm trying out 123Systems Solutions on their second level VPS (25 GB disk space, 1 TB traffic, 512 MB RAM burstable to 1 GB). I found a discount code and brought the price to just over $10/month. Like the last one, they offer an uptime guarantee. This one has only been around for a few months, so we'll see. Worst case is I move my VPS again; a little time consuming, but definitely not the end of the world. They have been quite responsive when I submitted a ticket and have communicated when they'd be short staffed. I'm also impressed with their control panel to manage it. However, their reverse DNS doesn't seem to work properly. Oh well, not the end of the world.

  • My new office

    Yesterday, my wife asked if I wanted to come with her to pick up our son that was spending the day at my parents. I asked her what time and she said that she'd leave around 4pm. Hmmm, I had a 4 pm meeting. I said "sure", but she'd have to drive. 4 pm came around, I got on my phone call, turned on my Sprint MiFi, switched my Mac over to the MiFi's network and was all set.

    I hopped in the car, put the MiFi on the dash and my wife drove. The hard part was seeing my screen, so I had to put a jacket over the screen.

    No one was the wiser about my mobile office! We didn't encounter any dead cell spots, so the call went flawlessly and I was connected for the entire 30 minute or so ride.

    I've had a MiFi for about a year, but for some reason I didn't use it much. Now that I'm paying for my own service, I feel compelled to use it to its fullest.

  • Leaving logging statements in production code

    I've written in the past about how I think that leaving logging code in production or release builds is bad practice. While I have no objections to being able to turn debug logging on or off to help troubleshoot problems in the field, it shouldn't be on by default. Recently I've read conflicting views about leaving NSLog statements in code. One really good solution is:

     


    #ifdef DEBUG_MODE
    #define DebugLog( s, ... ) NSLog( @"%s %@:(%d) %@", __PRETTY_FUNCTION__,\
    [[NSString stringWithUTF8String:__FILE__] lastPathComponent], __LINE__,\
    [NSString stringWithFormat:(s), ##__VA_ARGS__] )
    #else
    #define DebugLog( s, ... )
    #endif

    (I've modified the solution a little.)

    Then in Xcode's build settings, add a preprocessor macro for DEBUG_MODE. Presto, NSLog statements never make it into shipping code. If you need to turn the logging on and off, I like to write the statements out to a file so that they don't pollute Console and it makes it easier for users to send me logs. Furthermore, I've seen NSLog cause crashes because the developer passed the wrong arguments or did something like NSLog(@"test: %d, self). This type of bug should be fixed, but using the above logging would prevent the crash in production code.

     

  • Tenets of software development

    Lately I've been talking to people about some development projects and I keep repeating my 2 tenets of software development. The first is from Brian Hall of Mark/Space. He used to say

    Shipping is a feature.

    While this sounds quite simple in nature, it's pretty important to any product. Not only is shipping a feature, I think it is the number 1 feature. My second tenet is something that I came up with when more and more features were added to a project and QA kept finding issues.

    Software is never done; it's just shipped.

    Now you're probably saying that these are either obvious or just plain idiotic. Anyone that has done software development for anything length of time has to agree with the second. How many bug fix releases have you done? I may strive to be a perfectionist, but I'm also a realist. You can spend forever making software perfect, but you'll never reach the end.

    It's important, in my opinion, for anyone in a software project to be on the same page with these tenets. Without these, you can't ship a product which means you can't make money. There aren't that many companies that I know of that can survive without shipping products and making money (OK, maybe there are companies that only do government contracts and keep taking money without shipping something that works.)