Beer Recommendations using User-Based Collaborative Filtering with Neo4j

In this post I'll outline how to use a Neo4j graph database to generate user recommendations for a data set consisting of users, products, and user ratings for those products. For my data set I'm using a database of 30,000 different beers (pulled from brewDB's open API), and 100…

"This" & "new" - Understanding Object Constructors and Pseudoclassical Instantiation in Javascript

A lot of people's first introduction to javascript is through Codecademy. I think a lot of beginners start out with Codecademy because it's a fun and easy way to learn Javascript's basic syntax. In the beginning, understanding the basic logic behind the Javascript methodologies taught by Codecademy is relatively easy…

Keep your code testable

Always consider whether the code you are writing is easily testable, as the same qualities which lead code to be easily testable overlap with those of good code in general. An easy way to do this is to keep three key considerations in mind when deciding on how to structure…

Why use Function.prototype?

A common way of instantiating objects in javascript is to use a constructor function. To define properties and methods using a constructor function you might use the 'this' keyword, as seen in the following example: var Car = function(x,y){ this.horsepower = x; this.topspeed = y; this.vroom = function() { console…

How to synchronize multiple asynchronous http requests in Node?

What happens when you want to make a bunch of asynchronous http requests and you need them to be executed one after the other? That is, you don't want the next call to start until the first one finishes. Lets imagine a scenario where you want the results of each…

Millenial Interpreter 1.0

Last week I participated in a hackathon at Hack Reactor, where we were given 2 days to make any web app we could come up with using Javascript. I decided to take the opportunity to experiment a little bit with Chrome extensions since I had never made one before. What…