Friday, February 09, 2018


(hindi: ghar / home)

घर वहां, जहां
साथ हो अपनो का,
ख्वाब हो अपना सा,
मन्नतें हों अपनों की
और सल्तनत प्यार की।
चार दीवार,
बगीचे, फौव्वार,
या झोपड़ पट्टी
गलियों के पार,
ये तो सिर्फ मकान हैं।
उड़ते चिड़ियों का घर आसमान है,
परिंदे की उड़ान उसकी शान है,
खोकले घोसलों में कहां प्राण है?
जहां मन भाये-
आलीशान है!
कमरे हज़ार,
में करे कोई विहार,
अगर चैन की नींद,
एक में भी न मिले,
तो सुकून कहाँ है?
जहाँ तन की थकान घटे,
मन के वहम मिटे,
एक दूसरे का सम्मान दिखे,
सुख, दुःख और बलिदान बाटे,
वही घर, वही आन है।
घर वहां, जहां
साथ हो अपनो का,
ख्वाब हो अपना सा,
मन्नतें हों अपनों की
और सल्तनत प्यार की।


lull a by

Hush, little child,
In your dreams hide,
While we divide,
Plunder and ride,
Into the dark side.
Hush, little child,
Hold on to what’s worth,
Our minds: numb with dirt,
Crass online mirth,
Cat memes. T-shirts.
Hush, little child,
Lest I your spirit spite;
But you’ll hear of souls pried,
To feed (strong)men’s weak pride,
While the loved ones cried.
Hush, little child,
Survive. Thrive!
This world, revive,
With these words five:
Love will keep us alive.

Yesternight at nine

When my mind is fooled by my own disguise,
Should I then believe what I see through my eyes?
Life’s an illusion, I do realise;
Mirages of mountains, treading thin ice.
The journey seems pointless, lead by a mere whim,
Staring at a haystack, seeking the pin!
Trying to be cheery, while weary within,
In the land of no fantasies, dreaming is sin.
Who has the answer, to what lies beyond?
The puppets keep dancing: pulled by the clown.
The king stays alive on his puny lil pawns.
The queen waltzes sideways. The horses go down.
The road that's less taken, sure does sound divine,
Tempting like a good old chilled bottle of wine,
Growing like a cancer, you'd hope was benign.
My ship left the harbour, yesternight at nine.


A good teacher once said, that between choosing to express myself versus keeping quiet merely out of the fear that I might say something ‘wrong’; I should always favour letting it flow. The sheer weight of living with a regret for the rest of my life she’d said, would just not be worth it.
Anyways, thanks to that lesson; I’ve made a fool of myself so many times now that the fear thereof does not inhibit me much these days. I’ve had my fair share of failures, rejections, disappointments and despair. And I’ve had my uber moments as well! It took me some time though to realise that she had intended it not as a licence to be impulsive and indiscreet but rather as a mature expression of a considered conviction. So if that means I might find myself in a muddy morass more often than not, as long as I’m aware of what I’m getting into, well, so be it!
The key, evidently, is to somehow survive them all. By clinging on, at times, to nothing more than a faint foggy vision of a scraggy peak beyond the valleys we find ourselves in. Trust me, it’s much less fun living in the plains anyway! In the end, they say, that what doesn’t kill us only makes us stronger.
As contrary as it may seem, making a fool of ourselves a few times over, might actually be the best secret recipe for becoming foolproof. Each time, life teaches us to be a bit wiser and helps us smile a bit wider at our sheer vanity.

We are all in this together

(Originally published on New Year day 2018)

As another year draws to a close, and a new one breaks, nothing can put you in a thinking hat as best as a bout of fever can. That’s after you recover just enough to think clearly but not enough to be heading to the gym for a workout ;p
So here’s what I’ve been thinking.
It’s an incredibly small world that we live in. What matters most are those little connections we have with each other. Friends. Family. Colleagues. Strangers. The few fleeing moments we have together. Those amazing coincidences. Those chance encounters. Those planned rendezvous. The shared interests. The celebrate-able differences.
Helping. Sharing. Caring. Giving. Loving. Talking. Sometimes, just listening.
While it’s our minds that truly connect. Sometimes, we should even let our bodies too. A handshake, hug, kiss, caress, touch. Simple gestures that we have managed to make sound incredibly complex! Hell, we are so twisted that we even make an innocent smile look sinister and suspect.
In short, we are making it difficult to make those connections that we were talking about. It is quite probable now for entire lifetimes to pass without making any meaningful connections at all! To many, this might also seem completely normal. This is the curse.
So in these wee hours of a new year, here’s me wishing that we all make a LOT more connections this year. Deep bonds even. This is what we’re meant to. In this astoundingly vast universe, we inhabit a small world. Your small act of kindness, your being there as a shoulder for someone to lean on… Our little acts may have cascading effects that are beyond obvious. We are a part of a network, mysteriously and mystically connected. Believe it or not, we are all in this together ☺

Sing a song instead

They say: love trumps hate and that music is the food of love.

They whose hearts are filled with hate,
Can they discern sweet songs of praise?
They whose eyes burn red with rage,
Can they e’er see a loving gaze?
Can those whose hands embrace the mace,
E’er kiss at night their own child’s face?
And they who plot to kill and maim,
Could they know what would seal their fate?
We're specs of dust, mere cosmic sand,
Moulded by the unseen hand,
With borrowed breaths that help us land,
Our little roles in this weird band,
There are things to learn, our minds expand,
Before life waves it's magic wand,
Like every show with entree grand,
End it must when time demands.
So why fill this short life with hate,
When we could share some love instead?
Why fill the air with cries and wails,
When joyous songs could fill this place?
Why not use that strong hand to help,
Someone who’s been stuck in life’s ebbs?
Why waste those breaths just screaming threats,
When you could sing a song instead!

[I’ve been in Satna, MP, India for the past week and was shocked to hear that on 15th December 2017, a group of christmas carolers from a church nearby were arrested here, their car burnt by a mob, and those who went to enquire assaulted (while the police were ‘helplessly’ watching), allegedly because their carol songs were seen as a part of their attempt to forcibly ‘convert’!? people into Christianity. Yes. It is a true incident that is as weird as it sounds.]

Programmable Things. An introduction. Plain and simple

Just make it!

Original image source: Wikimedia, just search for The Thing :)
This is a great time to be a part of the hardware+software maker movement. The things that you make here are called- Things! Seriously :) and by extension, we have IoT, aka Internet of Things.
There is such a wide variety of low-cost, easy to program and reasonably simple to integrate micro-controllers out there that its literally a bonanza. And, it only keeps getting better! There is a huge community of makers and there are tons of videos and tutorials on the web that can help you know more about anything and everything that you will need to make your own Thing. If you have a problem to solve and a solution in mind, my attempt here is to give you a primer: A meek peek into this wonderful world. Perhaps, in the near future, I will share my notes on a few deep-dives as well.


Almost all projects are of the following nature:
Input(s) → Processing → Output(s)
(OH: cmmon!) This simplified view is a great place to start as we dive a bit deeper. A simple example of such a system could be:
There is a button, pressing it (input) will turn the connected light (output) ON or OFF (processing: toggle light state).


Inputs are read from sensors that either translate some physical phenomenon, human intent, commands or instructions through some physical activity (like a button press), into electrical signals.
Now these electrical signals could be analog. Analog signals are those where a variation of the signal amplitude/ strength (measured in Volt, or ‘potential’) or current (measured in Ampere or ‘flow’) could be measured to infer something about the phenomenon being measured.
The signals could also be digital, where the measured quantity is represented as zeros and ones. So, essentially a set of ON/ OFF pulses (binary representations, that the microprocessor understands) that encode a number/ value say in the decimal system (which we tend to relate to much better).

Bonus: Read a quick recap on number systems here:

When the signals are analog; for the computer to make any sense of it, it must be turned into its digital or binary form through what is called sampling. This is done by an ADC (Analog to Digital Converter). Most micro-controllers have on-board ADCs but one could use a separate ADC as well.
So, sampling involves taking a snapshot of an analog signal at a point in time and then the ADC converts that value into a binary (base 2) representation.
To get a meaningful representation of the original signal, the sampling rate must be high enough. So, higher the sampling rate (frequency or the number of times you take the sample reading per second), the better the signal fidelity. For example, if you record your sound using a microphone on a computer, a typical sampling rate would be 22KHz. Which means, the sound card has an ADC that takes 22 thousand samples of your voice signal amplitude from a microphone per second and stores each of them up onboard!
Also, the number of bits that the system uses to represent each discrete signal sample determines its accuracy. For instance, an 8 bit sampler can represent 2⁸ or 256 different signal values (from 0000 0000 to 1111 1111). Assuming we are measuring a maximum of 1 Volt using this sampler, this gives a resolution of 1/256 or 0.0039V. So this system is capable of measuring variation in voltage as small as 0.0039V or more up until 1V but if the increment in the voltage is less than that, it will not be able to measure it. Now, if the sampler supported 10 bit, that would give 2¹⁰ or 1024 possible values between 0V and 1V. This translates to a resolution of 0.0009765V ! This is evidently a lot more granular than an 8 bit sampler.
So, the higher the sampling rate and the higher the number of bits returned per sample, the closer will the digital signal come to represent the analog one that it just attempted to digitize. So, theoretically, what it means is that digital always loses ‘some’ of the original analog signal during the process of conversion, however hard it may try. But then, these losses tend to be negligible in high fidelity systems and once the signal is digital, well, its food for a microprocessor and you can do a zillion things with it that you may not have been able to pull off when it was in the analog form.
So what kind of sensors are available? Well, a whole lot. Here’s an indicative list:
a. Temperature
b. Pressure
c. Sound
d. Vibration
e. Location
f. Motion
g. Magnetism
h. Touch
i. Light
j. Humidity
k. Presses (buttons)
Just google for ‘x sensor’ where x is the thing you wish to measure/ read as an input and you should get to some sensor that does the job for you. There are some sensors that come with an ADC built in, so you could read their output straightaway.


For systems to be useful, they need to be able to present their output in some form. Where humans are involved, these better be human readable/ interpretable forms. This is where output systems come in.
Simply put, the output systems do a reverse of what the input systems do. They translate the digital output values into some physical phenomenon, like: displaying them on a screen (light), voice output or creating a buzzer sound. At times, they need to be sent to other systems which will take them as inputs. One example would be if this needs to be transmitted to a server so that a log could be maintained, or an email sent!
The following is an indicative list of output systems:
1. LCD/ OLED/ LED displays
2. Speakers
3. WiFi, Bluetooth, RF transmissions
4. Tactile feedback


Consider a weather station which needs to measure, temperature, humidity, wind-speed and location. Evidently, more than one input is necessary here. And you might need to convert the read inputs into some other scale and notify a central system periodically and raise an alarm if there is a huge variation in any of the input values. Or combine multiple inputs to predict whether a storm event is likely. This needs a processor. A processor, in simple terms is something that can execute a defined set of operations on given inputs. Microcontrollers have a ‘computer’ inside them. Usually they are RISC(Reduced Instruction Set Computer), which means that it may not have a whole set of capabilities that your desktop computers have, but they would have just enough to pull off your job. So, now you need to choose a suitable microcontroller for it.
These are a few important considerations while narrowing down your choices:
a. Number of inputs you will need and their types (eg: 2 analog inputs and 3 digital inputs)
b. The voltage levels of the input sensors
c. Physical size limitations
d. The amount of processing required
e. Number of outputs you will need (eg: LCD display + WiFi + SD card logging)
f. Power requirement (access to mains power? Long battery life? Low cost of power? Solar?)
g. Ease of prototyping and scaling
Once you have narrowed down your requirements, just search the net to find the suitable options.
What options do you have, as of end-2017 (what I love and know for sure is that this list is bound to get obsolete soon 😊)

1. Raspberry Pi

For more complete systems that can interface with a set of peripherals like keyboards, mice and monitors. Their most recent addition is Raspberry Pi Zero W which has HDMI out, WiFi and Bluetooth, costing about Rs. 1500 (all connectors etc included!).

2. The Arduino family

A wide variety of choices. These guys literally did set the maker movement on fire by introducing a simple programming interface and easy to prototype input/ outputs. Most of them use ATMEL processors.

3. ESP8266

The hip youngster on the block. Developed by a Chinese manufacturer called Expressif, ESP8266 and its clones are inexpensive devices with WiFi capability and a decent spread of input/ output options

4. ESP32

Evolution of ESP8266 with Bluetooth/ LE support added and a lot more!

5. nRF51/ 52 series

Low power BLE capable devices from Nordic Semiconductors are slightly difficult to program but are powerhouses enabling a revolution in portable devices like smart-bands and other wearables. Most of these use ARM Cortex processors.
There are a lot more options out there, I’ve only picked up my favourites that get most of the jobs done. Of course, we have folks like Intel playing catch-up with their Edison series et al, but, the kits above rule the roost.
So, there you are; You have now been introduced to programmable things! Go figure and make!

Number systems

Recap counting!

The decimal number system that we are used to, is called so because it uses 10 distinct symbols to represent any value. These symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. Any ‘number’ can therefore be represented by combining these 10 distinct symbols.
What is interesting is that, this is not the only way to represent the numbers. I mean, one could imagine a system where instead of symbols 0->9 one used alphabet a->h. So 24 could be written as ce. It is funny, but is perfectly possible. Since most of us are taught to count in decimals right from the time we were kids, and since we usually have ten fingers, this manner of counting seems ‘natural’ to us 😊. (The Octopus, I’m sure, has an octal (base 8) number system ;p)
Octopus. Source:
Another variation would be, if there were 16 symbols instead of just 10! This is exactly what the hexadecimal system does, it has symbols 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f. So, Bryan Adams was singing ’18 till I die’ in a hexadecimal world, he would sing: ’hex one zero till I die’. I hope you get the drift.
The number of symbols available in the system for representing a value is called its ‘base’. So decimal numbers have base 10. Hexadecimal numbers have a base 16.
In a similar fashion, in the binary world, there are unfortunately only two symbols 0 and 1 (and they correspond beautifully into one of the simpler natures of electricity that either flows/ ON state/ 1 or does not/ OFF state/ 0) (or, has the potential to flow or not 😉). So binary numbers are base 2.
Numbers with a particular base are written as a subscript: (X)n
When we deal with decimals or places where the n is obvious, we of course ignore writing it.
Bonus: Here is a link to a simple C program to convert between bases:
Hope you know your numbers better now 😊

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!

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.