Node.js Bit Operations

September 12, 2013

I was working on trying to get the barometer readings from my TI SensorTag using Node.js when I came across this problem. See, the user's guide has two code examples for the algorithm for the pressure - one in C, and one in Java. The one in C uses primarily bit shift operations, whereas the one in Java uses Math.pow() to do the same thing. Naturally, I tended towards the bit shift operations since it makes the code a bit clearer as to what it's doing (ultimately, from a performance perspective, it doesn't matter since Math.pow(2,


Published Bluetooth LE Module

September 11, 2013

Well, I published my Node.js module for Bluetooth LE, btle.js (pronounced "Beetle Juice") to npm. Even though it's labeled version 0.1.0, it's got most of the functionality that's necessary for Bluetooth LE - reading attributes, writing commands and requests, and listening for notifications. I'm hoping to add more functionality over the next few weeks/months.

The main reason I was doing this was to get my TI SensorTag working with my Raspberry Pi and Bluetooth LE dongle, which it now does. I've even got the beginnings of a Node.js module for the sensortag,



June 12, 2013

Having my new BeagleBone Black has made me look at the default programming environment for it, Node.js. Companies like LinkedIn are using it on the server side, which sort of surprises me. I can definitely see its uses in devices like the BeagleBone, since it has such a small footprint and minimal use of resources, but I was surprised at how many people are using it on the server side.

It makes sense, though - as Nginx demonstrated, an event-driven model can eat a thread-based server's lunch, performance-wise, under certain circumstances. What are those circumstances, though?

To begin with,