Wednesday, November 30, 2016

Making most of your Best-before-Date

For a moment picture yourself living in this world about 50 years ago, in an age where automobiles were relatively fewer and it was a real luxury to have one in the neighbourhood. Assume you didn't own a car already, and were given one on lease, for a limited period of 30 days along with free fuel. Suppose you were given complete freedom to use it in any way you deemed right, what would you do?


You would use this (relatively rare) mode of transportation to get all your stuff done: for work, personal needs and moving things around. You would use it to the fullest and perhaps flaunt it too. You might also run a few errands for friends and neighbours. You would consider making the best use of this rare commodity available only for a limited period, just so that the benefits stay long after the lease period.
  • Would you use your car for just one purpose (only commuting to work) and let it stay idle otherwise?
  • Wouldn't you plan that elusive long-drive on a weekend? Plan a vacation driving to that exotic locale, with friends and/or family?
  • Wouldn't you do the bare minimum to keep the vehicle in a running state by refilling fuel, checking tyre pressure and doing the needed maintenance? The last thing you'd want is the vehicle to break down and be out of service for 2 of the 30 days.


Now why do we handle our lives any differently? Coming to think of it, there are striking similarities with the above analogy.
  • We have limited time in this life (a 'lease' in years as opposed to days for the car). 
  • Each person has incredible talents and unique interests, which often get neglected by narrow-minded pursuit of one or a few things (bogged down with work / too internally focused to look outside / not taking time to appreciate and contribute to the good things in this world). 
  • And, its a criminal negligence to neglect our body without the needed 'maintenance' that is essential to ensure good health. The quote by Jim Rohn nails it - "Take care of your body, its the only place you have to live".
Pic source

Tuesday, November 29, 2016

Monetising the demonetisation decision: The Paytm story


The past few weeks have had non-stop coverage of the demonetisation of currency and demonisation of mistry. The jury is still out on both these controversial decisions. Particularly, the demonetisation drive has split public opinion like never before. If I look at my close circle of friends, I've never seen them split to take up two diametrically opposite sides of an issue like this ever before - one camp owning up the decision and actively preaching its benefits, while the other is getting its claws out and sparing no opportunity to go on a full rampage.

This post is not my attempt to step into this minefield. This is an observation from the sidelines on how some people have seized the moment and capitalised on this historic decision.

While its true that this move gave a natural boost to offerings of financial institutions and financial service providers, none had the speed of response and temerity as Paytm. While pretty much everyone was caught unawares on 8th Nov when the decision was announced, a few were able to recover and respond in order to capitalize on the move.

Paytm brought out full-page print ads congratulating the Prime Minister, with a word play on its tagline ‘Ab ATM nahin, #Paytm karo.’ They did not stop there, but followed it up with marketing to keep the buzz on, while also working on the app to simplify usage for new users, and adding features that helped work around the cash crunch.

Not surprisingly, the bold move was met with staunch criticism & they briefly were caught in the political cross-fire. Paytm's Vijay Shekhar Sharma deftly avoided some of these direct volleys and also took swift steps to recover from few of the moves that turned controversial. Like all controversies, these also added to the brand recall and eventually worked in their favour by adding to the kitty.

It was surprising to see neighbourhood stores and roadside vendors accept cash on paytm in barely a couple of days after the decision. While there are plenty of e-wallet players in India, many who have existed for much longer and few with deep pockets like Airtel, Paytm has managed to stay high on recall and captured the imagination of people. 

Consequently, they have emerged a winner in round one. As the moves towards a cashless society get stronger, there is a lot more action to watch out for in this space.

Monday, November 28, 2016

Evolution of Gramener Design Toolset


Earlier this month, I had written an article in our company blog. I'm reposting it here again:


At Gramener, we have been continuously evolving our Design process over the past years. These improvements have been to stay in tune with the emerging trends in design, adopt industry standard tools and create a custom Design framework that helps us deliver outstanding visualizations.

This post covers the ‘tools’ aspect of the design improvements we’ve implemented, and it discusses the challenges faced and considerations on coming up with a pertinent toolset to cater to Gramener’s core offering of Information Design & Data Visualization.

Earlier Process brief and toolset used:
Until a year back, the primary tool we used during the design phase was paper-pencil for creation of Design concepts, while the actual designs were created on Powerpoint. For most engagements we had a low-fidelity design as deliverable, wherein the paper sketches were translated to a basic representation on MS Powerpoint using snipped images of charts and other basic dashboard components.



In certain engagements, when there was a need to show a closer-to-actual representation, a high-fidelity design was created, again on Powerpoint using imported SVG objects or drawn chart elements. There was almost no prototyping or demonstration of interactivity, save the occasional powerpoint slide transitions. The need for an internal Design library was met by having all designs stored on the Gramener file server and exposed on a searchable, minimalistic UI, that was spruced up with basic previews and meta-tags.



Given the ability of Gramex, Gramener’s platform to quickly pull out charts from the engine’s library and setup a basic, working version of visual dashboards, historically, there was not much of a need for a standardized design tool. Hence, Powerpoint was a quick and light alternative that fit in well with the skillset of Data Consultants, which is a role comprised of functional analysts, who had innate comfort with MS Office rather than the Adobe suite of products.

Evolving needs:
With the evolution of projects done by Gramener and the rapid scale-up in clientele and team size, the need was felt for a rethink of the above mentioned stack. With a large number of first-time visualization adopters amongst clients, we sensed their comfort in reviewing solutions with a high-fidelity design that showed visual design aspects as close to the final solution as possible.

With increasing functional complexity and data size of our visual solutions, Data Consultants had to spend more time in the solution conceptualization and data analysis phases, whereas there was an increased need for additional support during the Design phase.

Challenges faced:
In summary, the key challenges faced with the above simplistic process & toolset were:
  • Variation in quality, finesse and look-and-feel of designs created on Powerpoint
  • Long cycle time for design creation, with an often cumbersome process for putting together the occasional high-fidelity versions
  • Teething challenges in development handover & translation of the design
  • Need for multiple design reviews during development phase, coupled with rework
  • Difficulty in demonstrating state transitions, interactivity and user flow within a visual application concept


Alternate Solution:
Given these challenges and the additional considerations of scalability & rapid replicability, we went about evaluating changes needed in the process, toolsets & framework. We spoke to the design community and took first-hand advice from experts in these areas. From the tools perspective, we evaluated a variety of visual design and prototyping tools including Adobe Photoshop, Illustrator, Balsamiq, Axure and Pinegrow, amongst others. Based on considerations of fitment to our visualization lifecycle, availability of complementary skillsets at Gramener and ability to address the challenges outlined, we zeroed in on the following:

Sketchapp – for Visual Design:
The vector graphics editor from Bohemian Coding has been rapidly gaining popularity and has quickly built its own community of loyal users. With addition of new role of Information Designer at Gramener, this tool helped us in the following ways:
  • We found that the tool was very easy to pickup due to its intuitive usability, perhaps closer to Powerpoint. It also had ample tutorials and a robust support ecosystem
  • By design, the tool was meant to create vector objects and naturally fit in better for dashboards and web applications, while other tools were heavily skewed towards graphic design
  • Has a thriving ecosystem of plugins for productivity improvement, and importantly provides for easy export of style sheets to aid development translation
  • Comes at a relatively economic price compared to popular options, Apple hardware prices notwithstanding




Invision – for Workflow, Prototyping and Design library:
A leading prototyping, collaboration and workflow platform used by several design houses around the world, this tool checked-off multiple items in our requirements list:
  • Provides an end-to-end design workflow solution with useful admin features
  • Has native integration with Sketch and hence it automatically syncs, imports and stores assets from Sketch files. Automatically creates style sheets & enables direct look-up
  • Supports basic prototyping needs to show interactivity and transitions
  • Has useful collaboration & commenting features, and integrates live design presentation and review capability
  • Doubles up as a repository with versioning & hence can be used as a design library




In Summary, below is the overall process that we have arrived at, which has been working well for us and has addressed most of the above-mentioned issues we faced:



Monday, October 31, 2016

Genetic algorithms: Gaming our life goals


This is the second of my 2-part post on Genetic Algorithms (GA). While the previous post introduced the concept and highlighted the salient features of why I find GA fascinating, this post is an attempt at applying this technique to improve our personal lives.

To summarize the basics, following are the defining aspects of Genetic algorithms, when you apply this to solve an optimization problem:

  1. Population: Begin with multiple solutions (random & inefficient, to start with)
  2. Evaluation: Set a measurable criteria to evaluate effectiveness of the solution against a target
  3. Selection: Select the (relatively) top-ranked solutions, and kill the rest
  4. Recombination: Combine these top solutions (say 10%) in some manner to create the next generation of multiple solutions
  5. Mutation: Once in a while, instead of the usual Recombination (step #4), create new solutions with some unusual (maybe illogical) logic 
  6. Evolution: Iterate with these new solutions and loop through steps #1 through #5 to keep improving solutions, generation after generation until target is achieved


Now, for the parallel to our personal lives and how Genetic Algorithms could possibly come to our rescue. Read each of the below in conjunction to the concepts numbered in the same order 1-thru-6, above:

  1. Cultivate multiple habits or choose several activities (say 10 to 15) to pursue at work/home. 
    • For instance, joining a gym, waking at 5 AM, setting 1 hr of no-gadgets time every day.
  2. Set some end-goals that can be used to measure against. Now periodically (say once a month) evaluate whether each of the habits/activities are taking you any closer to the stated goals. 
    • Examples for goals include, learning a new skill, achieving something at work, reducing 15 kg weight, spending more time with loved ones.
  3. Continue with those few habits (say top 5)  that propel you towards the goals and discontinue all other activities.
  4. Alter the habits slightly by learning from things that worked out. Create variants of new activities (totally the earlier 10 to 15) that are directionally towards your goals.
    • For instance, you might try zumba instead of the gym, or wake up at 5.30 AM.
  5. Once in a while, break your routine and add some completely random habits, preferably things that make you uncomfortable.
    • You may decide to spend one day of your weekend walking around the city on foot, or maybe spend few days every month in the most remote & unconnected part of your state.
  6. Continue with this process and iterate with new & improved habits, say every month, until you reach the goal.

One might wonder that parts of the above process look intuitive and some of these could be things one already does. In my opinion, this becomes immensely powerful on account of four things: Choosing a larger set of habits,  measuring them against a set goal periodically, continuously tailoring the habits or totally killing them. Finally the most powerful one is in consciously breaking routine and adopting some bizarre habits.

Let me know what you think.


Genetic algorithms explained: Evolutionary way of problem-solving


I recently learnt about Genetic Algorithms (GA) and must say I've been quite fascinated by it. This is a two-part blog post on this topic. In this first post I will make an attempt to explain it in non-technical terms, with a simple example to illustrate the concept. The second post would be on applying this technique beyond the realm of business problems - by contemplating on how one could apply this to improving some aspects of our lives.

Now onto Part-1.

I had blogged earlier about Biomimicry, which in simple terms is design inspired by nature. Genetic Algorithms fall into the same category of solving human-faced problems, by getting inspiration from nature's solutions. In other words, this is the discipline of copying how nature operates in a bid to come up with similar harmonious solutions.

Placing Evolution in Perspective

To understand Genetic Algorithms, we'll try and understand the biologics of evolution, by using the bare minimum terminologies. 

  • We are way too familiar with how one generation of humans are smarter than the previous ones. We, collectively are more evolved and (perhaps) smarter than our ancestors, while the same can be said of our kids who are way ahead of us, thanks to evolution
  • Per the theory of natural selection, organisms better adapted to their environment tend to survive and produce more offspring. By survival of the fittest, the more evolved species reproduce more and pass on their genes down the line, while the weaker ones slowly die and get extinct.
  • And, there is this quirky process midway wherein some organisms suddenly have completely unexpected traits. There are the geniuses, those highly regarded people in history of mankind with IQ levels closer to 200, like Leonardo Da Vinci. You've most likely heard of rare people with 6-fingers in a hand, which is also quite unusual. All these are likely cases of mutation, wherein suddenly an unexpected change happens, in otherwise linear, incremental evolution. If this change is strong enough to influence rest of the species, it spreads through reproduction and impacts the subsequent generations. Else, it just stays an aberration and doesn't get passed on. To get this in perspective, think X-Men!
In summary, a species of organism keep adapting to their environment, incrementally evolving and getting smarter. The smarter ones survive and reproduce more, while the weaker ones die. Once in a while, there is a sudden & unexpected change in traits of few organisms within the species and if this is remarkable and powerful enough, it gets passed on to the next generation and slowly spreads to become the defining characteristic of the entire species. Else, the mutated offspring dies and doesn't impact rest of the species.

GA: Application to Problems

What if we try and apply this evolutionary biological process to solve problems in the area of optimization. We can create a computer program that exactly mimics this process of evolution by keeping all the ground rules coded in its entirety, grow solutions from generation-to-generation, until we arrive at an optimized solution that is more efficient than a set threshold.

To illustrate with an example, lets take the popular problem of Travelling Salesman. Given a set of 5 cities that a Salesman has to travel to (exactly once to each city), the problem is to find the route that minimizes the distance travelled by the person. This is an optimization problem and while its simple to solve by hand for the 5 cities, it becomes non-trivial if you increase the number, to say 30 cities.

Applying Genetic algorithm to this problem: 
  1. Start with a population containing a set of multiple random solutions - that is, multiple ways of ordering the 5 cities. 
  2. For each of the solutions in this 1st generation population, evaluate by computing the total distance travelled. Order the solutions from best to worst (within this iteration).
  3. Select the top 2 or 3 solutions with their ordering.
  4. Marry within this solution by randomly exchanging routes between the solutions (while sticking to ground rules, such as no repetition of cities). This step mimics the reproduction or recombination, as it happens in nature.
  5. The above step creates the next generation with a set of new potential solutions.
  6. Once in a while (say every 10th iteration), introduce mutation by performing a random operation. For example, you could swap every pair of cities in the route created until that step.
Repeat the same process from step #2 through #6 above, until you arrive at the solution with the lowest distance travelled. Each iteration is the equivalent of one generation and through the process of evolution, each subsequent iteration would have atleast some solutions which are slightly better than the earlier ones. You might iterate through this 100s or 1000s of times depending on the problem, but this process is guaranteed to come up with the most optimal solution.

Summary

The fascinating aspect about this technique is that you can arrive at the best possible solution, and possibly the global minima to any optimization problem. You just need to code this in the structure & process as outlined above, and without getting into construction of complex mathematical equations or their solutions, you can get the best solution through an evolutionary search procedure. Check this article for a more detailed explanation. They seem to be applied to a variety of real-world problems, and they sure hold a lot of promise.


Friday, October 28, 2016

How to read 100 books in a year


I lifted this post title straight from an article on Zapier titled 'How to Read 50 Books a Year, in 7 Easy Steps'. I just doubled the number to make it more appealing.

Though worded like a clickbait title, the author, Stephen Altrogge's content captivated my attention. He offers some sound, practical advice and this was stuff I wasn't practicing, or just didn't know a year earlier. In the light of my dismal progress on my Goodreads 2016 challenge, this is advice worth re-emphasizing to myself.

Let me summarize 5 of the tips I could relate to, here. For a full read, please check out the original post that has several good examples and useful references:

#1: Make your book list.
This helps to not only stay on top of your reading list, but the social integration with friends, recommendations and newsletters keep your motivation levels high.
> I set up mine on GoodReads just earlier this year.

#2: Begin reading atleast 2 books at a time.
To account for mood fluctuations and change in interests at different times of the day/week, this tip retains you within the realm of books. Else, you might end up watching movies, reading endless feeds on Facebook or whatnot.
> I never did this consciously earlier, since I considered it sacrosanct to finish one book cover to cover, before picking up the next.

#3: Read in small chunks.
10 minutes is good enough to catch up on some portion of the text and you don't need hours together to settle down with a book. This is another area where read-out-aloud apps can come in handy.
> This was a liberating tip to break my mental block of the need for atleast an hour to pick up a book.

#4: Learn to increase your reading speed.
Increase your throughput and you increase your net output. There is definite benefit in speed-reading books and I was surprised to hear about browser-extensions and apps that train you on this.
> I have an average reading speed and if the content gets interesting I slow down to savour every word, and take some moments to live the experience vicariously. This tip is something to be tried out.

#5: Be selective with your reading choices.
Life is too short to finish a bad book. There's no shame in putting a book aside or not finishing it, in order to get most out of the next book that you'll actually enjoy finishing. And for some books reading every word might be an 'overkill', and there is a 'layered' approach to get a general understanding of the book.
> This was another revealing tip. A habit closely tied to #2 above, I used to loathe dropping a book midway and there are occasions I had to push myself several weeks to get over to the last page. 


-->

Thursday, October 27, 2016

Your neighbourhood traffic signal could get smarter, and catch violators


Ever since the online system for traffic chalans went live in Hyderabad, one sees fewer incidents of cops talking (read negotiating) with traffic signal violators, who stand meekly by the roadside, trying to pull a trick or two (or some rupee notes) from their bag to go free.

Over the past few years, a camera wielding cop evokes more fear from the public than a lathi wielding constable! Any signs of a violation, the traffic constable clicks a picture of the vehicle with the number plate and promptly upload them online. The online system, app reminders and mobile notifications take care of the rest.

The online system has indeed been a welcome change. However, this isn't to say that the 'negotiators' have been totally done away with. Moreover, the lack of a cop by the road-side makes many a motorist go berserk, given that there isn't the 'papparazi' to catch one in action.

This is one area where computer vision, image processing and automation can simplify lives further, and bring about some orderliness. Imagine if HD CCTV cameras are setup at every junction or major points in the roads. Now, computer vision can process the streaming images, make out the number plates and potentially alert remote personnel on traffic violations. Upon confirmation, a traffic challan can be immediately raised. A futuristic version of this system, could process everything fully automatically.

This not only automates & simplifies traffic monitoring and law enforcement, but also effectively does away with any chance of 'negotiations' and out-of court settlements! Importantly, this instills a fear of the unknown in the public, that someone is perpetually watching over one's shoulders and that no violations would be spared.

Such a system is very much possible today with advances in image processing and computer vision, while the streaming loads can be handled by a standard big data setup with a Hadoop/Spark cluster. Revenues from the challans and enforcement will more than cover the cost of high quality cameras as well.