Benchmarking a pi calculation for fun

Dotnet Core, Golang, Node, C, Java, Python. This is what I felt like doing on a Tuesday night after seeing yet another article discussing the performance of dotnet core over node.js. As is typical when things like these arise, our team’s slack channel went into the lightest of debates about C# vs Node, compiled speeds vs interpreted languages, and finally back to what we were originally discussing - “Do you think cypress would be faster than selenium?” ...

May 22, 2019 · James D Hughes

Fetching data with react

What use is an app that can’t persist data? I’m continuing this from my previous post about my efforts to learn about react. I want to be able to persist my data on a server and display it on a web client. To my understanding, this should be pretty simple so I’m going to put that theory to the test. Firstly! We’re going to use a Node.js scaffold that I covered off in a previous posting as our backend for this app. It’s located here and requires you to have Node.js installed and access to a MongoDB Instance. Follow the instructions in that repo to get up and running. If you don’t want to use that one, you can set up your own REST service (or CouchDB instance?) and follow along with the concepts. ...

August 29, 2018 · James D Hughes

Async / Await in Node.js

The Async / Await functionality introduced into Node.js in v7.10.0 is legitimately a godsend. The Async / Await paradigm works with promises to do exactly what the paradigm implies. It will asynchronously call the function and await it’s response before continuing on with the rest of the function. Previously, you could do this with promise chaining. Passing results from one promise to the next. Where this issue fell apart is when you needed to use the result of Promise 1 in Promise 4. You would need to somehow pass the result of Promise 1 through Promises 2 and 3 in order to use them in promise 4. ...

May 31, 2018 · James D Hughes

Yet Another Stateless Authentication Blog Post for the MEAN stack.

#inb4: this ain’t new. I’m writing this for everyone that wants a slightly more organized approach to express middleware and authentication. I’m writing this because once again I was inspired by how much I adore Node, Express, and all the delights that come from being able to implement my API’s and leverage middlewares. Also, I’m using async / await, which is pretty neat. I’m going to use MongoDB as a datastore it just jives so well with Node. ...

May 5, 2018 · James D Hughes

Installing Node without Sudo - Ubuntu 14.04 LTS

If you’re unlike me and really don’t care about superuser permissions or having the most up-to-date releases, you can just do the regular old naive thing and use the package manager… sudo apt-get update && sudo apt-get install nodejs However since you’re here, I’m betting this doesn’t jive with you. The idea of having to give checked out source code from the npm repository super user access makes me quite uncomfortable. I mean, all it’s going to do is sit on a virtual machine that will remain dormant long after I complete an awesome a-snychronous ToDo application and feel like a boss. It’s the principal of the matter! ...

April 8, 2015 · James D Hughes