blog tumblog github @santosh79 resume
January 7th 2015

The Concurrency Gold Rush

These are heady times to be a software engineer. The average starting salary of an entry level engineer is breaking six-figures in the Bay Area & NYC. Unlimited vacation policies. All expenses covered conferences. Whisky Wednesdays, Micro Brewery Thursdays, Summer Fridays. Offices in the best spots in NYC, Berlin, Paris, San Francisco, Madrid, Milan, Bangkok, Melbourne (you name it). And this is just to name a few…

December 28th 2014

Grokking Bitcoin

Ok, I think distributed, de-centralized, consensus building algorithms are, for lack of a better phrase da bomb. Kinda like the Borg, for all the trekkies out there. This area, didn’t really interest me much until Bitcoin came along. I think Bitcoin flips so many things on their head that it just blew my mind that this actually works

December 20th 2014

Erlang vs. NodeJS - A tale of two concurrency models

Recently, I ran into this pretty common problem – given a bunch of URLs figure out which of those are broken. Now, this is a problem screaming for some kind of parallelism, which makes it the perfect example to compare two concurrency models – in this case Erlangs message passing model with NodeJS’s single thread but aysnc I/O model…

May 15th 2014

My inspiration

Full disclaimer: Most of the stuff in this article is from Mr BKS Iyengar’s book, The Illustrated Light on Yoga. This article is, in a sense me paying homage to the great piece of literary work that composer Yehudi Menuhin did by writing the foreword…

February 16th 2014

Clean Code - Conditionals

This is part of a series of micro-blogs (somewhere between a tweet and a full on blog) on Clean Code. In this post, I’m going to focus on one big culprit in obfuscated, not clear clean code – Conditionals (i.e. if statements). Let’s look at an example:

December 22nd 2013

Curry Functions in JS


Returning a function from a function creates magic.

Down the rabbit hole

One of the foundations on which most of functional programming is built is partial or curried functions. An example is better than a thousand words, so here goes (this one’s from the Underscore Docs)

September 15th 2012

Understanding the this reference in Javascript

The this reference in Javascript is probably one of the most confusing scoping concepts for people coming new to the language. Understanding, the this reference lets you unlock the mysteries of Object Oriented Javascript and gain a better/more intuitive understanding of how the object model is structured…

May 20th 2012

Fight against Software Complexity

Why does software in the industry suck so much? Having worked at couple of startups and big companies as well, I can quite honestly say that of all the projects/repos that I had worked on, there was but one that didn’t suck. The one that didn’t suck, was I’m sure in no small part due to the fact that it was written by just one person, the CTO of the company, and since it was a license-based SDK, there was a vested interest in keeping things organized. Open source software projects, when compared with industry projects, are way easier to understand and in much better shape…

March 6th 2012

Memory leaks during Event emission

Javascript has garbage collection, so there’s no way we can leak memory right? Wrong. Memory leaks are pretty easy to create in Javascript much like in any other language that has garbage collection. The problem isn’t that bad when running Javascript on the client - unless you are having a blatantly obvious memory leak that kills your browser everytime the page loads. Writing Javascript on the server on the other hand, means you really have to focus on making sure you are not leaking any memory since your server process is going to be pretty long running…

January 2nd 2012

Comparison of MRI and JRuby GC's for a MMO Game Server

I’ve been looking at using Ruby for building up a stateless game server in a MMO setting. Ruby to many people, means Rails, which in turn means, a web app. The typical web app request when viewed through the lens of memory (allocation & deallocation) and IO (DB writes & reads) looks as follows:

December 28th 2011

Exploring Java's concurrent packages via JRuby

Threads are back in style these days. If you were like me, a Java engineer getting into Ruby couple years back, you probably would have seen your fair share of JVM bashing by a few people who relished beating on all things Java, while peddling their half-assed gems as software masterpieces. This is not to say that Java, especially it’s community, loves to over-engineer the crap out of everything they can lay their hands on, but (and this is a pretty big BUT) the JVM is a seminal piece of software. Okay, if you are still hanging around after this rant, I thank you for affording me this indulgence…