Thursday, May 23, 2013

3 Reasons Why Startup Marketers Should Know SQL

Startups Live and Die by Data Analysis

How often have you been in a startup and someone comes up and asks for you to pull "a few quick numbers" ?

One of common themes when running any company is the need for data analytics.
  • When do your customers buy?
  • How much do they buy?
  • When do they come back?
If you don't have an easy way to answer these questions you are driving without a map. As we collect more and more data there is a huge need to process and understand that data. Marketing and business development teams need this information to make data driven decisions.

The faster they can get this information the better the startup will be.

Developer Time is a Scarce Commodity

All to often the responsibility of generating and producing these reports falls on a developer. They rae the ones that understand the underlying data model.

The problem is that development time is valuable. Sure there are complex reports that only a developer may be able to put together. However there are a plethora of other common questions that I am sure could easily be answered with a few hours of SQL training:
  • How many users signed up today? Last week? Last month?
  • How many users do we have total?
  • Who are our top purchasers?

Data Empowerment is a "Good Thing"

By teaching non-technical people SQL they will end up asking better and harder questions. A lot of businesses can be analyzed through just their data model. What objects are in the system? How are they stored?

Exposing this knowledge can yield valuable insights into the business.

How to Get Started

From a technical standpoint there is some risk in giving non technical individuals access to run arbitrary SQL queries. A good setup is to replicate to a read only slave and give them read only access to that database.

I still haven't figured out a good tool for storing the SQL queries and sharing them though so if anyone has any suggestions I'd love to hear them.

Saturday, February 23, 2013

Knockout Advanced Tips: Binding Custom Parameters

It is possible in Knockout to bind custom parameters to a call in JavaScript. I believe this is intrinsic to JavaScript. It also kind of reminds me of currying though at the moment I am not entirely sure.
For example, suppose you wanted to call myFunction with some parameters besides event and item (because those are what you get normally by Knockout). I need to do this because I want a callback after the click event. So here is my function:

var myFunction = function(callback, data, event) {

   //value of "this" would be $data

Here is how I would do the call:

click: myFunction.bind($data, myCallbackFunction);
The first argument to "bind" is the context (value of "this") that you want the function to execute with. Any arguments after that will be passed to the function prior to the actual arguments.

Data and event are always passed after any extra arguments that you provided to "bind".