Node Style Woes - Domains and Promises

2016 Sep12


omains have been the red-headed step child of error handling in Node.js It is a library that has been deprecated since v0.12 and has been awaiting a suitable replacement ever since ( we are at v6.5 at the time of writing ). Until one has been implemented by the Node Core team, it is still de-facto way to deal with error propagation. As Node.js supports more and more ES6 features, I have been upgrading my open source projects where it seem appropriate. In my command line tool package, seeli, I was doing some updates and came across some exceptionally odd behavior around ES6 Promises and implicit Domain binding. In a nutshell - It's broke.

ˈməNGkē paCH -v,

Read More
filed under:  es6 node class promises domain

Docker for Dummies, I mean Developers

2016 Feb13


mages, Containers, and Tags! Oh My! Docker is the new hotness in the software world. Dockerize all of the things! For my tastes, Docker is really more of an operations tool for packaging and deploying self contained apps. However, it is making its way into the development circles. I have been finding that, sometimes, developers have a hard time understanding all of the pieces and how the fit together. They tend to copy and paste commands from docs and tutorials and pray to the gods that there app is running. Confusion between containers, and images, building and running and what tags are just has them typing themselves in circles. But fear not! There is a simple way to think

Read More
filed under:  docker oop class

Fun With MooTool Part 3: Class Mutators

2013 Jun23


he Class system in Mootools a exceptionally powerful for the little amount of code that it is comprised of. A large part of that power comes from the Mutator system. A Mutator can be thought of a lot like a plug-in. However unlike most plug-ins that are executed at run time, Mootools Mutators are executed at the time a class is actually defined altering the end result of the class

A Mutator is nothing more than a JavaScript function that has access to the internals of the class it is attached to. These functions are stored in a Mutators namespace in the Mootools library. Each mutator manifests itself as a special key on your class and the value of

Read More

Fun With Mootools Part 2: Protected Methods

2012 Jul18


rivate and protected class methods can come in handy when creating complex applications. While JavaScript doesn't provide these features natively, Mootools provides a mechanism to define protected methods on a class. Protected means that the function can only be called by the originating class or a sub-class of the originating class. An attempt to call a protected function by a different class or from an instance of the class would result in error. Here is how you do that with a mootools classs:

var SecretClass = new Class({  
    , initialize: function( options ){
        this.setOptions( options );
        var s = this.protectedMethod();

     * A regular class method 
    ,publicMethod: function( name ){
        alert("Hello" + ( name || "world") + "!");

     * A protected class method
    ,protectedMethod: function( val ){
Read More
filed under:  oop mootools class javascript

Fun With Mootools Part 1: The Class toElement method

2012 Apr15


he MooTools ( My Object Orientated Tools ) JavaScript framework is a pretty sweet piece of software. It's goal is to make developing with JavaScript easier. It provides large set of tools for building complex JavaScript applications. There are a lot of hidden goodies tucked away in the framework that kick off one of those "AHa!" moments. One of those goodies is the toElement method on classes. One of those goodies is the toElement method on classes.

The Class' method, toElement, works in tandem with the MooTools ( $ ) method. In most cases, Classes center around a DOM element for some reason or another. As a convenience, the ( $ ) will call the toElement method when it is passed

Read More
filed under:  dom oop mootools class javascript