• Why all the fuss over working from home?

    With the recent announcement/leak that Yahoo! is requiring all its employees to work from an office, I've been thinking a lot about my own experience working from home. I've been working from home for over 13 years; my first experience working from home was forced upon me with the closure of my office, but this second stint was my own choice. For my work style and ethic, I could never work in an office again. I do put in a full workday every day as well as work extra hours when needed. However, I'm also not chained to a desk and can get things done during the day, if needed. While I'm not alone in never wanting to work in an office again, working from home isn't for everyone. In fact, I'd argue that most people should never work from home.

    Working from home takes a certain dedication, motivation, and work ethic. In most cases, I believe that this should be reserved for the cream of the crop employees and be decided on a case by case basis. I've seen working from home abused by many employees and what Yahoo! is doing may make sense for it. However, they have the possibility of losing their best employees over the new policy.

    Several years ago when my business was down significantly, I interviewed for a position with a local company. Like Yahoo!, their policy was that all employees had to be in the office. As someone who had worked from home for many years prior to this, I was quite torn about the position. In the end, I determined that my quality of life would suffer if I had to work in an office and commute up to an hour and a half round trip each day. Not everyone has this luxury, but a policy that is supposed to foster collaboration could backfire if it reduces overall employee satisfaction.

    Even though I work in a large company, my entire team (except for one project manager) works from home (we're all in different cities). We've actually never worked in an office for this company, but were hired as remote employees because great employees are hard to find and dictating where someone must live and come into an office drastically reduces the potential talent pool. If my company were to enact a blanket policy where no one could work from home with no exceptions on a case by case basis, I'm almost sure we'd all leave. My team is extremely talented and forcing us into the mold of an average employee is fraught with disaster.

    Hopefully Yahoo! doesn't lose too many good people (if you're a mobile developer at Yahoo! and are looking to leave, please drop me a note) with this move. In addition, maybe the policy can be revisited on a case by case basis so that the top people have a lot more flexibility. In our highly mobile workforce, lumping everyone together is a recipe for losing people.

  • Developers going indie

    Over the last few years, I've read about a number of developers that have "gone indie" in that they left their jobs and are now independent developers. Maybe make it sound glamorous that they no longer have a boss. While this technically may be true, they still have to answer to someone, be it their clients or their customers. There is nothing inherently wrong with being independent, but thinking that doing this will make all of someone's work problems go away is misleading.

    People that are self employed swap one set of problems (e.g. working for a large company) with another. Being self employed means doing accounting, marketing, sales, support, etc. (or hiring someone for these positions and having to be a people manager). In addition, income is not guaranteed which could lead to stress and many people have a hard time separating work from home and thus put in more hours at their "job". I'm not saying that working for someone else is better or that being self employed is better (I've done both), it is just different.

    I personally had a good run being self employed (granted my independent software business was only about 20% of my income with the rest coming from contracting), but at this stage in my life, working for someone else brings stability and has actually reduced my stress over my job (I have other stresses, but work isn't one of them). When I was self employed, I used to put in 70+ hours per week between my software and contracting. This was not sustainable for me.

    I wish developers going indie the best of luck, but just because I work for someone else (a large company in my case), I'm not a sellout and have no regrets.

  • Review: Mophie Juice Pack Air for iPhone 5

    One of the problems with any battery operated technology is that it is completely useless when the battery runs down. This, of course, has lead to a huge industry of aftermarket battery packs and charging mechanism for every gadget we use. While I'm not a huge user of my iPhone, I have found that when I travel, I am a little more cautious about using my phone for fear that I'll run out of juice on my phone and not be able to make an important call or will miss a message from home at the end of the day.

    Last year, before WWDC, I bought a Mophie Juice Pack Plus for my iPhone 4S and used it on all my trips. I don't travel all that often (on average about once a month), but I felt a lot better knowing that my phone would last all day. There are lots of tips for extending the battery life of a phone, but they all require futzing with settings and reducing the utility of the phone (one tip is to turn it off as the battery is getting low so that you can turn it on later to make an important call; it's hard to receive a call or check email when it is turned off!). The Mophie case was an excellent solution and served me well until I got my iPhone 5.

    I've travelled a few times with my iPhone 5 and haven't had much of a problem with battery life, but have topped it off before dinner on trips as it usually got quite low. When Mophie announced their latest cases for the iPhone 5, I knew I had to get one as WWDC is coming up again and I have a few more trips as well. In addition, now that I have a Pebble, I have to leave Bluetooth on all day which drains my battery a bit without doing anything. It was a no-brainer to order the case; it just was a matter of timing. I finally bit the bullet last week and with an estimated shipping time of 7-10 days, I figured I wouldn't receive it in time to give it a whirl on my next trip. However, Mophie's super fast shipping got it to me in a 3 days.

    I hadn't read the details on the Mophie site close enough to catch a small gotcha with the case; it wasn't until I heard the case as a "pick" on MacBreak Weekly that I learned of this gotcha. The pass through connector used for charging only charges and doesn't allow for syncing. As I don't use the case all the time and it is easy to remove, it isn't a huge issue.

    The other quirk is that the headphone connector is so far recessed and small that Mophie provides an extender cable. The Apple supplied headphones fit fine, but are a bit difficult to plug in and remove.

    I gave the case a test drive on my most recent trip, but somehow, my phone didn't drop below 15% even with talking on the phone for 1.5 hours, getting a bunch of email, receiving a few text messages and having Bluetooth on. So, while I was prepared to flip the switch on the case to recharge the battery, I didn't have to do it. Does this change my review? Well, not really, the only part I didn't test was "would it charge" and I have to assume it will otherwise I have a dud.

    Pros

    • It charges the battery.
    • It provides some protection on the side.

    Cons

    • Adds weight and bulk to the phone.
    • Pass through connector only charges and doesn't do data.
    • Pass through connector isn't a lightning connector. (I don't like micro USB as it is hard to insert correctly on the first try.)

    Summary

    If you find that your iPhone 5 drains its battery during the day, then having a battery case is extremely useful. Is it worth the $99 cost? That is really going to depend on your usage. I'm glad I bought it so that I don't have to worry about having a charge. While I have another external battery that lets me plug in a USB cable, it just isn't convenient. It is a lot cheaper, but when I've tried to use it, having it in my pocket with my phone and cable was too cumbersome to be a real solution. I won't use it all the time, but now I have it just in case. I'm sure that on longer trips it will come in handy. This first test trip ended up being a short day with me leaving my house around 6:30 am and arriving home around 7:00 pm.

  • Flaws in RESTful response codes

    Anyone that uses or develops APIs is familiar with REST. It is widely used and by some developers considered superior to other ways of doing APIs. Since REST was developed alongside the HTTP 1.1 spec, HTTP status codes are generally used for responses to REST calls.

    To me, it seems that using the standard HTTP response codes (a nice list is given here) is overloading a standard server response with the response of a query. While the spec says that for client errors (400 series errors), the response should contain the reason why in the response. I've looked at a lot of APIs and the best ones at handling errors return the error response inside of a successful 200 HTTP response. For instance, if you are creating an API for dealing with support tickets and you ask for a ticket ID that doesn't exist or you don't have permission to access, returning a 400 series error generally tells the client that something bad has happened when, in fact, the error is kind of minor. Embedding the error in the response seems like a better way to go.

    The problem, however, with embedding the error in the response is that the API developer has to come up with his own error codes and convey that to those that use the APIs. Many developers that implement APIs treat anything but a 200 series response as a complete failure and give up. So, the API developer has to make sure that the client implementors properly handle the responses. In general, I find it easier to have one set of parsing code and deal with the errors inside of a successful response.

    My argument, of course, is not very compelling as it is simply to swap one way of handling responses and errors with another. Last night, however, I came up with a potential argument that leads credence to what I'm saying. If there is a proxy server or a load balancer in front of the server, it could potentially return an error code which the client may not expect. Let's take the case where our support ticket server is behind a proxy server and the client requests a particular ticket. If the proxy server or load balancer is misconfigured and we make a request, the proxy server could return a 400 series error, even a 404 error. The client could interpret this as "the ticket doesn't exist". This may not be the case; the ticket could exist, but the proxy returned an error. A better way of handling this would be to use 200 series status codes when the request succeeds and embed the API error code inside of the response. If the proxy server returned a 400 series error, the client could always treat it as an error and wouldn't have to figure out if the support ticket really existed or not.

    In addition, the HTTP status codes are not granular enough for many APIs. This would require the API developer to have a secondary set of error codes that would be returned with the 400 series error codes anyway. If that is the case, why not just create one set of error codes and always return 200 series success codes unless something major has happened?

    I know that some of this may be confusing (it is crystal clear in my head), but it is worth some thought to consider the best way to handle response codes in APIs. Many people have opinions on this and may think that I have no idea what I'm talking about and HTTP response codes are perfectly fine for RESTful APIs.