November 13th, 2017
window, which represents the browser window. Window exposes an API for interaction with the Document Object Model (DOM), click listeners, and other information about the browser window1.
In the past I have used the
window object to check the current URL and previous page visited by the user (to create a 'back' button). However, the most common use of
window is to manipulate the DOM and set click listeners (I used frameworks such as JQuery to perform these tasks in the past).
November 12th, 2017
Challenges with Neo4j Graph Creation
In my last discovery post on graph databases and Neo4j, I created a graph representing a map of Fairfield County, Connecticut. I created nodes for all the towns/cities and edges between the settlements that shared borders. This discovery adds to the graph and shows some of the challenges I faced along the way. Let's dive in!
First I populated the graph with some people (after all, a settlement needs citizens!).
November 11th, 2017
this I took shortcuts such as the popular
var self = this statement so I wouldn't worry about the value of
this in nested functions.
this so confusing is that it's set at runtime instead of author time (compile time)1. In other words it doesn't follow the rules of lexical scope that I am comfortable with.
this is incredibly daunting for new programmers since its value can be different when calling the same function on separate occasions.
November 10th, 2017
ES6 Modules Run with Babel
The only change to the API is the
export is a new keyword in ES6 that reveals the function
November 9th, 2017
This module provides lyrics for Taylor Swift songs (because who doesn't enjoy some T-Swift!) The
return statement is the public API for the module. All interior details, such as the
November 8th, 2017
November 6th, 2017
Creating a Simple Geographical Map with Neo4j and Cypher
Lately I've read about graph databases and their place in the NoSQL data storage universe. The graph database I've worked with is Neo4j, which is fun and easy to get started with. I found the user interface very enjoyable for viewing graphs and executing queries. I highly recommend it if you need a graph database solution.
Graph databases largest draw is related data storage and the speed at which you can query related data points (or in graph terms, nodes/vertices). Relationships are first class citizens, which allows related data queries to be executed by traversing relationships themselves. This is contrasted with a typical relational database where you have to find relationships through foreign keys or combine two tables with a very slow SQL
JOIN operation1. The same slow query in a RDBMS (Relational DataBase Management System) is extremely quick in a graph database.