Teaching and Unlearning

Share

I had the opportunity to visit the Srishti School of Art, Design and Technology in Bangalore to conduct a workshop on exploring the possibilities with technologies as a part of my work at Arduino India. I was very excited, and a little apprehensive at the same time. What would teaching them be like ? The little information I had about the students was that they come from a diverse background and have different skill sets and expertises, and that we have kits (the contents of which were unknown to me, hah). With that little information I had in mind, I had to tailor my presentations and teaching to make the maximum impact. Like jumping into a pool ? Pretty much.

The conversations that I had with the faculty there before the workshop however put me at ease, especially when there are words like “no pressure”, “keep it open” and “go with the flow” thrown around. So here I am, walking into a classroom with a bunch of cool budding designers, a couple of presentations lined up and trying to let serendipity happen. Even with an opening line of “When you have is a hammer, all you see is a nail”, I was in a for a bigger surprise than I expected.

While teaching them, I realized / learnt quite a lot of things, and I am going to talk about some of them. The most important one ? Assumptions SUCK. The place assumptions belong to are outside the window. For example, having taught what a component looks like, I asked the students to find it in their kit as we were going to use it. I ended up with a couple of people holding a diode instead of a resistor. Why ? Because I had assumed that the difference between the appearance and functions of a diode and resistor were clear to all (even though I hadn’t talked about the diode previously). Or when I asked people to connect the brown wire to ground, and I was told that they did not have a brown colored wire, they only had blue. This wasn’t silliness, no indeed. Such small things are assumptions we make, that make us stumble, the same way that a badly designed product is of limited use to the end-user.

After working with a few different sensors and talking a little about actuators, we got into a chat about things around that we could use as input stimuli. What amazed me next was the quick list of 37 (non-exhaustive) list of ways in which we could use something to trigger a reaction in an object or environment that made itself materialize rapidly. People learn, they learn fast, and they learn even faster if they are invited to tie in what they already know to something knew.

This week, I hear people coming back after the workshop with their ideas, discussing what they are doing / what they want to do, and how they can use Arduino and other technologies in their installations. I am doing all I can to unlearn the “rules” that I was once taught, and I am enjoying it. Teaching is fun, unlearning is amazing.

Share

Bangalore Needs Change

Share

Travelling in Bangalore isn’t a piece of cake. Not at all. You’ve got to brave traffic, pothole-ridden roads, some very-very inconsiderate bus conductors (who will either pocket the difference or ask you to disembark), jampacked buses that make you feel like you are in a fevicol ad, and almost every other rickshaw-driver trying to earn as much as they can from every single passenger (I wonder why, the conspiracy theorist in me thinks that they do this so that they can go home at 9.30pm too and contribute to the lack of public transport here).

Sure every city has these, you would argue. Which is also why I shall not go into those. But there is another problem which is really irksome.Β  BANGALORE NEEDS CHANGE ! LITERALLY !

Change

Not to sound overly dramatic, but this has been a really annoyance. I have had delivery boys and shopkeepers who won’t return change, bus conductors who have written “balance amount” on my tickets and I have had to disembark without it because they did not “have change” when it was my stop, and rickshaw drivers who won’t return change (often, they deal in just denominations of 50, and anything else, they treat it as change, to be pocketed). Seeing that I didn’t have change, and no one in the buses seems to have any, where is all the change ?! Where is all the change going !?

My question, dear reader, if you happen to be able to answer this, or if you happen to be able to question with me is, WHERE is the change ?

P.S. If this seems to you as trivial, frivolous, attention-seeking etc. , well then we probably have different sensibilities, and I am not aspiring nor claiming to everyone’s sensibilities

Share

Understanding Humans – Social Psychology talk

Share

A little while ago, I was lucky enough to chance upon a course on Social Psychology on Coursera that talked about how people think in relation to others. Apart from being interesting, insightful and a lot of fun (also a good amount of work), it also tried to provide a better way of understanding people and improving yourself based on that.

Barcamp Mumbai 12 Talk

I took a session on “Understanding Humans : How to do it good” based on the concepts I picked up from this course at Barcamp Mumbai 12 this year. For those of you who did attend, and also for those of you who did not, here’s a summary of that (unstructured and random) talk :

1. Construction of Reality :
People are the result of their enviroment, their past and their expectations. This affects the perception of their reality. What this means is that the same object, the same person and the same event is perceived by people differently. Factors that also affect this perception are :
– what we want to see (these are our expectations, that color our behaviour)
– what we expect to see (we might expect someone to be opposed to us beforehand, and that could shape our attitude towards them )
– what we are paying attention to

A classic example is a cricket match between two teams, where you and your friends are supporting opposing teams. Any incident that might happen, is view differently by you and your friends – you tend to see the fault of the opponents more than those of players of your own team.
Knowing this, you could take a step back , and as the phrase goes, “Put yourself in the other person’s shoes” and get a better result for everybody.

2. Attribution Theory

A fundamental mistake that everybody tends to make is attributing behaviour to someone’s personality and disposition than leaving some room for doubt about the situation. Judging people so is biased, not to mention not useful at all. Sometimes, people behave in ways that displease you, sure, but they might not be predisposed to behaving that way and the situation might have influenced that behavior.

If you can think of instances where you have let occurrences of events make you comment about the habits / nature of a person, you have probably been making this error. You do not have to give them the benefit of doubt, but it helps to leave some room for doubt sometimes.

3. Confirmation bias

“We see what we are looking to see”. This is the most concise summarisation of this bias that most of us have. This affects not just social relationships but also professional work. When we have preconceived notions and beliefs, we will jump at the smallest and every piece of evidence that supports our expected results. In doing so, we often don’t even stop to cross examine evidence that might suggest otherwise. This can make us wrongly judge a person, and is the reason behind “cover-ups”, “burying evidence” and scientific studies which have manipulated results.

4. Self-fulfilling prophecies

These are slightly complex, and happen in part because of expectations. This is better explained with examples. Studies were conducted in which a group of students were described as being “promising and smart” to their teachers. These students were chosen at random, and there was no basis for actually marking them. Their academic results were observed a while later and it was found that they did indeed perform better than their usual and in a lot of cases better than others as well. This happened because the teachers were told of them being “special”, and they paid extra attention, gave a lot of positive reinforcements to them in particular etc. thus causing the change.

Another example is that if people believe that a particular person if opposed to them, they behave differently, which in turn causes that person to oppose them though they might not have done so in the first place.This is also how bullies are formed.

Another simple example mentioned in the Social Psychology course is interesting to understand this. Assume two neighbouring countries, A and B. Assume that A “thinks” B is arming itself for war. Country A will start moving its defenses along the borders. This movement might be interpreted by Country B as an act of aggression and thus B might start preparing itself. Country A could see this preparation as confirmation of its suspicion, and the countries might actually end up at war with each other, the basis of which was nothing to begin with.

5. Attitude Behaviour Inconsistency

What people believe and how they behave about matter pertaining to that belief are not always in sync. It is generally thought that people will behave according to their professed beliefs, but that is very often the quite opposite of what actually happens. People claim to have particular attitudes but do not behave accordingly. When this discrepancy is pointed out, they often change their professed attitude much easier than their behaviour.

Tips on getting things done

There are three “hacks” that generally could help you get what you want (I am not advocating any of these methods, just presenting )Β  :
1. Foot in the door : Make a small request, get it granted, that is your foot in the door. That can then improve your chances of getting a bigger, related request approved.
2. Door in the face : Making a huge unreasonable request first can improve your chances of getting a smaller, related request fulfilled. This can be thought of as “compensation” for guilt that sometimes accompanies denying somebody of something. Kids get good at this over the years ; )
3. Low-balling : This is the hidden costs method. You express a request first and get it approved without mentioning the full implications of the request, and after it has been approved, a lot of hidden costs are attached to that request. This happens often in the case of modern day marketing and sales.

I hope this helps, it definitely did help me in understanding people better : ) Cheers !

 

Share

Hello Arduino India !

Share

The past year has been an amazing one. Driving two projects from scratch to readiness over the course of a year, at MediaLab Amsterdam let me live in lively Amsterdam and hop to quite a few cities over Europe. The travel and living apart, the experience has been spectacular ; lots of brilliance encountered, people met, lessons learnt, blinkers taken down and eye-openings experienced. It has been a stellar year, it has been good. A big thank you to everybody at MediaLab who worked with and around me, and those who were around, for making all that happen.

Well, the year is out, and here I am back in Mumbai. But not entirely without reason. A little while ago, I happened to strike up a conversation. As the nature of things and conversations goes, things got heated up, one thing led to another, some decisions were made. And, as such things tend to go, it brought me back to India. With what promise ? An interesting challenge, a chance to make a difference. What am I going on about ?
Arduino
Here’s a little something that I sketched up in anticipation ( and excitement ; ) )

I join the team at Arduino India starting Monday, the 7th. I am moving to Bengaluru for this, and think of it as the beginning of even more awesome times ahead. What am I going to do there ? What is the work like ? What is the team like ? What do we aim to do at Arduino India ? Like the plug goes,”Watch this space for more” ; )

P.S. If you are in Bengaluru this Sunday (6th October), do drop by to say hello and strike up a conversation (awesomeness on offer ; ) ) at the Arduino India booth at this event —> : Electronics Rocks 2013

Share

Data Visualization – GPS logs from Google Location History

Share

It’s been 10 days since I am back from a 5 month stint in Europe, and its 10 days to move on to my next stint (more on that very very soon πŸ˜‰ ). Being in Mumbai has its perks, with the alma mater, friends, vada pav and Marine Drive being high points. However, 20 days of doing nothing can really get to you, and you need to keep on doing something just to keep sane.

I had wanted to do a data visualization project for quite some time, and I had always wondered what data I could use. Being back from Europe and having travelled a few cities, and owning a tablet, gave me the spark I was searching for. I had 5 months of GPS data (recorded automatically by my trusty companion, the Nexus 7) logging my travels. That amounted to 73,000 recordings, spread over 5 months, 6 cities and a lot of geography.

Well, Google Location History exported all the data to a KML file readily enough, and there I hit the first hurdle. Too much data. I had data from all over, starting from India to my transit there via the Middle East, and those points just seemed like “outliers” (data which was much different from the rest). So, before I got around to plotting anything, I figured I ought to delete some data, and I set about to do it. Unfortunately, the KML exported by Google Location History isn’t exactly the most beautiful.Β  Data is split across two lines, one with time and one with co-ordinates, and needs a bit of work to be made into CSV, so one can do some mathemagic with the numbers. So, what do you do ?

I learnt vim. I went and talked to a friend, and showed him what I was doing. He fired up vi, typed in a few commands, and there was my data for one city, all cleaned up and ready to be analysed. So, I went home that night, fired up vimtutor, and learnt vim. Totally worth the two hours I put into it.

Discussing what I was doing also helped me brush up statistics and algorithms. Lots of ways come to mind about ways to “cluster” the data. Since a lot of points were pretty much the same location, with all the quirks of GPS measurements, they could be replaced with just one point. Additionally, I could take a city’s data , combine it with my knowledge of my walk in the city, and use k-means clustering to cluster it into a few places that I hung out. That raised the question, did I really want to cluster the places, when the aim I had in keeping logging turned on was to record everywhere I had been and to later see and show all the streets that I had walked ? Ought I just show all the data points, or would it be nicer to show the path I followed, step by step, and with insights into how much time I spent where along the way, maybe for some other traveller looking for something like I had ?

Too many questions, or rather decisions and tests to make, and not too many answers. So, while I figured it out, I went ahead and plotted a few of the cities I visited on a map, using Google Fusion Tables (incredibly easy and handy). Here are a couple of those maps, until I decide to (and/or) finish this project. And if you want to play with this dataset yourself, you can get it here : http://imojo.in/gpsdataset

Also, some terms that you might like to look up, that I came across while working on this : [ clustering, k-means clustering, elbow method, visual block mode in vi, Manhattan distance, curse of dimensionality, forward difference, second forward difference, normalisation, outliers ]

Share

Physical Integrity

Share

Software can be tested. Test cases can be supplied, performance can be measusred and the output verified. In open-source software, the code can also be read and one can understand the thought and techniques and other intricacies and decisions that went behind making that piece of software. In other words, the entire body and soul of the product is out there in front of you.

All about coffeeThe same can be known about coffee, if you put in the effort. I recently came across an image that expresses exactly that. You can know where the coffee originated, the processes it went through, the people involved and other details. The complete life of the product (though to many people coffee is more than just a product, more like a piece of art) can be put in front of you, the user, the consumer, anyone who deigns to ask.

Why not with hardware ? And when I say hardware, I don’t mean electronics. Sure, hardware, electronic or otherwise can be “tested” for particular things. Stresses, strains, temperature responses, resistances, brittleness, opacity and a ton of other things can be “tested”. Electronic goods which are assembled have QR codes on every major component in them, but they don’t tell you where they were made, what processes went into making it and the like.

I can understand that there is the “too much information” argument, and about the usefulness of it. But I liken this idea to that of a “physical MD5 checksum”. There is an “MD5” checksum to check the integrity of code, to see if the product as it was packaged and supposed to be. Having a physical MD5 checksum, could open up quite a few possibilities.

– You could actually be able to check if things actually are what they claim to be. With the advent of 3D printing, this should be a pretty useful testing probe.

– You could distinguish your “Made in Taiwan” from “Made in Korea”. Win for activism and awareness, not such a pleasant thought for corporates and governments.

– You could know how your product is made, where it is made, if the product you got is the one you paid for or one with a “cheaper / less reliable / more hazardous” component

– You could actually know if and how your Apple product is worth the “premium” that you pay for it over other alternatives, without having to rely on marketing content manufactured for you by any company

There is quite an obvious con too. Manufacturing secrets and processes could be revealed, which in most cases are patented trade secrets and often minor things are differentiators between products, and wouldn’t do well to be revealed. But then, this entire idea is about accountability and openness, so I guess there are decisions and trade-offs that would need to be made.

One more disadvantage would arise from having too much information. Knowing too much and having too many things to choose from, can paralyze you. Nevertheless, choices can be broken down, information can be prioritized, and made manageable. There are complete industries and professions that do that. After all, where would we have been if we had not accepted use of fire because it could burn if improperly used ?

P.S. I hereby certify that this entire thought was not influenced by any sci-fi movies, but by the simple question I had when I was in a supposedly career-deciding examination – What if my food or drink which was instructed to be left unprotected in a common waiting area was tampered with ? There should be a checksum for that.

P.P.S. Feel free to start a discussion with me by dropping me an email πŸ˜‰

Share

Scheming Supermarkets

Share

How many of you walk to the nearest super-market the first thing that you think “I need to buy something” ? To how many of you does that come impulsively, like muscle memory ? Here’s a little something to make you walk an extra bit further, or keep your eyes that extra bit open.Receipt

Ever since I have been living in Amsterdam (been a while), I have been walking to the nearest supermarket, which more often than not turns out to be Albert Heijn. The parts of Amsterdam I have seen, I believe that the Albert Heijn chain was planned by walking through the city, and placing the stores strategically so that one would never have to walk more than 10 minutes to get to an Albert Heijn. Well, based on my experiences with buying from the local small grocer and buying from the supermarket, here are a few thoughts :

– There are no price tags on products (not only in this store, but any other). I understand the “saves labor if prices change” argument, but it is not in the interest of the consumer either if the price can be changed at a click, arbitrarily and by almost anyone, even. It’s easy for “mistakes” to flow through, honest or dishonest.

– Products are often ‘misplaced’. I have sometimes picked up a product, reading its price tag as say X, but paid more, because, the product was not near the correct tag, or it was a different product. I would put it down to consumers checking out products and not putting them back correctly, but it has happened more often than that for me to dismiss it. I have explicitly observed a label of product A and no sign of it anywhere, and product B in its place. At home, out of place.

– There are “mistakes” in price tags. More than once, I have paid more than the “discounted” price tag for the product. I have had that nagging feeling, ‘Hey, this is not what the price tag said’.

– Another move that makes things work in favor of super markets is that the checkout counters are placed right at the end, and you checkout after you have done all your picking. People who have placed something in their cart aren’t likely to opt not to buy the product _just because_ it is 10 cents more expensive than they thought. And they aren’t very likely to argue either on the price, seeing that the aisle from where they picked up the product is far away and there is (usually) a queue of customers behind them.

– A lot of people often don’t ask for receipts since they shop everyday at the supermarkets and never do examine the prices of what they bought. Even if they do, they don’t really have a ready comparison to check if they were charged right.

So here’s what happened :
Last week, I had some free time on my hands, and thought, ‘Let’s buy some fruit, try my hand at eating healthier’. I walked with a pack of strawberries to the checkout counter, and got charged 50 cents extra for it. I had some time on my hands, so I went through the supermarket again (after paying), checked the prices, then went to the reception, pointed out the discrepancy and had them walk with me to check it out. One of the products, it turns out, was not overcharged (it was a different product from the one that I had assumed based on the tag, the names being the same but one being wholesale and one being a retail price, the difference between 5kg and 1kg packs ). The second one, however, was indeed over-charged, and the agent spent the 30 seconds walking back with me to the desk trying to explain to me that it was a “computer mistake” and “such mistakes happen”. Well, if such mistakes happen that often, I am quite interested in knowing in whose favor they go.

I don’t know (and I didn’t bother to find out) how many stores of this chain are in Holland (or elsewhere), how many people go to them everyday, and how many of them end up paying for the products with “mistakes”. I do make a simple calculation though. I was charged 50 cent extra for a bunch of strawberries. Assuming each store sells 50 such boxes a day (they were on discount, I am sure they sell more), they earn 25 Euros a product a store a day. I know that there must be at least a 100 such stores in the country. That would comes to 2500 Euros a day per product per mistake. I know these are overly simplifying assumptions, but they are not unreasonable and I am estimating they are under-represented even with this. I don’t even want to point out how much an average household spends per year on daily household goods, and how much of a difference a mistake of even 10 cent per 10 Euro purchase could make them, its just very sad.

Wow, talk about lucky mistakes. I’d sure love to make some such.

[ Note: There is a whole study and discussion about pricing strategies to make consumers spend, but you can read it here, I don’t have much to add to the discussion there : http://www.amadorbooks.com/nocardsh.htm ]

Share

Never been one such place.

Share

VJTI

Never been one such place with so many
wisps of ever-shifting thoughts, each overwhelmingly colored
echoing sounds, from afar and ago, each ringing fresh and loud
lingering smells, of pungence and petrichor, each one with its own place
places you’d want to stay some more, all at once
hundreds of people, you’d want to say individual hellos to
friends, that become and stay family no matter where they are
memories, too numerous to be contained, too precious to be left behind

Never one such place, with so much of you, and yet so completely itself.
Never been one such place. Not one except this one special place I know.

– To my alma mater. VJTI.

Share

Making LEDs dance to music

Share

I am working onΒ an installation at Amsterdam, trying to transform an ugly vandalised building into an open-air exhibition space, and make it interactive to make the area lively and the project engaging to pedestrians and vehicles.

Part of this involves having LEDs dancing around the building, encouraging the viewers to move around the building. For this, I ordered myself a strip of flexible RGB LEDs from China. These are based on the LPD8806 ( you can find a tutorial here ), run on 5V, do not need continuous refreshing and each LED is individually controllable. Guess what that means ? Yep, you can hook it up to an Arduino and start programming, just like that. I came across the FastSPI2 library, which does a great job of letting you control these strips (they support different chips like the WS2801 and others too) through a very easy interface.

With the LEDs and Arduinos in hand, I set about trying to find a fun enough experiment to do. I had wanted to map out motion data to visuals since a while, but then sound is a good option too, I thought. With that in mind, I tried finding a way to sync visuals to music. The Pink Panther track comes to mind very quickly, because of the simple beats and the associated visual movement being easy to imagine. With suggestions from my Japanese friend Takuma about using MIDI instead of MP3 , with this little script from my Spanish friend Alex to map the timings of the music track to usable text data, and with help from my Dutch team-mate Steven to figure out musical notation and editing, I was able to put together this little demo below. It is very basic, and I hope to put in more effects and visuals soon ! The code is on Github here : http://go.ankitdaf.com/dancingleds

Dancing LEDs from Ankit Daftery.

Share

Open source software you can pay for

Share

Before contributing code as a part of Google Summer of Code (twice), I used to wonder how open source worked. How could entire organisations, maintaining huge operating systems and other very popular software and systems keep running if they released their code out in the open, so to speak ? How could developers afford to pour in months of hard work into countless lines of code, and then let it all out there, for everyone to use, modify,share as they please ? I wasn’t skeptical, just immensely curious.

A few years down the line, I have a slightly better idea. Organisations accept donations, community-built software often gets built cheaper and quicker than developing commercially, using open sourced platforms in proprietary systems is not uncommon, and the like. As a part of Google Summer of Code, I (and every student developer) was paid a stipend, sort of as a compensation. After all, bills need to be paid.

Another approach I have come across, interestingly, is the “Buy me a beer” concept, which is now seemingly dead. The idea is, put in a “cool” way, that I need beer or coffee to keep on putting in those hours to make the code better for you, so please pay for a beer or coffee so I can work on it a little bit longer. This, of course, also depends on whether your code is good enough for someone to want you to continue developing it further.

Almost all my code I have developed so far is open, but I admit, almost none (except my GSoC contributions) are in substantial use. But as is habit, I found and wrote more code to automate my work that extra bit further. Where is this going ? Wait for a moment and see πŸ™‚

I have a photo-log, a collection of photos from two and a half years, documenting my life and travels over this time. I do not mean occassional albums, but regular pictures of people, places, things, activities. It amounts to 66 GB including videos and pictures. I already had written myself a tool to help me organise my collection better, but when Flickr announced the recent largesse of 1TB for everyone, I thought this was a great solution to backup my photos and share them. So I came across a script to bulk-manage my uploads, and modified it substantially to suit my purpose. Then I thought to myself, there must be a lot of people with needs and thoughts similar to mine, hoping to leverage the extra space. I am sure my script would be pretty useful for them. I would love to add features to it too, but I have a full time job as well. And then the concept of “buy me a beer” and Instamojo, a startup my friends are working on came to mind. That’s when I decided to experiment with “selling” code (the difference , of course is, that I am not selling the “code”, but documentation, tips and hacks to better leverage the code instead), though in a style similar to a performer who lets you pay if you wish to (and my friends at Instamojo tell me however-much-you-wish-to will be possible soon).

Do use the script, and buy me a coffee, if you think it helped you. You can get the script here : http://go.ankitdaf.com/uploadr . I don’t need to make much money out of it, but it would be a nice incentive to keep going. Also, I’d like to see how many people find it useful, and how many like it to the extent of paying for something they could have for free πŸ™‚ And of course, the coffee would help me stay awake ! Cheers !

Share