Some recent work


What have i been upto lately? Here is some recent solo-nwork …






























Apart from that, i have rediscovered Faith in God. No, I didn’t strike Gold yet! But i know God exists and i will do my best to hold on to this faith.



to each his own

Interesting observation while i was out for an evening walk. I’m in Mumbai, India. It’s nearing the end of a (temperate) winter and approaching the slow onset of summer which will eventually peak during May. But what do we have here — a tree with all leaves gone red? It’s like our very own autumn, except at the fag end of winter !? The temperature after all has been around 15 – 20 C.

Shown below is the all-red tree I saw.

2014-02-06 18.14.12

Next, I tbook a specimen leaf home and showed it around.

2014-02-08 13.33.58

Turns out that this was an Almond tree. Almond trees generally blossom when it is sufficiently warm. Turns out that if we had carefully planted Almond trees interspersed with the evergreens, we would have our own autumn season experience, except at the start of summer :)

To each his own autumn!

RDF, contexts, rules with social and sensor data …

RDF driven Environment services

  2. Contexts
  3. Rules
  4. Interaction patterns
  5. REST service and technology stack
  6. AngularJS app
  7. Questions ..



  1. Lends itself to a distributed ontology structure, merging different documents
  2. Can be integrated with Natural Language
  3. A more meaningful representation of data, encapsulating the knowledge
  4. High-level English verbs (comprising low level REST calls) can be modelled as OWL predicates

REST HATEOAS constraint:

  1. “Follow your nose” approach to navigate data
  2. May be applied to RDF representations as well, through serialization formats such as JSON-LD
  3. In this example though, we stick to upholding HATEOAS using AtomLinks (this is not the best approach though)


A “context” usually specifies an environment setting. In this example, the context specifies the following facts in RDF –

“Smart-mart” is a store that contains a section on “Whole foods”. This section displays a form on “Wholly nutritious foods”, which lists “Peanut butter”, “cheese” and “almonds”.  Buying each of those from the shelf results in a tweet which describes the small discount offered upon tweeting the purchase. Further, as Smart-mart is inside a certain airport (YVR), there is a sensor that has subscribed to the departing flight count at YVR.

These facts are stated in the graph below. Contexts can be crowdsourced.




A “rule” specifies the behaviour resulting out of each component of the above context. In that sense, rules, defined as subject-nodes in the below graph/TTL may be the predicate nodes of the context graph above. Rules may themselves be bound to endpoints, which are loosely-coupled. Those endpoint invocations will accept parameters, whose values will be sourced from the context graph above, at runtime. In this example, the following rules have been described in the generated-graph below –

“contains”, “subscribes”,”consists”,”displays”,”tweets”

Rules can be crowdsourced.


Interaction Patterns

Finally, there is a third RDF document that describes how a user chooses to interact with the context. This adds a third degree-of-freedom to our configuration.

In this example, the interaction sequence is described as follows:

  1. The user enters Smart-mart, thereby also passively subscribing to the WotKit sensor for YVR airport departure-counts.
  2. The user proceeds to Whole foods section
  3. The user sees the display of Wholly nutritious foods
  4. The user proceeds to buy one or several items among – Peanut butter, cheese, almonds, thereby tweeting his purchases automatically

The interaction patters are described in the graph below


REST service and technology stack

We create a REST service upholding the HATEOAS constraint using Atomlinks, wherein we simply crawl the “Interaction pattern” described before, thereby using SPARQL to join these disparate documents in the process, with as little out-of-band data (eliminating the out-of-band data is a challenge!)

  1. One of the out-of-band data is the way the join happens between contexts and rules. This needs to be parameterized.
  2. In general, there needs to be a join between the way these RDFs are built and how they’re queried in SPARQL. This maybe done through an overarching RDF or a factory-API

The technologies used for this prototype are {RDF, SPARQL, Apache Jena, WotKit Sensor API, Twitter API, AngularJS}

AngularJS app

Finally, an AngularJS app is built to crawl the REST HATEOAS service and simply display and navigate to/from each “Step” that is defined in the “Interaction Pattern” RDF. That makes the client app very lightweight. Shown below are the AngularJS and Twitter screenshots, and the first step also shows the data obtained from the WotKit sensor.

s1s2 s3 s4 s5 s6 s7 s8 s9 










Questions mainly revolve around how to API-fy/parameterize the “glue code” in the SPARQL query. To that, this is an excellent article —

Smart Gardens and “Interaction-as-a-service” [musings from the developing world]

Want to share a Demo i developed over the long weekend. This is related to the Internet of Things. A concrete Demo is shown towards the end, so please stay tuned all the way through to the end of this post :)

The problem
Interaction with present-day “Things”, especially in the slowly-adapting developing world presents few peculiarities with respect to using “Things” –

1. Most Things are not web-enabled.
2. Most Things are rather clumsy to use (Lack of space, inaccessibility, lack of time to use the already clumsy Things creatively, use-and-throw culture …)
3. A slowly adapting society. General state of passiveness in using Things more innovatively. Too many products and standards and the ensuing chaos.
4. <perhaps a lot more points>

Low usage of Things
This leads to low usage of Things. Low usage of Things implies less activity is generated and this potentially has ramifications on the flow of business vis-à-vis those Things. Obviously, if you do not (creatively) use your Things are much as you should, you do not generate enough activity. Sounds like the IoT wave may bypass a lot of existing Things, and there are lot of those “existing” Things already!

A Marketplace for “Interaction”?
So, if you have a set of Things but are as yet unaware of how to optimally extract creativity out of their (diversified) usage, you may well hear from someone else who has good knowledge in the the creative use of those same Things of yours. Creative usage, apart from the above mentioned “activity” benefits, also offers other benefits such as applying your Thing to optimally satisfy a target objective (for example – minimize the usage cost, maximize the usage-cycles, do multiple-tasks out of a single Thing ..)

That’s where a Market-place for “Interaction” with present-day Things comes in.

So? ..
With an unkempt garden and (an equally unkempt) bookshelf, and a bunch of QR codes at my disposal (so typical of a developing world setting with as-is resources), i have created a Demo based on IoT which integrates a QR code scanner with Thing-APIs and Twitter to demonstrate the value of what i would call “Interaction-as-a-service”. Communication with “Things” takes place using Natural Language.

Implementation was done using NodeJS, MongoDB, Google Apps scripts, Twitter API, Thing APIs (Garden, book_shelf, weather) and Java.

Proposing “Interaction-as-a-service” and it’s value-add.

It’s winter. I (finally) Web-enable my unkempt garden plants. I have three plants –

1. Epipremnum aureum or Money Plant
This requires less sunlight, moderate amount of water, less temperature and is generally placed indoor. It’s value-add is reducing atmospheric pollutants.

2. Ocimum tenuiflorum or Holy Basil/Tulsi
This requires moderate sunlight, moderate amount of water, moderate temperature and is generally kept outdoor or indoor. It’s value-add in winter is to provide leaves that can be crushed to make medicinal tea.

3. Magnoliophyta or Flowering plant
This requires high sunlight, moderate amount of water, moderate temperature and is kept outdoor. It’s value-add is to provide colourful Flowers.

As said, my plants are arranged in a random manner, some of them overlapping the others. They also need to be watered. Some of them need more sunlight than the others, and they all have their rewards/value-adds in return.

Formulating an Interaction
In this scenario, i work on ordering my plants, watering them and placing them under sunlight or indoor as per their requirement. On doing so, i hope the plants to give me their respective value-adds in a matter of a few days.
This activity creates a simple Interaction style — prioritize leading to reward(Flowers).

Porting the Interaction
This interaction-style is then ported to another human-Thing interaction scenario, one involving my unkempt bookshelf. As a result of that, i expect the bookshelf to tell me which book(s) i should place in the front row so as to get the most suited recipes in this “context” (Winter).

Here is how the entire Human-Thing interaction and it’s porting to another scenario goes –

Demo time!
A concrete, working Demo is shown next.
Shown below in my unkempt garden ..


As we see, i have three plants which are entangled into each other and are not taken care of well, in terms of Sunlight, Water and Temperature.

Web-enabled unkempt garden
Then i web-enable the three plants using simple QR codes pointing to a page which shows their current status and a description.


How’re you plants?
The plant is scanned and this fires a tweet from @WOTTBOT (my Demo Bot) to my Twitter ID

(this QR scan picture is for representational purposes)


Now, a tweet is fired as shown below


@WOTTBOT further queries the plants’ current status and notifies me with it


Formulating the Interaction
Equipped with the current status of plants, i inform @WOTTBOT that i will work on my plants to improve their state. Here, i initialize the interaction style (prioritizing)








In response to this, using (ideally crowdsourced) information, @WOTTBOT tweets back the “reward” part of this Interaction style, as also a unique identifier it assigns to this Interaction-style.


What has happened in the processing is that an Umbrella-REST-API has created an Interaction REST API on-the-fly, on the resource “prioritizing on plant” and packed in all the required information (context = winter, sequence = GET,PUT, input=order, output=flowers)

The on-the-fly REST API is a resource that is itself an API. Thus, POSTing to this (API-)resource implies creating the API, PUTting to this (API-)resource implies porting this API and GETting this (API-)resource implies executing this API on the API-factory server.

To complete formulating this Interaction, i actually execute the watering and prioritizing activities on the plants and tweet the status back to @WOTTBOT, which then modifies the state of these plants



Porting the Interaction to a different Human-Thing scenario

Here is the unkempt Bookshelf of recipes
I have three books –

1. The Big Book of Juices
2. The Big Book of Soups and Stews
3. Ice cream CookBook

They’re kept in the recipe bookshelf in no certain order pertaining to the “context” (winter) that is retained from the previous interaction scenario

bookshelf_as_is As i scan my bookshelf, @WOTTBOT asks me what i would like to do with it.
(Ideally through a Marketplace), the prioritize -> reward interaction is available to me for porting and applying to this scenario and i use it.

(this QR scan picture is for representational purposes)




Then, the on-the-fly interaction API created earlier is applied to the new Human-Thing scenario in the same context. This is done by invoking a REST GET on the ported API to execute it. Notice that the API identifier is passed here as a hashtag. Assuming that my web-enabled books are tagged with the context term “winter”, i get back the interaction expected out of me in this scenario












I am notified to put “The Big Book of Soups & Stews” in the front of the bookshelf so that i can prepare warm soups in Winter (context). Such an information, could again, be ideally crowdsourced in the library implementation of the ported Interaction. To execute such a complex action, the complex verb prioritize is split into a REST sequence GET->PUT for me

10This way we can see a value-add of porting Interactions formulated in one user-Thing scenario to another with it’s obvious benefits.

Interaction-Design diagram of such a system


Isn’t it time for Interaction-as-a-service? Some benefits of such a concept
1. Training (new) people on (new) Things
2. Using Things more creatively and in context
3. Improving the utilization of Things with an accompanied increase in business relating to those Things
4. <more points here?!>

PS: Plants are a good starting point to show formulating such an Interaction. They are domesticated, react predictably to Human input, have huge diversity and are readily available.

Art Exhibition suggestions?

Does anyone have any suggestions for me on how to hold an Art exhibition the easy way? I want to hold a “real” Art exhibition and want to figure out how to go about it. Having already mouse-drawn (the tedious equivalent of hand-drawn) over 100 silhouette pieces of Art, i feel like holding an Art exhibition

(Needless to say, whatever i make out it, 50% goes to a charitable organization).

Introspection / Horizon [a sketch]

introspectionThe power of introspection cannot be put in simple words. Staring into an indefinite horizon makes the possibilities in life appear to only multiply, albeit somewhat impractically at times. Judgement comes in handy in sorting out some gems out of the plethora of possibilities and applying those filtered possibilities in real life, all towards success and a good goal.

Shown in the background is a horizon where some icy mountains meet the sky. The place is supposed to be a scenic one near the Himalayas in my country India.

As usual, drawn with Microsoft Paintbrush using the Computer mouse. Do check-out my post on the Art-for-a-cause initiative –

Drawn in response to the weekly photo / Art challenge –

A second look [some thoughts]

Ever felt that you did not have an inclination for some things, some subjects / topics, some concepts, some situations and therefore you simply gave up on those and folded like a book — closed?

I had the same outlook to a few topics in school (many years ago btw) and therefore was quite paranoid of a few terms. Every time i opened my book on those topics, i would only get jitters or tingling feet –

– How would i rush through so many concepts just in time to prepare for my exams?
– Is this subject “cool”? Why does that buck-toothed geek sitting ahead of me enjoy taking a shot at those problems everytime?
– Concepts are not the end. Would i really be able to solve those tricky word problems on those concepts?
(…probably there is still time, give it a try…)

– There is so much noise around, i can’t focus on the studies anyway. No effort is going to save me.
…so i give up and would rather rely on on-the-spot-intelligence aka commonsense in the exam…

Of course, exams were unsparing and the results would show how i scraped through just about enough for survival in those topics (and how i fared well in other topics which i really liked)

Getting deeper into this — why did i not like some topics in the first place? The answers appear quite ridiculous now, after so many years –

1. Weirdly composed text-books. The author was in some sort of a hurry and assumed a general interest from all readers.
2. The author assumed that all readers like and understand his/her style of explanation.
3. Competitive school-culture. Everyone studies only to score best marks in the exams (necessary for survival, even now, in competitive societies). Who cares about the real application of these concepts?
4. Average to below-par examples, diagrams and no hands-on-application using means other than the paper and pen — for instance, no real life activities. (It’s a common, unfortunate notion that “activities” are for pre-school and “growing up” means getting “serious” about concepts and remain confined to the paper and the pen.)
5. Lastly, some folks are slow learners and others are fast learners. Unfortunately, competitive societies reward fast learners and are harsh upon slower ones. However, slow learners do relish the topic and are sometimes most creatively apply that concept.

Now that i have no exams to survive currently, i am going to take a second, fresh, look at some of these topics that i could not do much justice to in the earlier days.

This week, i will take a fresh look at “Permutations and combinations”. I have nothing to prove, no exams, honestly, i don’t have to re-look at this anymore, but i think somewhere in life, it will be useful to me for applying this concept. Next week, i will choose another concept.

Just wanted to share this thought of taking a second, fresh look at some things. The brain does not not deteriorate, it gets wiser, there are fewer distractions and hence more focus.







Honesty in times of “professionalism”

i have always had this question — how should i stick to honesty and appear as professional as the situation demands? The solution — to me — seemed to take a firm stand with honesty and stick to that. As i review all such scenarios i have experienced,i feel my stand of honesty may have been perceived as quite “unprofessional” to an observer of our times! Over the past several years, i have slowly yet surely come to the conclusion that professionalism is no longer practiced by anyone the way it was planned to be. The very notion of “professionalism” has shifted and in many situations, it filters down to providing as little detail in as crisp a language (with a side-effect of making open-ended statements).

Somewhere in this honesty versus professionalism spectrum lies the category of “outspoken” people. Empirically, such folks are rather evasive of the issue and use verbiage as a means to camouflage the issue, typically ending their huge narratives by formulating a statement they could so easily tackle, and use such a statement to drive home their point.

Modern day “professionalism” and the curt or verbose flavours to it often lend slippery characters to justify their path. On the other hand, plain-old honesty may bring you further obstacles — yes, if you’re a yes/no person and an honest one on top of that, you present the “handles” to your character which a person can so easily wield. Slippery characters meanwhile, move ahead.

Would you choose honesty over modern day “professionalism”? i feel you still can mix the two by being as precise in your communication, less blunt and outspoken, and still state the facts. Of course, not every situation can be tackled with such a mix though.