Tag Archives: lazy instantiation

Lazy instantiation marketing

lazy instantiationIt is often hard to know what sort of additional services customers will be interested in. Might they be interested in:

  • a yearly subscription instead of a one-off payment?
  • hosting their own server?
  • paying extra for 24 hour support?
  • a port of your product to Mac OS X?

You can implement the new service and then offer it to customers. But this can be a huge waste of time and money if it turns out nobody wants it. An alternative approach is to borrow the idea of “Lazy instantiation” from programming (also called RAII – Resource Acquisition Is Initialization).

Programs need to initialise various system resources, such as databases, files and hardware devices. It is generally considered good practice to only initialise these resources as they are needed. This is called “lazy instantiation” and results in faster start-up times and no wasteful initialisation of resources that turn out not to be needed. For example in C++ (glossing over various details of cost, smart pointers, copy constructors, error handling etc to keep the example code simple):

lazy_instantiation

So we can only access the resource by calling MyClass:getResource(), it will get initialised on first use and it will be cleaned up when MyClass goes out of scope. This much more elegant, efficient and less error prone than always initialising the resource at start-up or adding lots of checks throughout the code to see if the resource is already initialised.

A similar approach can be applied to marketing. For example, instead of spending days sorting out the intricacies of subscription payments, you just add the following to your purchase page:

Please email support@acme.com if you are interested in purchasing an annual subscription instead of making a one-off payment.

This will take you a few minutes. If someone emails you that they would prefer a subscription you reply along the lines of:

Thank you for your interest in purchasing Acme server via an annual subscription. We are currently assessing the commercial viability of a subscription approach. We will contact you if and when we decide to make Acme server available through annual subscription. But, for now, you can only purchase Acme server through a one-off payment, as detailed on our purchase page. … etc

If you get enough interest you go ahead and do the work to implement subscription payments. If you don’t – well, you didn’t waste much time on it.

MyClass::MyClass()
{
   myResource = NULL;
}