2015-02-02 at

Who Needs Startups? Diversify Away...

I never had an ambition to work in startups.

I'm the sort of guy who thinks industries like Friendster/Facebook are too predictably easy (2004, mind you). I'm boring - like Bezos, I prefer infrastructural plays which bet on things that are unlikely to change over 5-15 year horizons. Betting on volatility, selling insurance, and all that.

But I thought it would be a good education to learn how people build businesses from scratch, and so seven or so years after I started helping small businesses, I find myself in the occasional profession of being able to trade a little knowledge for money.

I've spent the last three months jump-starting the internal engineering team of a recently incorporated web-business investments firm. It's probably fair to guess that I've pulled 60-100 hours/week to-date. Not the most productive hours - first, I'm no genius, and second, organisational development is by definition a muddy business... more or less so, depending on the nature of the subject.

So now with bums in seats, the next quarter will involve a push for quality. We next need to shore up the product development practices, as much as we need to achieve an acceptable quality of engineering. Inbound marketing will be key concept to be grasped. Marketing operational effienciencies can only follow after that.

As for myself, I've just made a pitch to trade 30 hours a week for 20% in a small local business. It's in food & beverage, of course, a nice complement to my staid routine at the desk, jumping between spreadsheets, slide decks, meetings, browsers, and terminals. The past week has hardly been the most productive of the last quarter - a little illness, inconsistent sleep patterns, and much political chittering come to mind - but the quarter as a whole stands out, I suppose, as a relatively productive fraction of the past two years. (Have my standards fallen?)

I hope the next quarter turns out well.

Who knows. By tomorrow, the winds may have changed, and so will the appropriate tack. Such is life. Who needs "startups," for excitement?

2015-01-28 at

Immediately Invoked Functional Expressions (IIFEs) in JavaScript

References:
  • Wikipedia
  • http://gregfranko.com/blog/i-love-my-iife/
  • http://nicoespeon.com/en/2013/05/properly-isolate-variables-in-javascript
  • http://benalman.com/news/2010/11/immediately-invoked-function-expression/

A example for general use:

TL;DR
(function(ourcode){ourcode($,window,document)}(function($,window,document){/*do protected stuff*/}))

 /*
  * i.    There are two function expressions.
  *
  * ii.   The purpose of this outer IIFE is cosmetic, to display the global
  *       variables passed into the inner IIFE, at the TOP of your script.
  *       Otherwise they would be displayed at the bottom, e.g.
  *
  *         function(){
  *           // our spiffy code
  *         }(window.jQuery, window, document);
  *
  * iii.  In the inner IIFE, '$,' 'window,' and 'document,' are parameter names, 
  *       and therefore locally scoped. WE'RE NOT REFERRING TO GLOBALS.
  * 
  */



( function(ourcode) 
  {   
    console.log('Outer IFFE: I did not wait - I was simply invoked before the Inner IFFE.')
    ourcode(window.jQuery, window, document);
    console.log('Outer IFFE: I did not wait - I was simply invoked after the Inner IFFE.')
  }(  function($, window, document) 
      {   

        // Here, finally, lies the code we wanted to execute.

        $(function() {

          // Code that MUST wait for the DOM to be ready goes here. 
          console.log('Inner IFFE: I waited - I was invoked within $(like_this) ')

        });

        // Code that does NOT need to wait for the DOM to be ready goes here. 
        console.log('Inner IFFE: I did not wait - I was simply invoked.')

      }   
    )   
);

2015-01-19 at

Clobbered Punctuation

Seven years ago - that email. It was a good bellweather. It affirmed my speculations that working for illiterate government pansies makes one a bit of a beta. But one makes good money, very good money doing that, hand over fist really. We need them. We need all types. Who am I to judge - on average I spend more time losing money than making it. #youthinasia