Friday, November 17, 2017

Zero and one


I’m your zero
And you’re the one
Stand by me
Let’s be one
Cause when I stand
Right next to you
We both make
The perfect two
0
1
01
10
:)


It could’ve been me




Four women,
And a girl barely ten,
Scavenged for the leftovers,
Behind the butcher’s shop,
While I paid for the choicest cuts;
With banknotes, crisp and new.

It could’ve been me,
On the other side.
And for them,
Just another hot summer’s day.
While I gathered my heaven
In a ragged jute sack.

I saw a mother,
And her little child,
Wait to gather the milk,
Spilled over in the crate,
While the milk van unloaded.
And I bought an ice-cream tub.

It could have been me,
On the other side.
Facing hell each day,
While they prayed,
To keep them safe,
Till Thy kingdom come.

Didn’t pick my birth,
Couldn’t twist my fate,
Predict my health,
Or dodge all baits,
What this life gives,
We take. We make.

Yeah, it could’ve been me,
And it could’ve been you.
The privileged few
Feeling entitled to
The cards that we’ve been dealt;
Acting as if we know our bets!

The Thorn and the Rose


The Thorn and the Rose. Two creative expressions of the same plant.

While one is literally poignant, the other is elegantly convoluted.

While the elegance of one is temporal, the poignant other seeks permanence.

Indeed, its the thorn which protects the plant while the flower attracts all harm.

Yet, the flower gives the plant its name while the thorn draws disdain.

The Rose, beautiful as she is, carries within her, seeds to new life, despite being destined to die, dry.

Not every Rose may spawn another! She still remains, just as beautiful, as any other.

The Thorn has his place too. Always in attention. Weapons drawn. Ready for action.

Always in attention. Weapons drawn. Ready for action.

Always in attention. Weapons drawn. Ready for action. Sounds boring? It is.

The Rose always takes the centre stage. She swings and sways to every breeze on her way.

Oft hypnotised, a hand reaches out… but gets a finger pricked instead!

Damn! The Thorn. Yes, every Rose has its Thorn :)

The Dirt and the Tree


They kept digging up the Dirt around the old Tree,

With hoes fashioned out of it’s branches three,

They mocked its muckiness and scoffed at it’s scruffiness,

But waxed eloquent on the opulent tree,

“Mere mud! So mean! How dare it lean? And that too on this grand old beam!”

Cussing and digging till way past six, they scarce realized they were trapped in their pit!

From the empty moat they’d unwittingly built, they sensed that the Tree had begun to tilt!

Then a wind blew, the dark clouds swelled and the once-mighty tree, with a loud thud fell.

In the moments of silence that dawned in the wake, of the virulent vitriol and unbridled hate,

Mounds of Dirt gathered round and wept, as they mourned the end of their grand old friend.

(image courtesy: https://pixabay.com/en/users/danfador-55851/)

Mea Culpa!

Of course, the damn oxygen cylinders are to be blamed! #guilty #gorakhpurTragedy

Life trips!



My worst foe and my best friend,
In my head they’ve made their dens,
Will I lose my mind or find my zen?
Life doesn’t answer to my pen ☺,
I don’t know why and I won’t know then 😞.
A million stories await being lent,
To a thousand journeys- a life well spent!
A hundred miles sure has its bends,
But this I know since I was ten,
A trip never started, has no tale; no end!

Thursday, November 16, 2017

API + RESTful API. An introduction. Plain and simple

Connect!

From Appliance Plumbing Interface…

Imagine that you have just designed a water faucet/ tap which dispenses water only if your fingerprint matches (however strange this may sound, I believe creativity should know no bounds ;). Now, for this to be actually used in a real wash-room or a kitchen sink, it needs to have a receptacle that exactly fits the common water pipe end-point. Lets say, it needs to have the female threaded end 1/2 inch diameter pipe to couple neatly into the male threaded pipe end. In other words, this new contraption of yours needs to follow the same plumbing interface definition as the pipes it needs to work with.

…To Application Programming Interface

Now, imagine if you were more of a software dude/ dudette than a pipe-hardware one. You might design a piece of software that will allow money from your bank to flow out only if your fingerprint matches (this sounds a lot more familiar, right? :). For this widgety creation of yours to be actually used in a real banking app or website, it needs to be able to be ‘integrated’ into the money flow interface definition of the bank(s). As a developer of this new functionality, you therefore need to follow what is called as the Application Programming Interface (API) definition exposed by the banking entity that you intend your software to work with. There you are! You have been hereby introduced to APIs. Simple right?

Why API?

The advantage of defining an API is this. Once defined, and published, it opens your platform up to a limitless set of different applications by independent innovators. So you might see some developer making an app that sends money from a bank account every time someone likes her profile pic on Facebook, or another who develops an app that makes a donation to a random NGO every time you use a swear-word on twitter…I hope you get the drift. There is no limit to the variety of innovation this can spawn. And all this while you enjoy a nice cold iced lemon tea reading some news-feed on your tab.
In short, APIs decouple application use cases, innovation, revenue generation and growth from your core platform. The better defined your APIs and the partner on-boarding processes are, the more you can relax and count the beans :)
API is also important because it helps make as much sense of the options available, to the humans implementing it as it does to the machines consuming or exposing it. This is an act of fine balance.

An API once said, “I need some REST”

Lets now focus on something a bit more technical. RESTful APIs. For a start, Restful does not refer to the relaxation that I’d mentioned a short while ago. The REST in RESTful refers to REpresentational State Transfers.

From verbs…

A lot of us have come from the functional programming world. In simple terms, the interfaces defined there would correspond to the verbs that were being exposed. For instance, in a banking app, you could have an interface defined as getBalance(account) which would return the account balance for a given account. Or, sendMoney(account1, account2). Or, listAccounts(customer). These functions could also be exposed as APIs and they do something based on its input parameters. The response of the API call would be the action defined as the verb and output parameters that would provide more details on the action done.
This kind of API has one inherent problem. An API description could be really arbitrary and it would be difficult to imagine all the functionality exposed without having explicit access to the API creator’s documentation.

…To nouns

RESTful APIs are a different breed altogether. They focus a lot more on the resources or nouns, instead of verbs. For example, ‘customer’ could be a resource, ‘account’ could be another and so on. As for the actual action that you would want to take with a resource, REST simplifies it all down to a set of pre-defined verbs in the WWW HTTP definition.
When you visit google.com, for example; the browser actually executes a GET request for the index page based on the URL (Uniform Resource Locator) http://www.google.com.
The idea (RESTful lends its origin to the doctoral thesis of a genius named Roy Fielding) is that, given these constant verbs; All that a developer needs to know is the set of objects/ nouns that he might have to deal with.
For instance, assume a simplified banking application. It may have a resource called customer or transaction or account. So, in the simplest sense, assume the base URL is https://myxyzbank. Now the base URL is like the rootdirectory for all resources (nouns). So, accessing a customer within the bank would likely be baseURL/customer.
There are a few more properties of RESTful APIs. I would only want to touch upon the fact that these API calls are also stateless. That is, a RESTful API call is in itself complete and independent of previous or future calls. In other words, the API calling entity’s state is not preserved on the server in between calls.

Singular and plural

Also noteworthy is the singular and plural use of these nouns.
While /customer/id refers to a particular customer with a given ‘id’ as its identity;
/customers/ refers to all the customers collectively.
So, executing an HTTP GET request on https://myxyzbank/customers should likely return a list of all customers within the bank, executing GET request on https://myxyzbank/customer/id would return a particular customer only. So, simple plain English “get a list of all customers in this bank” translates to an API, GET on https://myxyzbank/customers/ and the bank should spew out its long list (Of course it ain’t that simple. Security, roles, access and privileges have been excluded from the scope of this article).
Now back to the 4 main primitives and why they are pretty much sufficient for most applications.

Get, Post, Put and Delete is all you need

GET- as the name suggests would simply fetch the resource(s) identified
POST- use it when you intend to create a new resource(s) on the server
PUT- updates an existing resource on the server
DELETE- deletes the identified resource(s)
This sounds a lot like CRUD framework (Create, Read, Update, Delete) used for data storage.

Parameters

Additional parameters could also be passed to and from the server along with each resource request. This data could be in different formats, the most popular and elegant one around is called JSON (Java Script Object Notation). Another excessively verbose and elaborate protocol from our good ‘ol days is XML (Extensible Markup Language).

Beauty and the beast

There is a certain sense of beauty, logic, crispness and cleanness in the structure of truly RESTful API. The sad part is that most implement it with varying degrees of RESTful-ness. To the extent that I have even seen a bank call GET /getCustomerBalance as a RESTful API! That’s a verb on verb action and totally looses the plot.

My attempt was to only provide a plain and simple outline to API and RESTful API. There is a lot more in it and the world wide web should be your best guide.
May the POST be with you!
And May is hot!
Further reading:

O’Reilly,
Restful Web APIs https://www.amazon.in/dp/9351102971/ref=cm_sw_r_cp_apa_i_2A0fzbJN3CK5T
https://youtu.be/7YcW25PHnAA

My Song


Past slow streams and paddy plains,
A gentle breeze, the drizzling rain;
A blue-bird tries catch-up in vain,
To a soulful beat, my rocking train
Back ten years, my numb mind panes;
Glimpses, memories retained:
Had no money, had no pains,
No plans beyond the morrow made;
When music was the sole refrain,
And dreams my waiting soul had gained,
To love, I was not yet ordained,
Just longings that were best contained,
The sleepy city, a narrow lane,
My good 'ol car, a bunch of friends,
Driving with the rolled down panes,
Humming a tune the radio made,
In the back seat, the guitar he played,
My fingers drummed on the wheel splayed,
On a high note, our voices strained…
I still hear the tune play in my head!
A thousand miles about to end,
Round the last corner, the rail-road bends,
Draws up to the station, almost spent,
In my notebook, these words I pen:
If ask I could, something of life,
That’d be to make music in the sunshine,
'Cause when night falls and slumber stays,
I hope, somewhere, my song still plays.
(originally penned in 2015. Image: a pic I’d taken at railway station, Chengannur, Kerala)

Er…


Earth’s warmer,
People colder.
Compassion rarer,
Crimes bolder.
Love’s in a corner,
Hate running over.
Smiles fewer,
Smileys taking over.
Staying closer,
Living farther.
Bodies warmer,
Hearts colder.
Mind's younger,
Flesh older.
Change maker/
Mute observer?
Start all over/
Sweet surrender?

Chasing mirages


Waiting for the night to wake up to a dawn,For the morning mist to make dew with the lawn,To glimpse the chirping thrush, strut on the ground,As the curious squirrels, scurry around.
Simple pleasures that now are rare, less found;
Lost among chores that seem far more profound,
And honourable jobs that buy our good days,
With promises to pay big soon; Someday.
Out to change the world, make a dent, we say,
Held firm by the charms of the silicon sway,
Eyes mesmerised by our shiny screens,
Mind skips to savour the flavours in our meals.
They say, birds in the sky neither sow nor they reap,
The flowers in the garden, need no chiffon and no crepe,
Yet, they live, fly free, are more beautiful than we,
In the best of our garbs ever can be.
Midnight. It’s time again to fall asleep,
The charm of the dream still strong bitter sweet,
There are bills to pay and promises to keep,
But you hear a soul somewhere silently weep.
Then slumber arrives and the body rests,
While the universe conjures our next day’s tests,
And again we’d miss a beautiful morn,
Chasing mirages ever since we were born.

7 Post-it notes for entrepreneurs

Free, unadulterated, unsolicited, self-explanatory compilation of advises from the side-lines.
Yes, we’ve all known these all along, but still… :)
Why 7? Because 42 ;)

“Scale is over-rated, profitability is under-rated”

“Survive long enough and you will arrive soon enough”

“Your enterprise will most likey die due to the same mistakes that others did”
a.k.a. If you see a banana peel, just don’t step on it

“Get the smallest, able, agile and committed team and aim for the largest, achievable and sell-able goal”

“Net-satisfaction, net-happiness, net-worth, all are important”

“Work smart not hard/ get a life. Help others. Be kind. Stay humble”
There was a reason why mama taught these virtues :)

“You can do it :)”

Thursday, March 02, 2017

Frames

Painting by Arpita

Oh, these frames on our walls,
Windows into worlds beyond.
Snapshots in time, of our thoughts,
Raindrops in oceans of droughts.
Of tales that were told with a drawl,
Stories played out to enthral, 
A child’s first crawl.
The first pencil scrawls.
A holiday snap.
That infamous nap!
The baby at peace on her mother’s lap.
In million hues, monochrome blues,
Sepia tints and pastel hints,
Moments, dreams, pains and gains,
Captured in myriad enraptured frames.
Luring every peek into a gaze,
To moments gone by; hung in space.

(Originally published on Medium)

Meet Navdy

Image courtesy: Navdy.com, press kit
I have backed two crowd funded products so far. The first was Coin, which officially shut down its services this Jan, after being acquired by fitbit last May. [To their credit, they refunded my contribution after I’d waited for over two years]. Though disheartened, I still wanted to explore the potential of this form of investment. And so I went on to support Navdy. Why? Because it sounded pretty cool and seemed like something that would get my non-smart-but-good car get smarter.
And so in August 2014, I exercised the powers bestowed on one of my credit cards and made a significant (for me) investment on a pre-order for Navdy. In any case, I feel the investment was well worth it considering that Navdy is today priced at around $800 (!) and that each dollar costs a lot more today than it did back then.
Watch this promo-video for a quick intro to Navdy
I was one of the earliest backers and my Navdy was supposed to have been delivered in early 2015. Ha :) Most crowd-funded projects miss their deadline because they underestimate the effort required in making something production grade. The good folks at Navdy did too! There were frequent newsletter updates, but after waiting for over two years, I had almost forgotten about it. That’s until a mail landed in my inbox Jan this year (2017).
Hello Anupam Varghese,
Good news! Your Navdy order has shipped.
After shelling out a a bit more on customs duty, the UPS folks finally delivered the package sometime around our Republic Day.
The Navdy box:
Nice box!
Doug & Team Navdy, you’re welcome :)
The box was larger than I’d expected (almost the size of a largish shoe-box) but opening the box was a delightful experience that showed that the team had put in a lot of thought in putting this package together. By all indications, Navdy seems to have a great design team.
So inside this box there are 4 layers of plastic trays filled with lots of Navdy goodness.
4 trays inside the box
The main unit (Navdy Display) hosts the processor, GPS, bluetooth to connect with your phone (yes, Navdy needs an AndroidiPhone app as well), the dial controller and of course a pico projector attached to a transparent plastic projection screen. The unit is surprisingly well built and feels pretty sturdy.
The Navdy Display unit unboxed
The rest of the stuff includes 3 mounts (of which only one needs to be used), little niceties like dashboard cleaning towels, cable organizers, OBD (Vehicle Onboard Diagnostics Port) connector cable and the dial knob.
L. The Navdy Dial knob. R. Attached to the steering wheel
The dial knob is by far the best accompaniment to Navdy. It really adds easy control to one’s fingertips. While driving, the slick rotate/ tap interface enables control using least distraction or effort. I prefer this over their gesture control. (Navdy recognises simple hand gestures through a driver facing camera on the main dash unit) In fact, I’ve turned off gesture control altogether! The steering wheel mounted dial can control navigation, car-dashboard, music on my phone (it even works on my gaana app) and offers basic call control.
The trickiest part is getting the mount to stick on the dashboard. Mine came off after two days because my dash surface is not flat but is pretty textured and matte-ish, I have to now resort to a double sided sticky tape or some glue. This is my only major grouse with the product and I hope this gets solved in its future avatars.
The other contentious issue is placement. Mounting it straight ahead, in-line with the steering wheel, as recommended by them works fine, but for me, it was a bit of an overload.
The display is very crisp and bright always (my camera focus is off though)
So I moved it to the center of the car dash area, almost where some Audi/ BMW place their navigation/ control display. Also had it slightly angled so that the screen was perpendicular to my line of vision. That way, information stayed pretty much in my peripheral vision but not in my primary vision. I like it this way.
The other good thing about Navdy is its app (I use the Android version). I love the way it is designed. Especially wonderful is the thought that has gone towards the on-boarding process. It wonderfully guides you step by step at each stage. Here’s an example: Locating and connecting to the OBD port. The OBD port for most cars (that have it) is kinda concealed and hard to reach. So what does the Navdy app do? It asks you for your car make and model, then it shows a video on locating it in your car! Then, if I recall right, it turns on the flash light and camera to help me locate it under the dash console! Neat!
The display fonts, colors, icons etc are beautifully designed. They are informative while not being distracting. Information and graphics are rendered very clearly on the projection screen and it adapts the brightness level to ensure visibility even in bright sunlight.
The unit is easily detachable and there is a nice little bag to easily store the main unit safely when your car is parked.
Being connected to the OBD port gives Navdy direct access to real-time car stats as well (like speed, rpm, fuel economy etc) apart from being the power source.
The one small bug on Navdy was that it defaulted to miles instead of km despite having changed the setting on my app. Somehow this config did not seem to persist on the device. I’m sure this will get fixed soon.
Since Navdy uses Google Maps to power its Directions/ Navigation, it did pretty good for Indian roads. The display renders the map in a rounded display area and shows the roads in white with color overlays for indicating traffic.
All in all, I am impressed with Navdy and thank the team for having delivered on its promise (better late than never, eh?). I think its value is in removing the need to keep picking up/ looking at the smartphone screen for navigation (can’t really drive without google maps nowadays) and adding smart controls to media/ call control. This minimises distractions and almost obviates the need to ‘use’ your phone while driving. Till all cars gets smart and add these features to their dashboard, you can get Navdy to add a bit of smartness to your car, that is, if you can afford its really hefty price tag! I think it has some promise for a country like India at roughly one fifth of its current price tag.
Hat tip to the folks at Navdy for having designed a good product, both hardware and software. Feels good to have supported it!