Esa-Matti Suuronen

I write code and jump

Blogging at Opinsys Labs

Since I also blog actively to our company blog Opinsys Labs and the content is highly similar to what I usually blog here. I will link some of those post to here from now on.

If you’re more interested on what we do at Opinsys follow our Twitter accounts @OpinsysLabs and @Opinsys (mostly finnish) too.

Improving console.log for Node.js

Node.js gives you four methods for logging stuff console.log(),, console.warn(), and console.error(). These could go pretty far, but unfortunately they fall bit short since their output does not give any indication which method was used for logging except for the output stream. Which in my opinion is bit confusing. But I do like their API. They can do printf like formating, pretty printing objects and they can even handle objects with circular references.

So I’ve written a little module called clim (Console.Log IMproved) which gives some superpowers to console.log and friends.

Creating KISS Daemons in Linux

Daemonizing processes in Linux and running them on boot is a very easy task in theory, but the variety of different Linux distributions tend to make it incredible hard sometimes. So here’s my take on Daemonizing processes without a headache.

Grocery Store Analogy for Evented Web Servers

Today I was trying to explain the differences between threaded and evented web servers to a friend on a high level. Usually the threaded model is explained with a grocery store analogy and I started to wonder how that analogy could be extended to explain the evented model too.

Rendering Javascript Templates Without Rendering

For a long time client-side templating languages has somewhat bothered me. Since they all take strings as input and re-renders those to DOM elements on every small change you want to make. That has always sounded bit silly to me. Why not just create the DOM tree once and then just manipulate the bits you want to be changed?