Welcome to the new blog

Note: This post was first published in September 2015.

Hello, nice to see you again. Before you start, I will admit to being less than dilligent in updating this blog. That's why I have decided to revamp it (for the third time in two years or so). Starting today I will faithfully and dutyfully update this blog with any of the things I'm working on. After all, sharing is the best policy.

So, what have I done?

Lately I have been working on a number of small projects to increase my skills. Almost all of these - except one, which I'll come back to later - involve server-side JavaScript using node.js. I'll take you through a few of them.

asloc - a CLI app for counting SLOCs

asloc is a small CLI (command-line interface) node app which can be used to count the SLOC - or: Single Lines of Code - in your project file(s) or folder(s). It also counts the amount of comment lines (both single-line and multi-line) and outputs that information on request as well. It's very much a work-in-progress and one of my first forays in writing CLI apps.

asloc currently has the following features:

  • Filter by file extension type
  • Display per-file SLOC count and/or total count
  • Also displays the amount of comment lines
  • Supports recursive walking, so files in subdirectories can be listed as well
  • Count the SLOC and comment lines in all files in the given directory
  • Ignores empty lines by default

Get it

npm:

npm install asloc  

Links

just-tasks

just-tasks is a very simple task runner interface - in essence just a rename of node's EventEmitter interface - and a singleton, so you can call it from anywhere in the same process.

var TaskRunner = require('just-tasks');

// Create a new task
TaskRunner.task('print.welcome', function(name) {  
    console.log('Welcome, %s!', name);
});

// Now, maybe from somewhere else (TaskRunner is a singleton), run the task
TaskRunner.run('print.welcome', 'Michael');  

Get it

npm:

npm install just-tasks  

Links

Adhesion

Adhesion is a simple module to provide a bridge between your MQTT broker and a WebSockets. This way you can use MQTT in your browser apps without having to expose your broker to the world. A powerful but simple feature is the ability to allow or deny a subscribe or publish request based on your own logic.

Parting words

This has given you some idea of what I'm working on. You can check my GitHub page for more projects.

I will in the future add more blog posts detailing my work and publishing open source projects small and large (more small - sorry).

comments powered by Disqus