Message Systems in Programming: Part 3 of 7 – Events


Events in JavaScript (and EventEmitters in Node.js) allow 1 to many; meaning 1 dude or many people can listen for the same event without the developer having to add more code to the sender.

Events also solve with finality the parameter order problem. There is only ever 1 parameter: The Event. Callbacks, Promises, and Streams can have none, or many. In dynamic languages, you have no compiler help with this. Since most Events are an object of some type, you can add as many slots as you want without changing the interface between sender and receiver. This slightly improves the ability to refactor. In strongly typed languages, the surface API doesn’t change, only the internal consumption which is often opt-in, thus helping keep OOP things OOP. w00t to the w00t. Moot point is moot.

Continue reading “Message Systems in Programming: Part 3 of 7 – Events”

Message Systems in Programming: Part 2 of 7 – Callbacks


Callbacks are a way be notified of an event and not have to care if it’s synchronous or asynchronous. This could happen immediately or some time later. It’s the “don’t call me, I’ll call you” of programming. It also gives the receiver the power to dictate where they message goes and usually in what scope. In languages that do not natively support blocking, asynchronous programming needs some mechanism to tell you when “things are done”.

Continue reading “Message Systems in Programming: Part 2 of 7 – Callbacks”

Message Systems in Programming: Part 1 of 7 – Introduction


Messaging systems are used to communicate in larger code bases by helping decouple classes that need to know about changes or happenings in certain areas of the code. One of Object Oriented Programming‘s core concepts is encapsulation. How you decide to allow objects to talk to each other has pro’s and con’s for each method and it’s good to know your options as you can use many together in effective hybrid approaches.

Continue reading “Message Systems in Programming: Part 1 of 7 – Introduction”

Node, Bower, Grunt n00b Cheat Sheet

Automated dependency management and build systems are often something you spend a lot of time on up front, and never touch again. As such, you sometimes have a harder time remembering the commands + their relevant options since you don’t do it every day. I wanted all 3, npm, Bower, and Grunt printed out on my office wall so I could refer to both for myself, and for others who need a quick start. Specifically for front-end JavaScript developers either inheriting a project, or starting to setup the basics of a build & deployment system for their own project who have no experience with the above 3. Obviously moot point for you Yeoman slingers. In a subsequent post I’ll go over a crash course in setting up your own project.

Download the Node, Bower, Grunt Cheat Sheet

Continue reading “Node, Bower, Grunt n00b Cheat Sheet”