Category Archives: nodejs

AutoFixture — a Node.js Test Fixture Library

Working on a recent project that was on the MEAN stack, I needed to create test data quickly. I reviewed and tested out some of the existing libraries that are out there, but none of them fit my specific style. … Continue reading 

Also posted in JavaScript, Testing | 6 Comments

Reassign JavaScript Function Parameters In Reverse Order, Or Lose Your Params

Every now and then I need to have a method support 2 or 3 arguments, providing a default value for one of them if only 2 are specified. My typical solution is to check the number of arguments passed to … Continue reading 

| 12 Comments

How I Work Around The require(“../../../../../../../”) Problem In NodeJS

Anyone building a large enough app in NodeJS will tell you that it gets really really really frustrating to have 3 or more lines of this in every module you build: It’s ugly. It’s hard to read. It’s hard to … Continue reading 

| 25 Comments

JavaScript Promises: A Journey To The “Promise Land”

Promises certainly aren’t the holy grail of asynchronous flow control in JavaScript. There are no silver bullets, after all. Promises are a tremendously important concept, and one that you need to understand, though. They’ve been around for a few years, … Continue reading 

| Leave a comment

Semantics, Modules And Testing: Why (And How) I Test Internal Components, Not Private Methods

I saw someone tweet about a new-ish JavaScript library called Autooc. recently. I had not heard of it, so I clicked the link to find out more. It looks like an interesting project. I’ll have to look at it further … Continue reading 

| 2 Comments

Consistency Problems With APIs In JavaScript Promise Libraries

Promises are a powerful way to handle asynchronous code in JavaScript. They give us a lot of opportunity to clean up code, and to write code that can register work to be done when the promise is resolved, whether or … Continue reading 

| 10 Comments

Making Heroku Run A NodeJS App From A Sub-Folder

Both SignalLeaf and a project I’m building for my day job at Kendo UI are running on NodeJS/ExpressJS servers, deployed to Heroku. I love Heroku and have been using it for a good number of years now. It makes deploying … Continue reading 

| 4 Comments

A Demo Of BoEBot, Johnny-Five And Bluetooth

I recently purchased and assembled a BoE Bot kit for Arduino. It’s a product from Parallax, but I purchased mine through SparkFun (my personal go-to site for Arduino and related stuff). After getting it assembled and calibrated, I started hacking … Continue reading 

| Leave a comment

Let Me Teach You Arduino, With JavaScript!

Ever wanted an excuse to learn Arduino, but don’t want to learn C/C++? Don’t worry. I’ve got you covered.  I’ve published three articles on the Safari Books Online blog that show you how to take your existing JavaScript skillz and … Continue reading 

| 2 Comments

Building Sample Apps in Ruby, NodeJS and PHP

In the last three years I’ve gone from full time .NET development to full time Ruby on Rails and then full time JavaScript. It’s been an awesome ride, so far, but it’s not done yet. I started digging in to … Continue reading 

| 30 Comments