Saying goodbye to Google Analytics, Hello Piwik

In my previous post, I mentioned that I was looking at reducing my dependence on free services as an experiment to see if I can improve my privacy.

That post was about changing my behavior as a consumer. This time, I’m looking at the services I use in my personal development work, especially those services that feed ad networks. In the case of my personal sites, this means Google Analytics (GA).

I did some looking around, and decided I want to be close to the same functionality as GA. It’s not a fair comparison if I don’t have the same features, so that criteria limited my choices.

After some poking around, I settled on running Piwik. It’s open source, free, and can be self-hosted on hardware I control. It seems extraordinarily customizable, though I haven’t done much here.

There are other choices like Mint or Woopra or Snowplow. There are actually more commercial options than I realized, in addition to the giants like Adobe’s Marketing Cloud (aka Omniture).

Ultimately, I chose Piwik because of it’s simplicity, it’s feature set, and it’s flexibility. I wanted to own the data1 and I also wanted the ability to keep up with a massive site if necessary.

So far, so good.

My Piwik Setup

I setup a cheap VPS somewhere, created a domain to host the server, and then ran Piwik on that single box. It looks like the service could have been installed on my simple web hosting account at Pair Networks2 with room to grow, but I wanted to work through the server setup for a refresher on setting up a VPS from scratch.

I then followed the Getting Started guide. That’s pretty much it.

Setup was also not as smooth as hoped. The configuration wizard has a bug, for example, that wouldn’t let it complete (I fixed it locally because I could – yay open source). It’s also non-trivial setting up an Apache server with SSL enabled when you haven’t done it in a while.


Piwik has a hosted option where I still own the data, but it’s not cheap (Piwik Cloud is minimally $29/month). Not the best option for me.

The good thing is that the software itself is free. Of course, nothing is exactly free. Here are some of the costs I ran into:

  • hosting for my own Piwik instance
  • SSL certificates to enable HTTPS
  • GeoIP database for accurate IP to location lookups (I ended up sticking with their free option)

This list doesn’t include my time getting all of this running, plus the time required each year to make sure the servers are secured, running the latest security patches/upgrades, and are monitored.

Looking back on it, Piwik Cloud might have been worth it when you consider the time & money spent.

Bye Google Analytics

I’ve removed Google Analytics from my main personal web projects, and replaced it with the Piwik tracking call. Since my server is the only thing that sees this data, hopefully people are more willing to whitelist the tracking domain in their ad blocker.

  1. I’m surprised more companies don’t setup their own analytics, at least in addition to their primary service. A lot of interesting things can be done with the raw data.

  2. Which I recommend: use this referral link to give me credit.

On the New MacBook

I’ve been using the new MacBook as a personal travel laptop for the last month or so. I’ve been coding and writing blog posts with it and I wanted to share my experiences.

If you care about these sorts of things, I’m sure you’ve read countless reviews of the device. So I won’t try to cover everything. Instead, I’ll hit on a few specific things that matter to me.1

This thing is liiiiight

So, I bought this sort of on a whim. I had to travel quite a bit recently, internationally and with a lot of luggage already2. I’m working on an app for myself, and using that to learn Swift. I couldn’t justify the weight of a second laptop in my carryon, so I couldn’t/didn’t want to bring my own MacBook Pro in addition to my work laptop.3

For this scenario – a second, lightweight companion laptop – this thing is perfect. Far better than an iPad with a keyboard, because it runs OS X, and light enough that it’s like carrying a book. I hardly notice the extra weight. It’s just awesome.

Yes, the keyboard is weird (trackpad, too)

The keyboard is a polarizing feature. Reviewers seem to love it or hate it. I love it. It does take some getting used to, but once I did, I am able to type on it as fast as I can on my MacBook Pro. Switching between the two keyboards is my biggest problem. I make a few more mistakes when I first get on the Macbook, but it goes away quickly.

The bigger problem for me is that the keyboard layout is actually subtly different. Arrow keys and the Fn keys are the big ones for me. I still haven’t figured out the arrow keys, and still stumble around on those regularly. Thankfully I tend to code in things with Vi keybindings, so it doesn’t mess me up as often as it could.

For what it’s worth, I typed up the Mobile in India blog post on my MacBook (and this post, too).

The trackpad is similarly uncanny valley-ish, but more easily ignored. I sometimes tend to crash down on the trackpad to click it (trying to stop the screensaver from kicking in, for example), but since it doesn’t give, the haptic feedback illusion breaks since it doesn’t match the force with which I hit the trackpad.

Performance is merely OK

The Intel Core M processor used in the laptop is Intel’s attempt to build a tablet/hybrid processor. The processor also limits the amount of RAM. It’s OK for most things, but the laptop does struggle with anything that’s pushing a lot of data around. Overall, I see the beachball a lot more than I ever do on my MacBook Pro.4

That said, I run Xcode, I compile apps, and for the smaller applications I’m working on, it’s fine.

On the other hand, for writing blog posts, emails, and that sort of thing… this thing is PERFECT. I love it so much that I reach for it now when I want to sit down to write. The small screen minimizes the temptation to have distractions visible, and the retina screen makes reading type easy on the eyes.

Should you get it?

Depends. If you prioritize weight over performance, this is perfect. In any other scenario, the MacBook Air or the 13” MacBook Pro is a better choice.

For the developers, this cannot be a primary development laptop, but you can get away with Xcode or Atom or the like running with little trouble. Expect build times to be a lot longer than whatever you’re used to.

Bottom line: I love it, glad I took a chance on it.

  1. Two reviews that I’ll highlight, in case you missed them: Marco Arment’s review (he hated it) and Rene Ritchie’s review.

  2. Ex-pat living note: when you travel back to your home country, it’s expected (neighbors will mock you otherwise) that you maximize your return luggage allowance with everyday luxuries that you can’t buy easily here in India. For example, my last trip I had a suitcase full of baby stuff from our attic, many boxes of mac & cheese, maple syrup, and Clif Bars.

  3. Yes, I like carrying a separate laptop for personal things. I’m always hacking on personal apps and ideas, and I do all my writing on personal gear so I don’t cross the streams. Work is work. Personal is personal.

    I recognize this is like the ultimate first world, self-inflicted problem.

  4. I also installed El Capitan on this, so performance has dropped a little as I’d expect with with a beta OS and working in a beta Xcode

An iPad, a Mac, and a

I found myself watching some players on this weekend playing Vainglory. It’s pretty much the only game I play these days and has been for months.

This was the first time that I could remember actually watching Twitch streams naturally – not checking it out because it was in the news or whatever. I actually found it helpful to my gameplay, and it was mildly entertaining. Most of you are probably rolling your eyes now, but you can kind of think of this like watching the Golf Channel. If you’re a golfer, you’ll watch because it makes you better. If you’re not a golfer, it’s the most boring thing on your TV.

That’s a big part of Twitch – hanging out, learning from, and socializing with people who take a specific game (or gaming) as seriously as you do.

What’s interesting about Vainglory is that it’s an iOS game. On Twitch, a big part of the experience is watching people play the game. So, they’re streaming live from their iPad (usually with other video, e.g. a webcam looking at them) on screen too.

So, the question is how people stream from the iPad. Today, I snuck in an hour here and there to try and get it setup.

I was prepared to write a nice post with sample videos and screenshots of how I was able to successfully stream and record Vainglory from my iPad, but sadly none of the attempts were good enough to share.

At this point, my conclusion is that streaming from an iPad using a Mac is frustrating and unnecessarily complicated. It involves installing a device driver from Github (to capture audio), running either an Airplay server or routing video through Quicktime, and installing a broadcasting app that’s sparse on the on-boarding.

I gather that the situation is lot better on the Windows side of the world, but I’m amazed that Twitch is so popular considering how barebones the streaming software options are. Even the Windows options, while better, look to involve a few steps.

I’m surprised Twitch doesn’t invest directly in the stream creation experience. They do get Twitch support embedded directly in specific games – that seems to be their avenue of choice – but those integrations tend to be very specific to each game and lack the features that make the good Twitch streams interesting (PIP, the ability for player voiceovers, etc).

On the upside, I learned that Quicktime Player can record video (including sound) off of an iOS device with nothing more than the lightning cable that comes with the device. That’s going to come in handy.

Practicing RC flying with a simulator

One of my recent obsessions has been RC flying. So far, I’ve played with relatively cheap quadcopters and helicopters, but I’ve managed to crash every single one enough times to end up with a pile of damaged copters. So, I basically gave up on the hobby thinking I didn’t have the time (or budget) to really get into it. I felt like I either needed to spend to get an advanced quadcopter that auto-leveled and could correct for novice piloting, or really dedicate more time than I had to do the fly, crash, repair, charge cycle required to practice.

Recently, though, I discovered the world of foam board RC planes. These are planes built from cheap – like under $5 cheap – foam board using either custom plans or downloaded plans over the internet. Pre-made kits for the body of the planes can be found from places like Flite Test for under $40. These kits contain pre-cut or pre-scored foam board and the hardware required to connect to your electronics and servos. Flite Test has a great series of ‘swappable’ designs that make it easy to share batteries and electronics between several planes.

I found out about this via one of Flite Test’s videos featuring planes modeled after characters from Planes: Fire & Rescue, which happens to be my son’s current movie obsession. The models are amazing, and when they mentioned foam board, I had to see what it would take to build one with my son.

As I was trying to figure out if I could build one of these with my son, I discovered that I can now buy hardware that lets me practice RC flying using a flight simulator with a real RC transmitter. So, I could actually practice flying without all the crash, repair, charge steps in between flights.

I finally snuck in an hour to set this up at home and the results were awesome:

Aerofly RC 7 10th flight from sujal shah on Vimeo.

It’s hard to tell from the video, but I’m flying a simple RC plane in the simulator using a transmitter wirelessly. The sim is focused on RC flying, which is a little different than a typical flight simulator. The big difference is that the sim simulates operating the plane from the ground, not from inside the cockpit. This lets me practice the hardest aspect of this for me, which is maintaining an understanding of the spatial orientation of the plane and my controls. In other words, when the plane is flying toward me, I need to remember that pushing right on the stick will make the plane turn toward my left (because it’s facing me). That’s really hard for me, especially with my cheap quadcopters where identifying the “front” is tricky in flight.

That’s all the gear I needed to do this:

The connection process is pretty simple. Make sure the receiver is paired to your transmitter before you start connecting everything up. Then, the basic wiring pattern is the Single Line Converter (SLC) connects the receiver to the USB adapter on the computer side. Just connect channels 1-6 on the SLC (or as many channels as your equipment has) to the same channel output on the receiver using the included cables. The slot labeled S on the SLC should be connected to the USB adapter. Then just plug the USB adapter into the computer and fire up Aerofly. It will detect the USB connection and walk you through the setup process. It was pretty painless, though I recommend reading the instructions that come with the Ikarus stuff (for example, pay attention to connect + pin to + pin, – pin to – pin, etc. between the SLC and the receiver – the instructions contain the diagrams you need to make sure this is done right).

There were some gotchas in my particular setup: the Orange receiver doesn’t label the pins by channel number, but they turned out to be in order. Next, the Spektrum’s channel 6 isn’t in use by default. Aerofly likes all the channels to be calibrated, so I had to figure out how to enable that channel on my transmitter so I could finish the calibration without a warning message (it is a harmless error, but I was being picky).

Once that was done, I was able to get a plane up in the air, which I promptly crashed. I was thrilled, though, and am now just trying to do a simple racetrack around the airfield and then land. So far, I haven’t succeeded. :)

My favorite iPhone case

For the last two years, I didn’t use a case for my iPhone. I really love the look of the 5 & 5S, and didn’t want anything to cover it up. Of course, by the end of the year, the screens had dozens of fine (and one or two not-so-fine) scratches. Really annoying.

So, for the iPhone 6, I decided I’d keep an eye out for a case that I could live with. A few weeks ago, I ran across an ad for the Twelve South SurfacePad (Amazon link). It looked perfect: a minimalist case that looks great and could help simplify my wallet (a separate mission I’m focused on before our move to India).

I bought and received the case last week directly from Twelve South. So far, it’s been great. I’ve included a few photos below. It’s easily the best case I’ve seen for the iPhone 6.

The case attaches to the back of the iPhone using a special adhesive that can be reattached multiple times. It took a few tries to get it attached squarely.1 It feels secure.

I love having my license and primary credit card with the phone. I can basically lock my wallet up when I’m traveling, and I rarely need to pull it out otherwise.

It also looks great, and it seems like the leather is breaking in as Twelve South indicates in the booklet they include with the case.

There are two drawbacks with this case. First, the cover can be awkward in two situations. When taking photos, the cover needs to dangle or get folded in the stand mode so that it doesn’t block the lens. When trying to use the phone one handed or as a phone, the case needs to be flipped around to the back (think of the smart cover on the iPad), which makes me slightly nervous about having the cards exposed. They are quite snug in their slots, but as the leather softens, I worry about the slots loosening up. Hopefully the cards will stay securely in their slots.

The second drawback has to do with combining a wallet with the phone. This weekend, for example, I had to use my card outside at a parking kiosk. It was raining, so getting to my primary credit card meant pulling my phone out and exposing it to the elements. Manageable, but not ideal.

Those are both tradeoffs I can live with, though. I really love this case. It looks gorgeous and functions well for me. Recommended.

I included some photos below of the case on my iPhone 6. (photos taken with a Google Nexus 6).

New iPhone case: SurfacePad for iPhone 6
Front of the SurfacePad
New iPhone case: SurfacePad for iPhone 6
Back of the SurfacePad
New iPhone case: SurfacePad for iPhone 6
Inside of the SurfacePad

  1. Truth be told, it’s still not perfectly square, which I only noticed when taking the pictures. OCD sufferers, take note. :)

The Back-to-Basics Egg Muffin Toaster

Back to Basics Egg and Muffin Toaster

I’ve been remiss in my blogging responsibilities and, for that, I apologize. It’s already January 5th and I haven’t mentioned the most unusual of my Christmas gifts this year. It’s the Back to Basics Egg and Muffin 2 slice Toaster and Egg Poacher. No, really!

What is this thing? Well, if you’ve ever had or seen an McDonald’s Egg McMuffin, you know exactly what this machine makes. It’s a combination toaster and egg maker that has a special cycle that poaches the egg and pops the toasted bread at exactly the same moment. Take your warm bread and your poached egg, add some cheese and/or meat of your choice and, voila!, home made breakfast sandwich. It also can hard boil eggs, so if you’re an egg fan, you can just use the egg part.

Heidi and I have been using egg substitute rather than real eggs or scrambling the egg before putting it in the machine since I’m not a fan of the runny yolk in a poached egg. Aside from that, I can add veggie sausage, different kinds of cheese, and better muffins than what McDonald’s might use. Choosing my own ingredients and making a warm breakfast sandwich so easily is worth it.

I found out about this machine from Fahrad Manjoo’s enthusiastic review on Salon. For $29.99, I was willing to give it a try. It works as well as he said, and the sandwiches are much tastier than anything I remember from McD’s. If you like Egg McMuffins, this is the machine for you.

Update: Forgot to mention another egg-related device. A buddy at work who stays fit eats eggs pretty much every day. I had him in our office Secret Santa so I got him the Krups Egg Express Egg Cooker as his gift. He loves it and says it does a great job making hard boiled eggs. So, in case you’re just into eggs without the bread (say, you’re an Atkins person), this is a pretty decent machine. Amazon shows it at $22.32, but I bought it from Amazon for $19.99. Not sure why the price went up.

One year with the best universal remote I’ve ever used: Logitech Harmony Universal Remote

That’s pretty much the review right there in the headline, but as I continue to stall actually finishing my work for, uh, work (I’m suffering from the coder equivalent of writers block on one problem at the moment), here’s a quick endorsement for the Logitech Harmony line of universal remotes. While a bit expensive for most casual TV viewers, it’s a great device for those of us with more than 3 things attached to the TV. I had an XBox 360, PS2, DVR, Receiver, and cable box when I bought this remote. I have the XBox 360 version which works great for the combination of devices I have. The rest of this review assumes the features of that version, though it should apply to most of them.

The best thing about this remote is that it comes with software for your home Mac or PC to configure the remote. The one thing that drives me insane about most universal remotes, including some high end ones, is trying to program the remote on the remote itself. Too often you have to point the remotes at each other and go through a manual, button-by-button programming for each remote. Ugh.

The Harmony does away with that (for the most part). It leverages a web-based service that allows your remote to pull updated definitions from Logitech. This way, they’re not limited to what devices they can fit on the remote’s memory. New TV in 3 years? Odds are that Logitech will have the device added into their DB. Occasionally, you have to verify which version of a particular model you have and that requires pointing its remote at the Logitech remote, but that’s OK because it’s easier than trying to find a revision number or firmware revision from the TV or device.

The remote also uses an “activity” based approach rather than a device based approach. So, for example, I have an activity called “Watch TV” that turns on the TV, sets it to the right input, and turns on the DirecTV DVR. I chose a couple of shortcuts I want featured by selecting them in a menu, and I have one touch access to common functions like the Guide or the List of programs on the DVR.

The great thing about this approach is that I can create a lot of activities quickly and easily. For example, I have a “Watch DVD” activity along with a “Watch DVD (no receiver)” activity. You can use either to watch DVDs, but the first turns on the surround sound and uses the receiver to control the volume while the second activity uses the TV for audio instead.

Also, because it understands typical viewing patterns, replacing devices is pretty easy. When I swapped TVs recently, I walked through a few menus and the software replaced the old TV with the new one in all the activities where it made sense.

My only complaint is really a minor issue. The remote needs to “know” whether your devices are on or off, so it’s really important that you use the remote only to turn things on and off. Takes some getting used to if you’re in the habit of hitting the power switch on the TV.

Trust me, it’s worth the money if you have a several devices attached to your home theater. I love it and can’t imagine going to another remote.