Victor Quinn

Software architect and Node.js expert. Specializing in scalable systems. Lover of craft beer. VP of Engineering @SocialRadar

Read this first

Smart Polygons: Shaping a More Intelligent Location

While there are many great reasons to adopt LocationKit, our advanced location manager SDK, in your app, one of my favorites to discuss is our extensive Venue Database.

tl;dr We have put together what we think is the most extensive venue database for any location API on the market which we use to intelligently refine user location using LocationKit

Polygons, not points

The greatest difference between our database and the competition is that our database contains polygons for each address whereas most others use points to represent a location. What does that mean?

In a traditional setup, each venue is represented by a single “pin” which is often attempted to be the center of mass of a particular address or building. It would be a single latitude/longitude for that place.

For example, in the following screenshot from Google Maps, the “pin” for Crios near Dupont Circle in Washington,...

Continue reading →


LocationKit Is Here

At SocialRadar we believe that location means much more than just a latitude/longitude, it means the ability for app developers to provide personalized experiences. We also think that it should be easy to harness. So we have built a simple platform for developers to incorporate advanced location services into their applications without prior location experience.

And today, I am excited to announce that technology – LocationKit – is available for download at no cost.

LocationKit is an advanced location manager that provides app developers with the first improved replacement for iOS location services. By using LocationKit, developers gain access to higher accuracy location, lower battery drain, automatic venue recognition and detailed location analytics. For an overview of all LocationKit has to offer, check out our website.

LKCroppedWe’ve had LocationKit in private beta for a few months now and...

Continue reading →


Writing “Getting Started with tmux”

I completed work on my first book, Getting Started with tmux, which was recently published!

GettingStartedwithtmux.png

This book, as its title would imply, is a getting started book for tmux, a command line program which can allow a single terminal to act as many. This book is targeted at anyone who is a developer, devops engineer, or other professional who spends any amount of time in a terminal.

I wanted to take some time and document the process so others thinking about doing the same can have an idea of what the process is like.

My blog post

Back in 2011, I was using GNU Screen (another terminal multiplexer program like tmux).

As I often do, I documented my process learning tmux in case it would be useful to anyone else and published it on my personal blog.

Between now and then often referred to it if I forgot how to do something with tmux.

Over the years it has been rather well trafficked and has actually...

Continue reading →


NGINX as a SPDY load balancer for Node.js

Background

Recently we wanted to integrate SPDY into our stack at SocialRadar to make requests to our API a bit more speedy (hurr hurr). Particularly for multiple subsequent requests in rapid succession, avoiding that TCP handshake on every request would be quite nice.

Android has supported SPDY in its networking library for a little while and iOS added SPDY support in iOS 8 so we could get some nice performance boosts on our two most used platforms.

Previously, we had clients connecting via normal HTTPS on port 443 to an Elastic Load Balancer which would handle the SSL negotiation and proxy requests into our backend running Node.js over standard HTTP. This was working nicely for us and we didn’t have to handle any SSL certs in our Node.js codebase which was beneficial both for cleanliness and for performance.

However, when we wanted to enable SPDY, we discovered that

  1. AWS Elastic...

Continue reading →


Full text search with Bookshelf.js

I have a table with a MySQL full text index and wanted to search it with Bookshelf.js. bookshelf.png There is actually an open issue to add full text index support to Knex, the query building underlying Bookshelf, but it hasn’t been implemented yet.

Bookshelf has no inbuilt method for performing such a query but it actually ended up being rather simple.

Assuming you have a valid Bookshelf model configured already, for example:

var Customer = Bookshelf.model.extend({ tableName: 'customers' }); 

(lifted verbatim from the Bookshelf docs)

Let’s say the customer has a bio field on which you’d like to perform a full text search. You can do so with the following syntax:

var searchTerm = <code to build your search term> var customer = new Customer() .query("whereRaw", "MATCH (bio) AGAINST(" + searchTerm + ")") .fetch(); 

And that’s it! Full text search on the bio field.

One caveat, since you’re...

Continue reading →


Desired: Oculus Rift as a monitor replacement

Just read Wired article Oculus Is Awesome for Games, But It’s the Future of Movies

I had an idea I haven’t been able to shake since I first used an Oculus:

I want an Oculus Rift instead of monitors for programming.

I want to arrive at work and be able to sit in a chair which has a keyboard and trackpad mounted on it (perfectly ergonomically oriented to suit my body of course) and to be able to spin 360 degrees and be encircled by two dozen virtual screens which I can see simply by rotating my chair and head just as I do now with my 3 screens in the real physical world.

Arguably I could dispense with physical motion entirely, but I think it’s still faster and easier to just turn my head or my chair to switch between buffers than any other method, for the same reason I find myself far more productive with two monitors or three than with just one (for now at least!). Sure I can use...

Continue reading →


JavaScript: Async Promise “while loop”

This is a solution to the situation where you have an asynchronous task you want to perform over and over again, in a non-blocking fashion, stopping when some condition is met.

To set the stage, I’ll be using the Bluebird Promise library, the best Promise library I’ve used.

First, we’ll construct the Promise function which will do the looping:

var Promise = require('bluebird'); var promiseWhile = function(condition, action) { var resolver = Promise.defer(); var loop = function() { if (!condition()) return resolver.resolve(); return Promise.cast(action()) .then(loop) .catch(resolver.reject); }; process.nextTick(loop); return resolver.promise; }; 

It receives 2 arguments, both expected to be functions:

  1. condition - This is a predicate function which shall return true or false and indicate whether the end state has been reached. true if done, false otherwise.
  2. action - This is the...

Continue reading →


Great Programmer Font

I’ve been using Menlo for a few years now and before that it was Monaco.

But I’m always on the search for things that will make my setup better.

This new open source font, Cosmic Sans Neue Mono looks like it may be my new favorite.

vim21.png

It’s monospaced so it’s good for programming, but it feels a bit more playful and fun than either Menlo or Monaco.

Time will tell if it sticks, but I’m digging it thus far!

Continue reading →


Thoughts on Opera Next

I have been using Opera Next 18.0 as my primary browser for the past few weeks. This is the first version of Opera with the guts of Chromium.

icon-opera-next-2013.png

I should mention, for the unfamiliar, Opera Next is essentially the Beta version of the Opera browser. It is pre-release software and thus not fully complete yet. Chrome has a similar beta build called Canary.

So please understand that I’m discussing a not entirely finished product. My thoughts:

1. Blink (very good)

One of my motivators for trying it out is that under the hood Opera Next is now using Blink, the rendering engine Google forked from Webkit.

I’ve used Opera as my main browser in the past, but usually ended up moving back to Safari or Chrome because its own Presto rendering engine tended to be a bit quirky. No more.

With Blink they’re literally using the same engine as Chrome so those quirks are a thing of the past.

That and most...

Continue reading →


Emacs: Prevent autosave mess

Emacs will create backup files for you. By default, it will do so after every 300 characters you type. 1

It does so by creating a new file with the same filename as the one you were editing, but wrapping it in # characters.

So if you were editing mycoolfile.js, after changing 300 characters, you’d have a file named #mycoolfile.js# in that same directory.

This can get really annoying when dealing with version control.

Here are a few methods of dealing with those files to make things a bit more manageable:

1. Add [#]*[#] to your global .gitignore file

You can do it on per repository basis, and that works, but only for the specific repo you added it to.

A better solution is to create a global .gitignore file and add
[#]*[#] to that file so they are ignored globally by git.

To do so, create a global .gitignore file (if you don’t have one already):

git config --global core.excludesfile...

Continue reading →

Subscribe to Victor Quinn

Don’t worry; we hate spam with a passion.
You can unsubscribe with one click.

O0xjqXEd8t0K1UBVU51