• Praising Synology's Customer Support

    A few months ago, after hearing Synology’s products being discussed at ATP and researching a bit, I decided to give it a try.

    As I wasn’t sure how was it going to work for me, I got a DS213j1 and (rookie mistake) only put inside a single Western Digital Red hard drive. On February 18th, I woke up to find my DiskStation was not showing its volume and any of its shares.

    While most of the information I have there is (yet) not critical, I am using a combination of Photo Station and DS Photo+ as a Photo Stream replacement, so this crash found me with some pictures and videos of my kids having its sole copy on the DiskStation. I Googled a little bit, and even tried some terminal commands on the DiskStation, but before breaking something, decided to contact Synology’s support to see how they could help me.

    I opened a ticket around 7:30AM, and a few hours later, by noon, I got an answer asking me for the admin password and SSH access. An hour after I had answered, my issue was solved and the volume was mounted back. Amazing.

    The only thing I would have liked more, is to know exactly what the technician did, so I could reproduce it should it fail again in the future, but since BusyBox lacks a history command, I can’t retrace his steps.


    I still don’t know what happened, but my hard drive is showing a SMART error, so I’ll ask for a RMA as soon as a new disk arrives so I can mirror the data (and when I get a replacement drive back, I’ll have both set up in a RAID 1 arrangement).

    Lessons learned

    • Synology support is amazing, contact them if you run into any issue.
    • Always configure your DiskStation with RAID and have some sort of redundancy. I was always planning on doing it, but I started storing crititcal information before I did.
    1. Now that I’ve used it for a few months, I think I made a mistake with my decision. A NAS is a longer term investment than an external HD enclosure, so if you can affort it, choose one that’s more expandable (4 bays instead of 2), and has more features. Mine is lacking front USB and SD ports (which I might have used a few times) and doesn’t have the ability to run Plex Media Server

  • Using PostgreSQL hstore with Rails 4

    Rails 4 has native support for PostgreSQL hstore.

    Sadly, the tutorials and documentation I could find online, only point to how to use them with Rails 3, and only mention there will be “native” support with Rails 4.

  • Speculating Apple's future through its present

    Trying to guess what future products Apple will unveil is a game you are bound to loose. That said, I still find it a game I enjoy playing.

    Right now, I think we are in a rare position where Apple has laid out the foundation for several different things they can pursue in the future. I don’t know if any of these will materialise (and if they do, how) but I love speculating about it.

    Here are a few technologies Apple has recently launched, and is basically hiding in plain sight.

    M7, Core Motion and Wearables

    The iPhone 5s ships with a motion coprocessor called the M7. Basically the M7 is a small processor (sidekick in Apple’s parlance) that gathers information from the accelerometer, gyroscope, and compass and keeps it to be easily accessible through the Core Motion API.

    The M7 is a great concept: keep a small processor always on, so not to drain the battery of the device by powering a more hungry A7 chip.

    Core Motion seals the deal: it provides you simple APIs to gather that data based on time intervals, so your app can easily get that information and present it to the user with no data gaps.

    Here’s where I think wearables could be tied: imagine an M7 processor on your wrist, linked to your iPhone with Bluetooth LE. Core Motion can then work as a data aggregator and present the developer consolidated information from either the built-in M7 in the device, or a paired remote M7 processor in a wearable device.

    iOS 7 Game Controllers support and the Living Room

    Besides all the user facing changes, iOS 7 introduced several under the hood changes as well. One of them was support for third party game controllers developed under the MFi program. iOS 7 was released, but the controllers were not (at least, not yet).

    At the same time, the Apple TV (which also runs iOS, in case you were distracted) was updated to version 6.0, based on iOS 7. I can only guess that the support for controllers is baked in there. Moreover, besided the new setup feature in the Apple TV, its Bluetooth capability was always a mistery to me (pairing a keyboard? …).

    I hope Apple is thinking to make a bigger entry into the living room and using the existing Apple TVs as a trojan horse, as opposed to shipping a full fledged TV set. I still would love to see the extension to AirPlay I discussed here, although an App Store (or channel store) would be welcome as well.

    Auto Layout and Bigger Screens

    With the transition to iOS 7, Apple strongly suggested developers to adopt Auto Layout. It’s reasonable, since native controls in both iOS 6 and iOS 7 have different intrinsic sizes, so basing a UI on sizes instead of constraints wouldn’t work.

    However (and I don’t think unexpectedly by Apple), this opens the door for easier support of more screen resolutions. The push for bigger screens on phones is here to stay, and while I like Apple’s 4 inch form factor a lot, there’s a huge market for bigger devices as well.
    Doubling the resolution is no longer an option (or at least, an option that would make any sense), so the only feasible direction without supporting other resolutions would be to base a bigger iPhone in the DPI of the Retina iPads as speculated by Marco Arment. While I agree that this is the simplest path for having a bigger size display, now that most apps will be supporting Auto Layout, having a slightly different screen size might not hurt as much1.


    With an event in October all but confirmed by Apple, let’s see if any of these speculations materializes. As always, any feedback if appreciated!

    1. The transition away from textures helps as well. In iOS 6 it was common to include PNG files exactly sized for nav bars and other stuff. With iOS 7, a lot is conveyed with colors and blurs, making that obsolete while helping a transition to multiple resolutions as well. 

  • Interfacing with a UIWebView from a UIViewController

    If you are into iOS development chances are that you have already discovered (or been told) that UIWebView is a powerfully beast that can be used from more the displaying remote web content.

    In past projects I’ve relied heavily on UIWebView to display rich content format by using a local HTML file included in the main bundle (with external CSS and JS files also there). Doing so is straightforward, but sooner than later you might run into the issue of having to interface with what’s running inside the UIWebView from Objective-C or vice-versa. Luckily both are easy to implement and add a extra layer of power to using UIWebView as a rich content display.

  • Why a cheaper iPhone makes sense to me

    For the last few years, whenever Apple introduced a new iPhone, it kept the previous generation (or previous two generations) available for sale at lower price points. Rumors this year point at lower cost (or plastic) iPhones that would change this strategy. I see at least a couple of reasons why having an updated iPhone to cover a lower price point makes sense.

    Different constraints

    When designing any hardware, the team must work under a set of constraints. These contraints change based on different factors: available technology, target usage, etc. This is why the iPod shuffle is so different to the iPod touch. Which leads me to my point: the set of constraints Apple used four years ago were those to have the best possible iPhone, not to have a two-generations-older-and-cheaper one. Were Apple to produce an iPhone today to be sold at a lower price point, would it use the same constraints during the design phase? I don’t think so. If we see the Mac or iPod product line, we can see different devices created with different constraints in mind, even if some factors such as portability are similar (see for example the 13 inch MacBook Pro with Retina Display and the 13 inch MacBook Air).

    The question we should be asking ourselves is: what are the features that would make the cut if an entry level iPhone were to be designed today? I don’t know the answer, but it sure looks like the purportedly leaked plastic iPhones are a closer answer than the old iPhone 4.

    Rapidly evolving technologies

    Assuming the upgrade cycle of users is about two years1, a person who gets an iPhone 4 today will have in a year a device that was introduced almost four years before. In that period a lot of things progressed: we enjoy better wireless speeds, bigger screens, faster processors, more memory, a lightning connector, etc.

    A wireless chip that provided LTE with acceptable battery life was bit available by the iPhone 4S time, but was a reality by the 5. Same for faster WiFi, Bluetooth 4.0 or better battery technology.

    By having an iPhone product line Apple could better manage the update cycle of not only the top of the line device, but all of them, by doing incremental revisions to the hardware that take advantage of better technology available each year. This will produce a way better bottom of the line device than offering a few years old device, tied to past technology.

    Final thoughts

    Even if the new entry level iPhone end up not being any cheaper2 than the two generations old device it might replace, it might certainly have advantages for its buyers, and will probably see a more regular update cycle, keeping the iPhone with the best available technology at all its price points.

    1. Although carriers seem to be pushing for more frequent updates with new offerings. 

    2. I do expect it to be cheaper though. Wouldn’t it be great if you could walk in to the Apple Store and leave with a factory unlocked iPhone at a price point not too different of that of a current iPod touch?