Giter VIP home page Giter VIP logo

gluecon-hackathon's Introduction

Behind the scenes of "Siren"

a vehicle location hack powered by GM, Nexmo, and Cloud9

I'm a sucker for hackathons, at least the true "hack"-athons, which are different than the "I'm really here to pitch my latest startup idea so let me walk you through the deck"-athons that have become common. Thankfully, the Gluecon event was definitely the former. There's something refershing about the quick and dirty prototyping spirit, and the lack of concern for security, scalability, maintainable code, or commercial viability. I've already confessed that I don't like writing tests, and a hackathon is the perfect excuse to skip all that.

Meeting new people, trying out new technologies, and thriving on a bit of friendly competition are all great reasons to participate. And of courses the prizes don't hurt. :)

Last week at Gluecon I teamed up with native Coloradoan Aaron Nielsen, whom I met the first evening.

Siren

Our hack was a little bit like Find My Friends for your car. We built a simple map-based interface that allows you to set two kinds of triggers: speed limits and geo-fences. With the soon-to-be-released GM Remote API, you can poll for realtime telemetry data and find out where your vehicle is, how fast its traveling, and in what direction.

Screenshot of map with truck

Cloud9

Neither of us had done much with Cloud9 IDE before, so we thought this would be a great chance to test it out. On the whole, it's really impressive how nice the coding experience is for something just running in a browser. We had a couple of hiccups where we were editing the same file and had to coordinate saves, but it was no more annoying than working out a merge in git.

The added bonus is that our code was already "deployed."

Screenshot of Cloud 9 IDE Dashboard

GM

Being the lazy developer that I am, I really like APIs that require nothing more than a key parameter included in your requests. The OAuth style of GM's API requires more than that, but it wasn't too bad once we got it set up. The tokens expire every 15 minutes, so we just added this check:

if (res.statusCode == 401)

and repeated the call after retrieving a fresh token.

Nexmo

Twilio has sponsored just about every hackathon I've participted in over the past 3 years. I've used them in many small hacks and a couple of production applications. Nexmo describes themselves as a "wholesale" SMS API, and that's a pretty accurate summary; their rates are cheaper, they have better international support, and their developer experience - while adequate - lacks the level of polish and friendliness that you get from Twilio. Both of these companies tempted participants with prizes, but who doesn't love an underdog? We decided to give Nexmo a shot.

I found one big advantage and one drawback to using Nexmo. The advantage is that all incoming SMS messages are free. That could be huge for certain applications. The downside is that you can't directly respond to an incoming SMS like you can with Twilio (via TwiML). It's not that I mind writing one line of send code, but the catch is that you have to be authorized to send through that number. This makes it trickier to write generic multi-user services that any SMS number can interact with, but it didn't matter for this particular hack.

Google Maps & Geolib

Google Maps is arguably the reigning champ of mashups in terms of sheer number of inclusions. The only thing that trips me up when I work with the maps API is weeding through documentation and samples that are outdated because they're based on older versions.

I always like starting with the Styled Maps Wizard to strip out some labels and features for a cleaner simpler map.

I've done a bit of geo work using the handy built-in functions of MongoDB, but Aaron found us a great little Node.js library aptly named Geolib. Thanks to the isPointInCircle method, it was a snap to set up the geo-fence triggers.

It's not about the money, but...

GM gave out two generous cash (literally a stack of bills) prizes, and we were lucky enough to win one! Our bet on Nexmo also paid off since they kicked in a Nexus 4.

Thanks again to Gluecon and all the hackathon sponsors.

gluecon-hackathon's People

Contributors

jedwood avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.